Open vl-shopback opened 2 years ago
I am seeing a similar issue. It only seems to affect counter metric types. We're on dd agent v7.32.4.
It looks like this is a bug in the V2 OpenMetrics check. When we changed back to the V1 OpenMetrics check by changing 'openmetrics_endpoint' to 'prometheus_url', then it worked as expected.
@vl-shopback @randallt When specifying the metric, can you also include the type: counter
? By default, metrics are submitted as gauge
, but counters
(and histogram
and summary
) need to be specified.
@yzhan289 Why would the type correctly be detected (I assume from the # TYPE lines in the /metrics output) by the datadog agent sometimes and not other times? I have lots of counters and histograms correctly submitted without specifying their type in the annotation yaml.
I have lots of counters and histograms correctly submitted without specifying their type in the annotation yaml.
@randallt Are these correctly submitted on V1 or V2?
I hit the same issue today, reverting to v1 helped. Thanks @randallt !
I had the same issue but it turned out I just ran into the default limit of 2000 metrics per agent. I found it out by running agent check openmetrics
at the agent hosted on the same node as the deployment/ service providing the metrics.
The limit of 2000 metrics is also documented here.
Noticed this in the docs. Since the metric name ends with _total
, you'd need to put the name without the _total
## Note: To collect counter metrics with names ending in `_total`, specify the metric name without the `_total`
## suffix. For example, to collect the counter metric `promhttp_metric_handler_requests_total`, specify
## `promhttp_metric_handler_requests`. This submits to Datadog the metric name appended with `.count`.
## For more information, see:
## https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#suffixes
##
+1, it works when removing _total
from the metric name in the Kubernetes annotation.
I think the information should be added this page, in the table mentioning <METRIC_TO_FETCH>
.
"^process_(max|openx)_fds"
On another note, can you get the above metrics? I tried, but I can't get it using ^
.
Is there a regexp I can't use?
Output of the info page (if this is a bug)
Describe what happened: can't get metric: process_cpu_seconds_total, others are okay
Describe what you expected: it should send all matched metrics to datadog
Steps to reproduce the issue:
Additional environment details (Operating System, Cloud provider, etc):