You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using MGOB (https://github.com/stefanprodan/mgob), and MGOB exposes metrics in Prometheus format natively. When we scrape directly from MGOB, the metrics mgob_scheduler_backup_latency (Type summary) are scrapped successfully, but when we use inputs.prometheus, these metrics are probably dropped.
We have metric_version = 2 in inputs.prometheus and outputs.prometheus. If we use metric_version = 1 in inputs.prometheus and outputs.prometheus, this issue won't occurs.
curl -s http://localhost:8090/metrics | grep 'mgob_'
# HELP mgob_scheduler_backup_latency Backup duration in seconds.
# TYPE mgob_scheduler_backup_latency summary
mgob_scheduler_backup_latency{plan="mongodb-cluster",status="200",quantile="0.5"} NaN
mgob_scheduler_backup_latency{plan="mongodb-cluster",status="200",quantile="0.9"} NaN
mgob_scheduler_backup_latency{plan="mongodb-cluster",status="200",quantile="0.99"} NaN
mgob_scheduler_backup_latency_sum{plan="mongodb-cluster",status="200"} 4004.679645687
mgob_scheduler_backup_latency_count{plan="mongodb-cluster",status="200"} 1
# HELP mgob_scheduler_backup_size The size of backup.
# TYPE mgob_scheduler_backup_size gauge
mgob_scheduler_backup_size{plan="mongodb-cluster",status="200"} 1.9250215041e+10
# HELP mgob_scheduler_backup_total The total number of backups.
# TYPE mgob_scheduler_backup_total counter
mgob_scheduler_backup_total{plan="mongodb-cluster",status="200"} 1
Get scrape from Telegraf
curl -s http://localhost:9273/metrics | grep 'mgob_'
# HELP mgob_scheduler_backup_size Telegraf collected metric
# TYPE mgob_scheduler_backup_size gauge
mgob_scheduler_backup_size{cluster_name="mongodb-cluster",plan="mongodb-cluster",status="200",url="http://localhost:8090/metrics"} 1.9250215041e+10
# HELP mgob_scheduler_backup_total Telegraf collected metric
# TYPE mgob_scheduler_backup_total counter
mgob_scheduler_backup_total{cluster_name="mongodb-cluster",plan="mongodb-cluster",status="200",url="http://localhost:8090/metrics"} 1
Expected behavior:
Have the same metrics in both requests.
Actual behavior:
Metrics mgob_scheduler_backup_latency (Type summary) has been dropped by Telegraf if we use metric_version = 2.
Hi,
We are using MGOB (https://github.com/stefanprodan/mgob), and MGOB exposes metrics in Prometheus format natively. When we scrape directly from MGOB, the metrics
mgob_scheduler_backup_latency
(Type summary) are scrapped successfully, but when we useinputs.prometheus
, these metrics are probably dropped.We have
metric_version = 2
ininputs.prometheus
andoutputs.prometheus
. If we usemetric_version = 1
ininputs.prometheus
andoutputs.prometheus
, this issue won't occurs.Relevant telegraf.conf:
System info:
Steps to reproduce:
Expected behavior:
Have the same metrics in both requests.
Actual behavior:
Metrics
mgob_scheduler_backup_latency
(Type summary) has been dropped by Telegraf if we usemetric_version = 2
.Additional info:
The summary vector from MGOB: https://github.com/stefanprodan/mgob/blob/master/pkg/metrics/metrics.go#L34
The text was updated successfully, but these errors were encountered: