2024-06-03 23:47:40 +02:00
|
|
|
{% for key, metric in config %}
|
|
|
|
{% if metric.help is defined and metric.help is not empty %}
|
|
|
|
# HELP {{ key }} {{ metric.help }}
|
2024-06-03 19:48:39 +02:00
|
|
|
{% endif %}
|
2024-06-05 08:22:08 +02:00
|
|
|
# TYPE {{ key }} {% if metric.type is defined and metric.type is not empty %}{{ metric.help }}{% else %}gauge{% endif %}
|
2024-06-13 13:40:35 +02:00
|
|
|
|
2024-06-03 23:47:40 +02:00
|
|
|
{% for subkey, submetric in metric.submetrics %}
|
|
|
|
{{ key }}{% if submetric.labels is defined and submetric.labels is not empty %}{{ '{' }}{% for label, value in submetric.labels %}{{ label }}="{{ value }}"{% if not loop.last %},{% endif %}{% endfor %}{{ '}' }}{% endif %} {{ submetric.value }}
|
|
|
|
{% endfor %}
|
2024-06-03 19:48:39 +02:00
|
|
|
|
|
|
|
{% endfor %}
|