Prometheus metric syntax: Difference between revisions
From wikinotes
Line 23: | Line 23: | ||
# regular comment | # regular comment | ||
# HELP metric_name | # HELP metric_name Does thing // description of metric | ||
# TYPE metric_name counter | # TYPE metric_name counter // counter, gauge, historgram | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Comments --> | </blockquote><!-- Comments --> |
Revision as of 16:58, 1 October 2022
Syntax used to expose metrics to prometheus.
Documentation
Comments
In addition to regular comments, doc-comments exist for
HELP
describing metricsTYPE
describing metric type# regular comment # HELP metric_name Does thing // description of metric # TYPE metric_name counter // counter, gauge, historgram
Metrics
my_metric 1.2 my_metric{hostname="foobar", user="baz"} 1.2