puppet, nagios, ganglia でプロセス数監視 (2)
実際、puppet, nagios, ganglia でプロセス数監視を作ってみて、上手くいくことを確認した。 ww
nagiosの追加設定: define service{ use generic-service hostgroup_name fedora-virt service_description ganglia_proc_sendmail check_command check_ganglia_proc_sendmail!0!0 } define command{ command_name check_ganglia_proc_sendmail command_line /etc/nagios/libexec/check_ganglia.py -h $HOSTADDRESS$ -m proc_sendmail -w $ARG1$ -c $ARG2$ }
puppetの追加設定: class fedora11_ganglia_cron { cron { "fedora11_ganglia_sendmail" : ensure => present, command => '/usr/bin/gmetric -t uint16 -n proc_sendmail -v $(/bin/ps -ef | grep sendmail | grep -v grep | wc -l)', user => 'root', minute => '*/5', } }