nagios 监控 keepalived 进程

沙漠qiji 发布于 2014/04/28 17:45
阅读 1K+
收藏 1

脚本为以下
#!/bin/sh
lvs_is=`ps aux | grep keepalived |grep -v grep |wc -l`
if [ $lvs_is != 3 ]
then
   echo "Critical -lvs process num is $lvs_is"
   exit 2
fi
echo "OK -lvs process count is $lvs_is"
exit 0

在nagios服务器上调用
 /usr/local/nagios/libexec/lvs_live.sh -H 192.168.0.193  check_keepalived
出现
Critical -lvs process num is 5
OK -lvs process count is 3
Critical -lvs process num is 2
等等  而且无论keepalived 是否运行,进程数都在不停的变化 
哪里错了??

以下是问题补充:

@沙漠qiji:nrpe中 command[check_keepalived]=/usr/local/nagios/libexec/lvs_live.sh 以修改 (2014/04/28 17:47)
加载中
0
沙漠qiji
沙漠qiji

该问题已经用nrpe解决

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部
返回顶部
顶部