You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Prometheus] Label name with StringAsLabel flag can contain : and result in error while sending the metrics because prometheus won't accept this.
#6757
Closed
lahsivjar opened this issue
Dec 5, 2019
· 0 comments
· Fixed by #6781
Enable StringAsLabel flag and configure Prometheus client
Send metrics which has no numeric field and contains a colon (example: a:b)
Expected behavior:
Metrics are sent without any errors
Actual behavior:
Error happens and metrics are not sent
Additional info:
The issue is that the regex check, as per the data model of Prometheus a label must contain only alphanumeric and underscore but the regex used is ^[a-zA-Z_][a-zA-Z0-9_]*
The above regex returns true for a_b:c because it matches it till b however, this label name is not acceptable by Prometheus.
The text was updated successfully, but these errors were encountered:
Relevant telegraf.conf:
System info:
Telegraf version: 1.10.5
Steps to reproduce:
a:b
)Expected behavior:
Metrics are sent without any errors
Actual behavior:
Error happens and metrics are not sent
Additional info:
The issue is that the regex check, as per the data model of Prometheus a label must contain only alphanumeric and underscore but the regex used is
^[a-zA-Z_][a-zA-Z0-9_]*
The above regex returns true for
a_b:c
because it matches it tillb
however, this label name is not acceptable by Prometheus.The text was updated successfully, but these errors were encountered: