Page 1 of 1

How can I add plugin to Nagios Core 4.X

Posted: Mon Jun 13, 2022 6:57 am
by PhumeleleSJose96
I would like to ask, how can I add plugin (below) to the nagios core 4.X
I always got an error:

Error: Service check command 'check_hping' specified in service 'HPING3' for host 'cam_chodba' not defined anywhere
I have defined command in /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$
and host and service in /usr/local/nagios/etc/objects/switch.cfg :

define host{
use generic-switch
host_name cam_chodba
alias cam_chodba
check_command check-ping-on-port
hostgroups switches

define service{
use generic-service
host_name cam_chodba
service_description HPING3
check_command check_hping
when I'm trying run just a command, its running -->

root@onedata-desktop echatrandom:~# /home/onedata/Downloads/check_hping 200 500 10201
OK: Average response time echatspin 10 ms; packet loss 0%
Thank you for your help!

Re: How can I add plugin to Nagios Core 4.X

Posted: Tue Jun 21, 2022 5:43 am
by asafe11
your command name is check-ping-on-port
and in the service template you call check_hping
which is not defind anywhere.