Getting error logs as metrics was collected before with same name and values #401
-
Just want to understand why I am seeing these error logs. I am currently connecting to snowflake and reading few tables which are updated every 1hr. Metrics are configured to scrape every 1hr to Prometheus. The values from the table might be updated or not updated very frequently. So, the label names and values might be same across multiple scrapes. How do we avoid this error? "Error gathering metrics: collected metric ..... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @wasilmasood, this error usually means that the metric was already collected within a single scrape. So it could be the metric is specified several times in the configuration. Or the query returns identical rows (which might be distinct because of the entry ID or other columns), but if we don't specify these columns in So you might want to either update SQL query (e.g. to group them) or specify additional columns to make them unique (metric name + labels combination) for the collector. |
Beta Was this translation helpful? Give feedback.
Hi @wasilmasood, this error usually means that the metric was already collected within a single scrape.
So it could be the metric is specified several times in the configuration. Or the query returns identical rows (which might be distinct because of the entry ID or other columns), but if we don't specify these columns in
values
(it can be a list of items), they become duplicates and cannot be processed.So you might want to either update SQL query (e.g. to group them) or specify additional columns to make them unique (metric name + labels combination) for the collector.