custom exporter - need to add timestamp to metric

175 views
Skip to first unread message

Mike Holt

unread,
Jun 26, 2022, 3:39:04 AM6/26/22
to Prometheus Users
Attempting to write a custom exporter using the python client.

I found where there was a NewMetricWithTimestamp() method with the golang version of the client, but I cant seem to find it in the python client.

Does this exist?

THanks for your time,
    Mike

Omar Khazamov

unread,
Oct 7, 2022, 5:18:26 AM10/7/22
to Prometheus Users
Same need here. 
I've tried 

usser@C02G74F9Q6LR bat-datapipeline % echo "test_metric_with_timestamp 33 1665623039" | curl --data-binary @- https://<pushgatewayURL>/metrics/job/pushgateway-job

but i get

"pushed metrics are invalid or inconsistent with existing metrics: pushed metrics must not have timestamps"

Is there a plan to add support for timestamps?



Reply all
Reply to author
Forward
0 new messages