Verified Commit 12e05ae1 authored by Florian Pritz's avatar Florian Pritz
Browse files

zabbix: Ignore failed syncrepo services


Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent caa7b0c4
......@@ -2,10 +2,13 @@
import dbus
ignore = set(['syncrepo.service', 'syncrepo_arch32.service'])
bus = dbus.SystemBus()
systemd1 = bus.get_object('org.freedesktop.systemd1', '/org/freedesktop/systemd1')
systemd1_manager = dbus.Interface(systemd1, dbus_interface='org.freedesktop.systemd1.Manager')
units = systemd1_manager.ListUnits()
for unit in filter(lambda u: u[3] == 'failed', units):
for unit in filter(lambda u: u[3] == 'failed' and u[0] not in ignore, units):
print(unit[0])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment