In Zabbix, it is possible to create a maintenance period for the times we need to do some maintenance on our servers. It would be awkward to get a bunch of notifications when we know that our servers are down for a certain period of time. In Zabbix we can split maintenance periods in two major types, maintenance with and without data collection.
For this recipe, we need our Zabbix server with administrator rights. We also need at least one host set up and added in our Zabbix configuration. We will make use of this host to show you how to add a host or a group in maintenance period.
No data collection
.Daily
, Weekly
, or Monthly
. In this example, I have chosen Weekly
.From the Maintenance tab, we have selected the start and the end day of our maintenance period. We also told Zabbix to collect or not collect data.
We then went to the Periods tab. In this tab, we were able to do some more fine-tuning in our maintenance schedule, for example, recurring periods on a weekly basis.
From our Periods tab, we went to the Hosts & Groups tab where we selected all hosts and / or host groups that we wanted to place in maintenance.
During a maintenance period With data collection
, Zabbix will process triggers and create events as usual. So when we reboot servers or shutdown services, we will get notified about those events. If you would like to skip notifications during the maintenance period, then we have to put the Maintenance status = not in maintenance
in the trigger action by navigating to Configuration | Actions | Triggers.
If a trigger generates an event during the maintenance period, then once the maintenance period has ended, an additional event will be created. This is to make sure that if a problem happened during the maintenance period, you will get notified about the problem if it is not resolved even after the maintenance period is over.
Remember that there are two types of maintenance periods:
With data collection
: Data will be collected by the server during maintenance, triggers will be processed, and event will be created.
No data collection
: Data will not be collected by the server during maintenance period. Last check in latest data will stay at the same time.