prometheus: ignore user@ units when checking for failed units (#50376)
This commit is contained in:
parent
e6a7c98ab4
commit
f910dfd327
|
@ -197,7 +197,7 @@ def units(ctn):
|
|||
s = bus.get_object("org.freedesktop.systemd1", "/org/freedesktop/systemd1")
|
||||
manager = dbus.Interface(s, "org.freedesktop.systemd1.Manager")
|
||||
units = manager.ListUnits()
|
||||
n = len([u for u in units if u[3] == "failed"])
|
||||
n = len([u for u in units if u[3] == "failed" and not u[0].startswith("user@")])
|
||||
eo_units.labels(ctn, "failed").set(n)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue