Update metric type based on definition, add detailed description
- Update metric type based on definition - Add detailed description for metric type if defined
This commit is contained in:
parent
81255d0b27
commit
2ffac2254c
@ -2,7 +2,7 @@
|
|||||||
{% if metric.help is defined and metric.help is not empty %}
|
{% if metric.help is defined and metric.help is not empty %}
|
||||||
# HELP {{ key }} {{ metric.help }}
|
# HELP {{ key }} {{ metric.help }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
# TYPE {{ key }} gauge
|
# TYPE {{ key }} {% if metric.type is defined and metric.type is not empty %}{{ metric.help }}{% else %}gauge{% endif %}
|
||||||
{% for subkey, submetric in metric.submetrics %}
|
{% 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 }}
|
{{ 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 %}
|
||||||
|
Loading…
Reference in New Issue
Block a user