我想问一下,如何将插件(如下所示)添加到nagios核心4.X中
http://exchange.nagios.org/directory/Plugins/Network-Protocols/ICMP/chech_hping/details我总是得到一个错误:
Error: Service check command 'check_hping' specified in service 'HPING3' for host 'cam_chodba' not defined anywhere我已经在/usr/local/nagios/etc/objects/commands.cfg中定义了命令:
define command{
command_name check-ping-on-port
command_line /usr/local/nagios/libexec/check_hping $HOSTADDRESS$ 100 500 $ARG1$
}/usr/local/nagios/etc/objects/switch.cfg中的主机和服务:
define host{
use generic-switch
host_name cam_chodba
alias cam_chodba
address 1.2.3.4
check_command check-ping-on-port
hostgroups switches
}
define service{
use generic-service
host_name cam_chodba
service_description HPING3
check_command check_hping
}当我尝试只运行一个命令时,它正在运行-->
root@onedata-desktop:~# /home/onedata/Downloads/check_hping 188.123.99.171 200 500 10201
OK: Average response time 10 ms; packet loss 0%谢谢你的帮助!
发布于 2014-07-26 18:38:31
您将该命令定义为command_name check-ping-on-port,但在服务check_command check_hping中通过exe名称调用它。将第一个参数更改为check_command check-ping-on-port,这样就可以了。
define service{
use generic-service
host_name cam_chodba
service_description HPING3
check_command check-ping-on-port
}https://stackoverflow.com/questions/24970101
复制相似问题