Skip to content

Commit e7cc985

Browse files
committed
Keep running if zabbix is temporarily down
1 parent 2c04443 commit e7cc985

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

monitor/arduino_monitor.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ def process(self, msg, kwargs):
8181

8282
# Send to Zabbix, if --host is present
8383
if args.host:
84-
sender.send([
85-
ZabbixMetric(args.host, args.humidity_item, str(hum)),
86-
ZabbixMetric(args.host, args.temperature_item, str(temp)),
87-
])
84+
try:
85+
sender.send([
86+
ZabbixMetric(args.host, args.humidity_item, str(hum)),
87+
ZabbixMetric(args.host, args.temperature_item, str(temp)),
88+
])
89+
except:
90+
log.exception("Cannot send metric to Zabbix")

0 commit comments

Comments
 (0)