I have created custom service monitor by using "User Parameter"
In Agent config file i placed below line
UserParameter=service.status[*],/etc/init.d/$1 status > /dev/null 2>&1; echo $?
Now i created Items dhcpd, radiusd , named with below keys
service.status[dhcpd]
serviice.status[radiusd]
service.status[named]
All services are running on System, so all should return Value "0". But unfortunately only dhcpd is giving value 0. radisud and named is showing value 2
I dont know whats the issue.I trun this command locally which is giving
/etc/init.d/radiusd status > /dev/null 2>&1; echo $?
It return 0
I also queried from zabbix agent directly
/usr/local/zabbix/sbin/zabbix_agentd -t service.status[radiusd]
service.status[] [t|0]
Which also return 0
However Zabbix Frontend and Debug level logs of zabbix agent is showing value 2
25455:20110218:095656.006 Requested [service.status[dhcpd]]
25455:20110218:095656.039 Run remote command [/etc/init.d/dhcpd status > /dev/null 2>&1; echo $?] Result [1] [0]...
25456:20110218:095657.088 Requested [service.status[radiusd]]
25456:20110218:095657.176 Run remote command [/etc/init.d/radiusd status > /dev/null 2>&1; echo $?] Result [1] [2]...
25456:20110218:095658.192 Requested [service.status[named]]
25456:20110218:095658.336 Run remote command [/etc/init.d/named status > /dev/null 2>&1; echo $?] Result [1] [2]...
Can any body help me out in this matter?
In Agent config file i placed below line
UserParameter=service.status[*],/etc/init.d/$1 status > /dev/null 2>&1; echo $?
Now i created Items dhcpd, radiusd , named with below keys
service.status[dhcpd]
serviice.status[radiusd]
service.status[named]
All services are running on System, so all should return Value "0". But unfortunately only dhcpd is giving value 0. radisud and named is showing value 2
I dont know whats the issue.I trun this command locally which is giving
/etc/init.d/radiusd status > /dev/null 2>&1; echo $?
It return 0
I also queried from zabbix agent directly
/usr/local/zabbix/sbin/zabbix_agentd -t service.status[radiusd]
service.status[] [t|0]
Which also return 0
However Zabbix Frontend and Debug level logs of zabbix agent is showing value 2
25455:20110218:095656.006 Requested [service.status[dhcpd]]
25455:20110218:095656.039 Run remote command [/etc/init.d/dhcpd status > /dev/null 2>&1; echo $?] Result [1] [0]...
25456:20110218:095657.088 Requested [service.status[radiusd]]
25456:20110218:095657.176 Run remote command [/etc/init.d/radiusd status > /dev/null 2>&1; echo $?] Result [1] [2]...
25456:20110218:095658.192 Requested [service.status[named]]
25456:20110218:095658.336 Run remote command [/etc/init.d/named status > /dev/null 2>&1; echo $?] Result [1] [2]...
Can any body help me out in this matter?
Comment