Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus metric_version = 2 & make scrape url as a configurable tag #5767

Merged
merged 9 commits into from
Nov 21, 2019
Merged
Prev Previous commit
Next Next commit
fix histogram metric name issue (_bucket was missing)
  • Loading branch information
vishiy committed Oct 16, 2019
commit af03bc05866ed918526d5d91ab3cf830ce9c9724
2 changes: 1 addition & 1 deletion plugins/inputs/prometheus/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func makeBucketsV2(m *dto.Metric, tags map[string]string, metricName string, met
newTags := tags
fields = make(map[string]interface{})
newTags["le"] = fmt.Sprint(b.GetUpperBound())
fields[metricName] = float64(b.GetCumulativeCount())
fields[metricName+"_bucket"] = float64(b.GetCumulativeCount())

histogramMetric, err := metric.New("prometheus", newTags, fields, t, valueType(metricType))
if err == nil {
Expand Down