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
up{job="<job-name>", instance="<instance-id>"}: 1 if the instance is healthy, i.e. reachable, or 0 if the scrape failed.
...
The up time series is useful for instance availability monitoring.
The issue is that when the value differs from 1.0, Prometheus receiver prints a generic error message "http client error":
i.e. doesn't mention anything about the up metric.
Steps to reproduce
Configure Prometheus to scrape a non-existent endpoint. This should produce the up metric with a value 0.
What did you expect to see?
A more informative message, e.g. "Scraping failed: the 'up' metric had a value 0".
We should also check specifically for 0 and in case it's different from 0/1 return a validation error instead.
What did you see instead? "msg":"http client error"
What version did you use?
Version: v0.10.0 / master
The text was updated successfully, but these errors were encountered:
Update: after re-reading the page https://www.prometheus.io/docs/concepts/jobs_instances/, the value 0 is also valid, but means that the scraping has failed, so the error message is somewhat valid, though still needs to be improved from a generic "http client error".
1 if the instance is healthy, i.e. reachable, or 0 if the scrape failed.
Describe the bug
The
up
metric is considered special by Prometheus receiver and must always contain a constant value of1.0
.This concept is documented in https://www.prometheus.io/docs/concepts/jobs_instances/:
The issue is that when the value differs from
1.0
, Prometheus receiver prints a generic error message"http client error"
:opentelemetry-collector/receiver/prometheusreceiver/internal/metricsbuilder.go
Line 115 in cba929d
e.g.
i.e. doesn't mention anything about the
up
metric.Steps to reproduce
Configure Prometheus to scrape a non-existent endpoint. This should produce the
up
metric with a value0
.What did you expect to see?
A more informative message, e.g.
"Scraping failed: the 'up' metric had a value 0"
.We should also check specifically for
0
and in case it's different from 0/1 return a validation error instead.What did you see instead?
"msg":"http client error"
What version did you use?
Version:
v0.10.0
/master
The text was updated successfully, but these errors were encountered: