File tree Expand file tree Collapse file tree
outputs/prometheus_client Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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#
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#
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
157157func (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" )
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments