Maintenance mode flag for DB

I think this has been hinted at in various threads, but I’m not sure it’s been solved or maybe just not documented?

When I schedule a device or group for maintenance, I want all the alerting/polling for that device to be turned off till it’s out of maintenance. The alerting/polling could be separate flags but I don’t want to get off topic. The device in maintenance may or may not be “down”, but regardless, whatever I’m doing with that device shouldn’t trigger any alerts unless it’s state wasn’t planned/scheduled.

When I go poking around in the DB looking at what columns are available for say the ‘devices’ table, in my mind there should be a column that’s just a boolean; something like, “maintenance_mode” or whatever word(s) make sense. That column should then be queryable by the alert rules so that I can say, ‘do all the normal alerting stuff UNLESS the maintenance_mode flag is true’ or something to that effect.

I could write a script that queries the ‘alert_schedulables’ table and then goes and checks the ‘alert_schedulable_id’ (which, if it’s a device, would show me the device IDs) and then does a bunch of other stuff and maybe sticks something in a field I can query with the alert rules, but I’m not a seasoned coder and it would probably take me a long time to do and by the time I’m done, someone will end up saying, why didn’t you just do this ‘thing’ that takes 2 seconds.

I realize there’s a way to put a device/group into maintenance mode via API, but I don’t know if it can check to see if a device/group is in maintenance mode (or if that would really help me anyway).

At the end of the day, I would love to be able to look at the list of things that are “down” and not see things that are in maintenance mode unless I ask for it etc.

If this functionality is already there, can someone point me in the right direction because this frankly is preventing me from turning on any actual email alerting as I would just get spammed all the time because the devices in question are largely development boards and very often get ‘checked out’ by someone (that’s another project - one thing at a time).

LMK if that’s not clear - I have a tendency to ramble…

When you create a maintenance under the Alerts menu it stops any alerts generating notifications.

Does that help?

When you view a device in maintenance it has a little wrench next to it.

I mean, it’s better than not having the wrench, but when I’m looking at the down list, I really am looking for thins that are unexpectedly down and I don’t see a good way to filter for that without digging into the DB with a script of some sort which just feels like a hack and I don’t think me adding columns to the DB is something I should be doing.