Well, ZABBIX 1.1.x does not have its own scheduler (yet), anyway, sometimes we want to automagically disable monitoring on some hosts (say for scheduled maintenances windows) and re-enable this hosts at another date/time.
Thank's to cron and this little simple and stupid perl script (see at the end of this post), this can be quickly set up:
Here what you crontab should look like if you want to automatically disable the /etc/zabbix/sap-servers-list at 08:00 each monday, and reactivate monitoring on these hosts at 20:00 the same day:
Here's the script: http://sholari.free.fr/zabbix/zabbix_switchhost. I use it with 1.0 release, but it should be ok for 1.1.x release too.
Hope this'll helps some of us.
Btw, what about a 'scheduler' included in ZABBIX 1.xxx ? The kind of scheduler where it could be possible to select: hosts, hostgroups, items, actions... and decide to activate/deactivate them based on date/time and/or timeframe?
Thank's to cron and this little simple and stupid perl script (see at the end of this post), this can be quickly set up:
- grab the script and place it somewhere (/etc/zabbix/bin/ ?),
- create two links (hardlinks?) pointing at this script: zabbix_disable_hostlist and zabbix_enable_hostlist
- edit the script and place the correct-to-your-installation databasename, username, password to access the ZABBIX database
- use your-prefered-text-editor to create an host list
- use crontab to schedule auto-activation/deactivation
Here what you crontab should look like if you want to automatically disable the /etc/zabbix/sap-servers-list at 08:00 each monday, and reactivate monitoring on these hosts at 20:00 the same day:
Code:
0 8 * * 0 /etc/zabbix/bin/zabbix_disable_host /etc/zabbix/sap-servers-list 0 20 * * 0 /etc/zabbix/bin/zabbix_enable_host /etc/zabbix/sap-servers-list
Hope this'll helps some of us.
Btw, what about a 'scheduler' included in ZABBIX 1.xxx ? The kind of scheduler where it could be possible to select: hosts, hostgroups, items, actions... and decide to activate/deactivate them based on date/time and/or timeframe?

and sorry for my poor english
Comment