Fix missing device name #3

Merged
PeterSurda merged 1 commits from missing-device-name into main 2023-11-24 07:11:53 +01:00
Showing only changes of commit 587877e5db - Show all commits

View File

@ -22,6 +22,8 @@ def read_callback():
r'[^a-zA-Z0-9]', r'[^a-zA-Z0-9]',
r'-', r'-',
dev_info.path)[1:] dev_info.path)[1:]
if not metric.plugin_instance:
metric.plugin_instance = "missing"
for counter, value in stats.counters.items(): for counter, value in stats.counters.items():
metric.type_instance = counter metric.type_instance = counter
metric.dispatch(TYPE_STATS, [value], interval=INTERVAL) metric.dispatch(TYPE_STATS, [value], interval=INTERVAL)