If disk name has '.', replace with '_'

graphite uses . as the separator between different metric parts

see #348
This commit is contained in:
Girish Ramakrishnan
2022-05-27 15:56:14 -07:00
parent 723453dd1c
commit 5ee9feb0d2
2 changed files with 2 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ def read():
for d in disks:
device = d[0]
if 'devicemapper' in d[1] or not device.startswith('/dev/'): continue
instance = device[len('/dev/'):].replace('/', '_') # see #348
instance = device[len('/dev/'):].replace('/', '_').replace('.', '_') # see #348
try:
st = os.statvfs(d[1]) # handle disk removal