You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
db = MySQLdb.connect(host="SET ME", user="SET ME", passwd="SET ME", db="SET ME")
cur = db.cursor()
#replace 'APT status' with the name of your service.
cur.execute("SELECT objects.name1 FROM icinga_servicestatus AS status JOIN icinga_objects AS objects ON (status.service_object_id = objects.object_id) WHERE status.current_state != 0 AND objects.name2 LIKE 'APT status'")