use new plugin on my clients

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: use new plugin on my clients

Post by baber »

rkennedy wrote:Here's an example -

Code: Select all

[root@localhost libexec]# ./check_ping -H baber.com -w 100.0,20% -c 500.0,60%
PING OK - Packet loss = 0%, RTA = 71.87 ms|rta=71.873001ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
You still have not posted your host definition for nn.

this is my nagios.cfg file

Code: Select all

define service{
        use                            generic-service
        host_name                      nagios
        service_description            Temprature Fan Power
        check_command                  check_nrpe!check_my_hplog
}

define service{
        use                             generic-service      
        host_name                       nagios
        service_description             PING
        check_command                   check_ping!100.0,20%!500.0,60%
        }

define service{
        use                     generic-service
        host_name               nagios
        service_description     RunLevel
        check_command           check_nrpe!check_my_runlevel      
  }

define service{
        use                     generic-service
        host_name               nagios
        service_description     Permision
        check_command           check_nrpe!check_my_perm      
  }


but now i want ping 10.1.1.1 from nagios server when i run this on nagios server is ok

Code: Select all

./check_ping -H 10.4.13.39 -w 100.0,20% -c 500.0,60%
PING OK - Packet loss = 0%, RTA = 0.53 ms|rta=0.531000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
but when i add this line to nagios.cfg file

Code: Select all

define service{
        use                             generic-service      
        host_name                       nagios
        service_description             ILO 
        check_command                   check_ping -H 10.1.1.1 -w 100.0,20% -c 500.0,60%
        }
when want restart nagios service this error appear

Code: Select all

Checking objects...
Error: Service check command 'check_ping -H 10.1.1.1 -w 100.0,20% -c 500.0,60%' specified in service 'ILO' for host 'nagios' not defined anywhere!

User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: use new plugin on my clients

Post by Box293 »

Code: Select all

define command {
       command_name                  		check_ping_alt
       command_line                  		$USER1$/check_ping -H $ARG1$ -w $ARG2$ -c $ARG3$ -p 5
}

    define service{
            use                             generic-service     
            host_name                       nagios
            service_description             ILO
            check_command                   check_ping_alt!10.1.1.1!100.0,20%!500.0,60%
            }

You'll need a custom command and then configure the service to point to that command.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked