bundles/smartd: ignore non-digit values in telegraf stats
This commit is contained in:
parent
471e2ba6f6
commit
e9ee2039d5
1 changed files with 6 additions and 0 deletions
|
@ -29,10 +29,16 @@ for device in devices:
|
|||
|
||||
if 'nvme_smart_health_information_log' in json:
|
||||
for k, v in json['nvme_smart_health_information_log'].items():
|
||||
if not str(v).isdigit():
|
||||
continue
|
||||
|
||||
telegraf_output.add(f'{k}={v}')
|
||||
|
||||
if 'ata_smart_attributes' in json:
|
||||
for entry in json['ata_smart_attributes']['table']:
|
||||
if not str(entry['raw']['value']).isdigit():
|
||||
continue
|
||||
|
||||
telegraf_output.add('{}={}'.format(
|
||||
entry['name'],
|
||||
entry['raw']['value'],
|
||||
|
|
Loading…
Reference in a new issue