def _sanitize(self, s):
        return re.sub("[^\w-]", "_", s)
Sanitize the name of a metric to remove unwanted chars
dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/nagiosperfdata/nagiosperfdata.py/NagiosPerfdataCollector._sanitize