forked from http://www.devops-share.com/put-host-in-zabbix-maintenance-with-python
Install the python-yaml package
apt-get install python-yaml
Replace username, password and server in the config file /etc/zabbix/zabbix_maintenance.yml.
user: "username"
password: "password"
server: "zabbix.example.com"
Optional
hostname: "<fqdn>"
python zabbix_maintenance.py <start|stop> [hours] [fqdn]
If no time value specified, the default is used (1 hour)
If no fqdn specified, the local host name is used
python zabbix_maintenance.py start
python zabbix_maintenance.py start 3
python zabbix_maintenance.py start 3 zabbix.example.com
python zabbix_maintenance.py stop
python zabbix_maintenance.py stop 3 zabbix.example.com
python zabbix_maintenance.py check
python zabbix_maintenance.py check zabbix.example.com