Skip to content

Commit 66e12e0

Browse files
authored
remove deprecation warning (#9125)
1 parent 842a788 commit 66e12e0

5 files changed

Lines changed: 6 additions & 10 deletions

File tree

etc/telegraf.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@
12591259
# ## Prometheus format. When using the prometheus input, use the same value in
12601260
# ## both plugins to ensure metrics are round-tripped without modification.
12611261
# ##
1262-
# ## example: metric_version = 1; deprecated in 1.13
1262+
# ## example: metric_version = 1;
12631263
# ## metric_version = 2; recommended version
12641264
# # metric_version = 1
12651265
#
@@ -7577,7 +7577,7 @@
75777577
# ## value in both plugins to ensure metrics are round-tripped without
75787578
# ## modification.
75797579
# ##
7580-
# ## example: metric_version = 1; deprecated in 1.13
7580+
# ## example: metric_version = 1;
75817581
# ## metric_version = 2; recommended version
75827582
# # metric_version = 1
75837583
#

plugins/inputs/prometheus/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ in Prometheus format.
1616
## value in both plugins to ensure metrics are round-tripped without
1717
## modification.
1818
##
19-
## example: metric_version = 1; deprecated in 1.13
19+
## example: metric_version = 1;
2020
## metric_version = 2; recommended version
2121
# metric_version = 1
2222

plugins/inputs/prometheus/prometheus.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ var sampleConfig = `
8686
## value in both plugins to ensure metrics are round-tripped without
8787
## modification.
8888
##
89-
## example: metric_version = 1; deprecated in 1.13
89+
## example: metric_version = 1;
9090
## metric_version = 2; recommended version
9191
# metric_version = 1
9292
@@ -155,9 +155,6 @@ func (p *Prometheus) Description() string {
155155
}
156156

157157
func (p *Prometheus) Init() error {
158-
if p.MetricVersion != 2 {
159-
p.Log.Warnf("Use of deprecated configuration: 'metric_version = 1'; please update to 'metric_version = 2'")
160-
}
161158

162159
// Config proccessing for node scrape scope for monitor_kubernetes_pods
163160
p.isNodeScrapeScope = strings.EqualFold(p.PodScrapeScope, "node")

plugins/outputs/prometheus_client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ all metrics on `/metrics` (default) to be polled by a Prometheus server.
1414
## Prometheus format. When using the prometheus input, use the same value in
1515
## both plugins to ensure metrics are round-tripped without modification.
1616
##
17-
## example: metric_version = 1; deprecated in 1.13
17+
## example: metric_version = 1;
1818
## metric_version = 2; recommended version
1919
# metric_version = 1
2020

plugins/outputs/prometheus_client/prometheus_client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var sampleConfig = `
3535
## Prometheus format. When using the prometheus input, use the same value in
3636
## both plugins to ensure metrics are round-tripped without modification.
3737
##
38-
## example: metric_version = 1; deprecated in 1.13
38+
## example: metric_version = 1;
3939
## metric_version = 2; recommended version
4040
# metric_version = 1
4141
@@ -133,7 +133,6 @@ func (p *PrometheusClient) Init() error {
133133
default:
134134
fallthrough
135135
case 1:
136-
p.Log.Warnf("Use of deprecated configuration: metric_version = 1; please update to metric_version = 2")
137136
p.collector = v1.NewCollector(time.Duration(p.ExpirationInterval), p.StringAsLabel, p.Log)
138137
err := registry.Register(p.collector)
139138
if err != nil {

0 commit comments

Comments
 (0)