OpenVZ node monitoring through Zabbix.
OpenVZ containers monitoring through Zabbix.
Template "Template OpenVZ Node" finds all containers, creates new hosts and apply template "Template OpenVZ CT" on them.
perl, sudo, zabbix-agent.
- copy vzdiscover.pl, ubcfault.sh and vzlist.sh to /etc/zabbix/
- copy zabbix_agentd.d/openvz.conf to /etc/zabbix/zabbix_agentd.d/
- copy sudoers.d/zabbix to /etc/sudoers.d/
- chown root:root /etc/sudoers.d/zabbix ; chmod 440 /etc/sudoers.d/zabbix
- chmod 755 /etc/zabbix/vzdiscover.pl /etc/zabbix/ubcfault.sh /etc/zabbix/vzlist.sh
- restart zabbix-agent daemon.
- import "zbx_templates/Template OpenVZ CT.xml" (or Template OpenVZ CT (v 3.x).xml) and "zbx_templates/Template OpenVZ Node.xml" into your templates.
- apply template "Template OpenVZ Node" to OpenVZ hardware node (otherwise known as host system).
- enjoy.
You can tune macros (like {$PROC_CT_WARN}) in template "Template OpenVZ CT", or set macros to parent host (hardware node), it will be inherited to auto-discovered CT host. This is zabbix restriction.
Template Template OpenVZ CT (v 3.x).xml - new version with changed trigger "too many processes" to prevent flapps.
- copy ctextcheckdiscover.pl ctextcheck.sh to /etc/zabbix/
- create directory /etc/zabbix inside CT and copy ctextcheck/ct_check.sh there.
- edit ct_check.sh to realise custom checks.
- enable discovery rule "discover container external checks" in CT nodes.
- enjoy.
If you have problem with import template "Template OpenVZ Node.xml", try use template without discovery rule and add it later manually. #2