Upper Case Custom Labels not accepting.
Description
How to test
FB: https://github.com/Percona-Lab/pmm-submodules/pull/3354#issuecomment-1662407463
Custom labels field should now accept keys and values based on prometheus guidelines.
https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels.
In short keys must match following regex [a-zA-Z_][a-zA-Z0-9_]*
, value can contain any unicode characters. In our case spaces (used to separe labels) and colons (used as key/value separator) are disallowed in values.
How to document
Attachments
- 02 Aug 2023, 05:40 PM
- 02 Aug 2023, 05:39 PM
- 02 Aug 2023, 09:22 AM
- 02 Aug 2023, 09:14 AM
- 02 Aug 2023, 09:14 AM
Activity
saikumar.vs August 22, 2023 at 2:54 PM
verified, refer testcase section for more info.
Naresh August 3, 2023 at 9:55 AM
@Roma Novikov Great news! Many thanks for the fix.

Roma Novikov August 3, 2023 at 9:08 AM
@Matej Kubinec , Prom limitations - is exactly what I would expect here, as we use labels the same way Prom uses so - This is The way)
@Naresh , you got lucky, as we just discussed the same topic in the context of another task we are working on, so this was easy to fix while we were on track.
Post likely pmm 2.40, this fix will be landed.
Naresh August 2, 2023 at 5:42 PM
@Matej Kubinec @Roma Novikov
Thanks so much for the quick fix.
I have missed the below scenarios. Even if I use _ or - then it's not allowing to create the custom labels.
EX1: test-test:test
EX: test_test:test
Matej Kubinec August 2, 2023 at 2:34 PM
@Roma Novikov
Restrictions will be set based on the prometheus data model - https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels.
In short keys must match following regex [a-zA-Z_][a-zA-Z0-9_]*
, value can contain any unicode characters. In our case spaces (are used to separe labels) and colons (used as key/value separator) are disallowed in values.
While adding a remote MySQL Instance then we are unable to add the Upper-case custom Labels, but lower-case custom labels are working fine.
Upper Case:
Lower Case: