nagios(centreon)监控lvs
客户端配置:
让nagios账户有权限查看ipvsadmin
vim /etc/sudoers
[root@SSAVL2318 etc]# visodu /etc/sudoers
加入 nagios ALL=(ALL) NOPASSWD: ALL
# Defaults requiretty
[root@SSAVL2318 libexec]# pwd
/usr/local/nagios/libexec
[root@SSAVL2318 libexec]# chmod +x check_lvs.sh
[root@SSAVL2318 etc]# pwd
/usr/local/nagios/etc
修改nrpe.cfg
command[check_lvs]=/usr/bin/sudo /usr/local/nagios/libexec/check_lvs
[root@SSAVL2475 libexec]# service xinetd start
Starting xinetd: [ OK ]
[root@SSAVL2475 libexec]# ps -ef |grep xinetd
root 27293 1 0 16:41 ? 00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root 27483 27089 0 16:42 pts/3 00:00:00 grep xinetd
[root@SSAVL2475 libexec]#
未完待续