]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/prometheus: Fix for MDS metrics
authorjermudgeon <jhaustin@gmail.com>
Mon, 28 Aug 2017 05:26:28 +0000 (21:26 -0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 21 Sep 2017 04:12:43 +0000 (06:12 +0200)
commit8375251d150397c0097718f6e93ed38e9e89cfbb
treee31901c9e84361c1faae7283c6146182b246c4ba
parent1befcbebcbcedf398b782adfcc165038d13fc3da
mgr/prometheus: Fix for MDS metrics

MDS metrics come in these forms:

mds_mem_dir #Directories
mds_mem_dir+ #Directories opened
mds_mem_dir- #Directories closed

In this case, continuing the trend of replacing all illegal characters with '_' results in…

mds_mem_dir #Directories
mds_mem_dir_ #Directories opened
mds_mem_dir_ #Directories closed

which is palpably a bad idea.

Suggested replacement for '+' = '_plus' seems fine, and a perusal of all metrics indicate that only MDS metrics end in '-' or '+' at this time.

Replacing '-' with '_minus' is probably less good for the general case, if anyone has a better idea…

I suppose another alternative would be to change MDS metrics so they don't use 'illegal' characters, but this also seems cumbersome and would break more third parties.

Fixes: http://tracker.ceph.com/issues/20899
Signed-off-by: Jeremy H Austin <jhaustin@gmail.com>
(cherry picked from commit d719cd04b294e90ab9d440ba7d033826c069a2de)
src/pybind/mgr/prometheus/module.py