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

use new plugin on my clients

Post by baber »

dear all

Hi

i have downloaded hplog plugin from here

https://exchange.nagios.org/directory/P ... og/details

when i run this plugin on my physical server it work excellent

Code: Select all

./check_hplog -type temp id 1 -w 40 -c 50
TEMP OK - id=1 temp=15

but now when i want run this throught nagios not work correctly i have added this line to my .cfg file on nagios server

Code: Select all

define service{
        use                                  generic-service
        host_name                      npmbsrv
        service_description        Temprature Fan Power
        check_command             check_nrpe!check_hplog
}
and add this to nrpe.cfg file on physical server

Code: Select all

command[check_hplog]=/usr/local/nagios/libexec/check_hplog -type temp -id 1 -w 40 -c 50
now on nagios monitoring show this error

unknown : TEMP UNKNOWN - id=1 temp=


what is my problem ? how can solve this ?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: use new plugin on my clients

Post by lmiltchev »

Did you add the following line to the sudoers on the remote server?

Code: Select all

nagios      ALL=NOPASSWD: /sbin/hplog
Be sure to check out our Knowledgebase for helpful articles and solutions!
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: use new plugin on my clients

Post by baber »

so thanks my problem has been solved

i have oher problem with other plugin now .
i want use check_http plugin or check_ping on my nagios server and chk different ips that are my ILO server for example i want chk this IP 10.1.1.1 from my nagios server that has ping or not

i have this but don't know how use specific IP for chk ping or check_http

Code: Select all

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

User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: use new plugin on my clients

Post by lmiltchev »

This should work. Can you also show us the configs for the "check_ping" command, and the "nn" host?
Be sure to check out our Knowledgebase for helpful articles and solutions!
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: use new plugin on my clients

Post by baber »

lmiltchev wrote:This should work. Can you also show us the configs for the "check_ping" command, and the "nn" host?
when i run this

Code: Select all

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

this ping local ip (nagios ip ) but i want ping this ip 10.10.1.1 from nagios server
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: use new plugin on my clients

Post by rkennedy »

Please show us the host definition for nn and the check_ping definition. This will help us track down what's going on.
Former Nagios Employee
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: use new plugin on my clients

Post by baber »

rkennedy wrote:Please show us the host definition for nn and the check_ping definition. This will help us track down what's going on.

this use on nrpe.cfg

Code: Select all

command[check_ping]=/usr/local/nagios/libexec/check_ping $ARG1$
and this .cfg file

Code: Select all

define service{
        use                             generic-service      
        host_name                       nn
        service_description             PING
        check_command                   check_ping!100.0,20%!500.0,60%
        }
but when use this it just ping nagios server but i want 10.1.1.1 ip from nagios server
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: use new plugin on my clients

Post by rkennedy »

We need to see your host definition. This is where the address will be set for nn.

The command you posted is for NRPE, which isn't needed, because check_ping will do exactly what you want.

Code: Select all

Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
 [-p packets] [-t timeout] [-4|-6]
Former Nagios Employee
baber
Posts: 308
Joined: Wed Oct 21, 2015 4:39 am

Re: use new plugin on my clients

Post by baber »

rkennedy wrote:We need to see your host definition. This is where the address will be set for nn.

The command you posted is for NRPE, which isn't needed, because check_ping will do exactly what you want.

Code: Select all

Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
 [-p packets] [-t timeout] [-4|-6]

ok but not work correctly now can you say me how can ping 10.10.1.1 from nagios server with check_ping
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: use new plugin on my clients

Post by rkennedy »

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.
Former Nagios Employee
Locked