-
Notifications
You must be signed in to change notification settings - Fork 834
Closed
Description
Test script:
#!/usr/bin/env python2
from BaseHTTPServer import HTTPServer
from prometheus_client import Counter
from prometheus_client import MetricsHandler
counter = Counter('cronjobs_total', 'All cronjobs', ['server', 'username', 'command'])
counter.labels('someserver', 'someaccount', 'cd "/foo/bar/"').inc()
server_address = ('', 7700)
httpd = HTTPServer(server_address, MetricsHandler)
httpd.serve_forever()When you add this as a Prometheus endpoint you will get a scraping error:
text format parsing error in line 3: unexpected end of label value %!q(*string=0xc20a6bc040)
The generated output when visiting port 7700 shows unespaced double quotes:
# HELP cronjobs_total All cronjobs
# TYPE cronjobs_total counter
cronjobs_total{username="someaccount",command="cd "/foo/bar/"",server="someserver"} 1.0
Metadata
Metadata
Assignees
Labels
No labels