Actions
Bug #21469
closedmgr prometheus plugin name sanitisation is buggy
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
mgr/prometheus/module.py tries to sanitise the names. Unfortunately it doesn't seem to be enough.
The problem is
The problem is
- mds_mem.dir+
- mds_mem.dir-
- mds_mem.dir
plus is illegal, and convrting all to underscore results duplicate names, hence:
--- module.py.orig 2017-09-20 00:20:57.275582142 +0200 +++ module.py 2017-09-20 00:33:42.978257980 +0200 @@ -76,7 +76,7 @@ def promethize(path): ''' replace illegal metric name characters ''' - return path.replace('.', '_').replace('-', '_') + return path.replace('.', '_').replace('-', '_').replace('+','_P_') def floatstr(value): ''' represent as Go-compatible float '''
But generally it would be better idea to replace everything which is not allowed in the label.
Updated by Dan Mick over 6 years ago
There's a set of PRs to address/change this in a different way (the existing sanitization was a half-hearted effort at best, indeed).
In fact this is a dup of #20899.
Updated by Dan Mick over 6 years ago
One of the PRs in question (maybe the only one merged, not sure): https://github.com/ceph/ceph/pull/17318
Actions