Duplicated timeseries in CollectorRegistry #924
Unanswered
jednoprsak
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hello, typically you will want to create a single |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to make my metrics and write it inside one file using textfile_collector, but the problem is, that it tells me ''Duplicated timeseries in CollectorRegistry: {'htcondor_jobstatus'}'.
Here is the function:
Here is the command line output:
Traceback (most recent call last):
File "./htcondor_exporter.py", line 308, in
make_job_metrics()
File "./htcondor_exporter.py", line 147, in make_job_metrics
g = Gauge(metric_name, 'metric_label', JobsAd_labels, registry=registry).labels(*args_list).set(jobs[jobid][metric])
File "/usr/local/bin/prometheus_custom_plugins/htcenv/lib/python3.6/site-packages/prometheus_client/metrics.py", line 373, in init
_labelvalues=_labelvalues,
File "/usr/local/bin/prometheus_custom_plugins/htcenv/lib/python3.6/site-packages/prometheus_client/metrics.py", line 143, in init
registry.register(self)
File "/usr/local/bin/prometheus_custom_plugins/htcenv/lib/python3.6/site-packages/prometheus_client/registry.py", line 45, in register
duplicates))
ValueError: Duplicated timeseries in CollectorRegistry: {'htcondor_jobstatus'}
My question is: How to write many metrics with same names, but different labels and values inside one file using textfile collector?
Thank you for any responses
Lukáš Míča
Beta Was this translation helpful? Give feedback.
All reactions