r/linuxadmin • u/Silva-Engineer • Oct 28 '26
How does your monitoring tell a planned shutdown from an unplanned one?
On GCP, a preempted Spot VM ends up TERMINATED by default, same as a VM someone stopped on purpose. Paging on every stopped VM wakes people up for planned shutdowns, but ignoring them hides the preemptions. Do you make people schedule downtime first, check the audit log for who stopped it, or page anyway and let the owner ack?
0
Upvotes
11
u/PlannedObsolescence_ Oct 29 '26
This is an LLM generated post from an engagement bait bot, not a human.
8
u/Loveangel1337 Oct 28 '26
Any alerting tool worth their salt should have a silence option. Set the alert to muted for the duration of the maintenance, done, the alert fires as normal, gets silenced, so no-one gets pinged.
Of if you know it's not gonna alert anyone important (e.g. it just goes to a random slack channel no-one reads), you can let it fire every once in a while to test there's an alert going somewhere.
2
u/xercool Oct 28 '26
For the GCP part, look for protoPayload.methodName="compute.instances.preempted" in Cloud Logging, scoped to the instance and time window. TERMINATED alone doesn't tell you why it stopped. Google documents the event here: https://docs.cloud.google.com/compute/docs/logging/audit-logging
I'd still use a maintenance window with an expiry for planned work. For Spot, I'd record individual preemptions but page when replacement capacity doesn't come back within the workload's recovery target, or the service is unhealthy. Otherwise normal Spot churn wakes someone up even when the workload has already recovered.
1
u/nem8 Oct 28 '26
Downtime/maintenance as others have mentioned. We don't have it automated, but its part of change control to do it if necessary.
1
u/IridescentKoala Oct 29 '26
You shouldn't be paging for shut downs in the first place.
1
u/michaelpaoli Oct 29 '26
It's scheduled, you go into the monitoring, you don't stop it but you suppress the alerting/alarming - for a fixed period of time - you set when that starts (or "now"), and when it ends (and you can later change the ends - e.g. if the work is completed ahead of schedule. And along with that suppression of alert/alarm, you put in the reason, e.g.: "Approved Change Request #..., scheduled maintenance, major upgrade, replace ... with ...". That's it. Nobody gets paged or the like. If somebody gets paged, oncall gets to tell 'em they f*cked up and failed to suppress the alarm/alert before starting scheduled work - if it's a chronic problem, management gets looped in.
That's it. And during outage, anybody looks at the outage, it clearly says it's down, but it's also clearly flagged as not alertinug/alarming (suppressed), and typically with the note available there, or indicator that there's a note, and that note is as most a single click away.
That's how one does it. If that's not the case, something is messed up with one's processes or infrastructure. Not rocket science, been doing it for decades, and the generally process goes back far beyond that.
1
u/bufandatl Oct 29 '26
For that Zabbix for example has maintenance periods you can setup. If it’s planned you put in the maintenance and alerts are suppressed.
1
u/Mr_Enemabag-Jones Oct 28 '26
Most decent monitoring tools have a blackout option to silence alerts for the duration of the submitted blackout window
1
u/Boring_Elderberry151 Oct 28 '26
Downtime window unless you like pain and hate your life lol
0
u/natebc Oct 28 '26
We have automation following CAB approval that puts the service in question into maintenance mode.