summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/mgr_module.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/pybind/mgr/mgr_module.py')
-rw-r--r--src/pybind/mgr/mgr_module.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py
index ea72df830a0..60cc2202847 100644
--- a/src/pybind/mgr/mgr_module.py
+++ b/src/pybind/mgr/mgr_module.py
@@ -308,6 +308,21 @@ class MgrModule(ceph_module.BaseMgrModule):
"""
return self._ceph_get(data_name)
+ def _stattype_to_str(self, stattype):
+
+ typeonly = stattype & self.PERFCOUNTER_TYPE_MASK
+ if typeonly == 0:
+ return 'gauge'
+ if typeonly == self.PERFCOUNTER_LONGRUNAVG:
+ # this lie matches the DaemonState decoding: only val, no counts
+ return 'counter'
+ if typeonly == self.PERFCOUNTER_COUNTER:
+ return 'counter'
+ if typeonly == self.PERFCOUNTER_HISTOGRAM:
+ return 'histogram'
+
+ return ''
+
def get_server(self, hostname):
"""
Called by the plugin to fetch metadata about a particular hostname from