remove deprecation warning (#9125)
This commit is contained in:
parent
842a788022
commit
66e12e062d
|
|
@ -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
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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")
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue