remove deprecation warning (#9125)

This commit is contained in:
Helen Weller 2021-04-13 16:13:06 -04:00 committed by GitHub
parent 842a788022
commit 66e12e062d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 10 deletions

View File

@ -1259,7 +1259,7 @@
# ## Prometheus format. When using the prometheus input, use the same value in # ## Prometheus format. When using the prometheus input, use the same value in
# ## both plugins to ensure metrics are round-tripped without modification. # ## both plugins to ensure metrics are round-tripped without modification.
# ## # ##
# ## example: metric_version = 1; deprecated in 1.13 # ## example: metric_version = 1;
# ## metric_version = 2; recommended version # ## metric_version = 2; recommended version
# # metric_version = 1 # # metric_version = 1
# #
@ -7577,7 +7577,7 @@
# ## value in both plugins to ensure metrics are round-tripped without # ## value in both plugins to ensure metrics are round-tripped without
# ## modification. # ## modification.
# ## # ##
# ## example: metric_version = 1; deprecated in 1.13 # ## example: metric_version = 1;
# ## metric_version = 2; recommended version # ## metric_version = 2; recommended version
# # metric_version = 1 # # metric_version = 1
# #

View File

@ -16,7 +16,7 @@ in Prometheus format.
## value in both plugins to ensure metrics are round-tripped without ## value in both plugins to ensure metrics are round-tripped without
## modification. ## modification.
## ##
## example: metric_version = 1; deprecated in 1.13 ## example: metric_version = 1;
## metric_version = 2; recommended version ## metric_version = 2; recommended version
# metric_version = 1 # metric_version = 1

View File

@ -86,7 +86,7 @@ var sampleConfig = `
## value in both plugins to ensure metrics are round-tripped without ## value in both plugins to ensure metrics are round-tripped without
## modification. ## modification.
## ##
## example: metric_version = 1; deprecated in 1.13 ## example: metric_version = 1;
## metric_version = 2; recommended version ## metric_version = 2; recommended version
# metric_version = 1 # metric_version = 1
@ -155,9 +155,6 @@ func (p *Prometheus) Description() string {
} }
func (p *Prometheus) Init() error { func (p *Prometheus) Init() error {
if p.MetricVersion != 2 {
p.Log.Warnf("Use of deprecated configuration: 'metric_version = 1'; please update to 'metric_version = 2'")
}
// Config proccessing for node scrape scope for monitor_kubernetes_pods // Config proccessing for node scrape scope for monitor_kubernetes_pods
p.isNodeScrapeScope = strings.EqualFold(p.PodScrapeScope, "node") p.isNodeScrapeScope = strings.EqualFold(p.PodScrapeScope, "node")

View File

@ -14,7 +14,7 @@ all metrics on `/metrics` (default) to be polled by a Prometheus server.
## Prometheus format. When using the prometheus input, use the same value in ## Prometheus format. When using the prometheus input, use the same value in
## both plugins to ensure metrics are round-tripped without modification. ## both plugins to ensure metrics are round-tripped without modification.
## ##
## example: metric_version = 1; deprecated in 1.13 ## example: metric_version = 1;
## metric_version = 2; recommended version ## metric_version = 2; recommended version
# metric_version = 1 # metric_version = 1

View File

@ -35,7 +35,7 @@ var sampleConfig = `
## Prometheus format. When using the prometheus input, use the same value in ## Prometheus format. When using the prometheus input, use the same value in
## both plugins to ensure metrics are round-tripped without modification. ## both plugins to ensure metrics are round-tripped without modification.
## ##
## example: metric_version = 1; deprecated in 1.13 ## example: metric_version = 1;
## metric_version = 2; recommended version ## metric_version = 2; recommended version
# metric_version = 1 # metric_version = 1
@ -133,7 +133,6 @@ func (p *PrometheusClient) Init() error {
default: default:
fallthrough fallthrough
case 1: case 1:
p.Log.Warnf("Use of deprecated configuration: metric_version = 1; please update to metric_version = 2")
p.collector = v1.NewCollector(time.Duration(p.ExpirationInterval), p.StringAsLabel, p.Log) p.collector = v1.NewCollector(time.Duration(p.ExpirationInterval), p.StringAsLabel, p.Log)
err := registry.Register(p.collector) err := registry.Register(p.collector)
if err != nil { if err != nil {