Jeroen De Meerleer
069e550a3f
Improved handling of submetrics for better data organization and presentation. Updated metric values based on retrieved data, ensuring accurate representation in the metrics template file.
10 lines
482 B
Twig
10 lines
482 B
Twig
{% for key, metric in config %}
|
|
{% if metric.help is defined and metric.help is not empty %}
|
|
# HELP {{ key }} {{ metric.help }}
|
|
{% endif %}
|
|
# TYPE {{ key }} gauge
|
|
{% 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 %}
|
|
|
|
{% endfor %} |