Page 1 of 2
use new plugin on my clients
Posted: Thu Sep 22, 2016 12:07 pm
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 ?
Re: use new plugin on my clients
Posted: Thu Sep 22, 2016 12:26 pm
by lmiltchev
Did you add the following line to the sudoers on the remote server?
Re: use new plugin on my clients
Posted: Thu Sep 22, 2016 1:23 pm
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%
}
Re: use new plugin on my clients
Posted: Thu Sep 22, 2016 2:04 pm
by lmiltchev
This should work. Can you also show us the configs for the "check_ping" command, and the "nn" host?
Re: use new plugin on my clients
Posted: Thu Sep 22, 2016 2:55 pm
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
Re: use new plugin on my clients
Posted: Thu Sep 22, 2016 2:58 pm
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.
Re: use new plugin on my clients
Posted: Thu Sep 22, 2016 3:10 pm
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
Re: use new plugin on my clients
Posted: Thu Sep 22, 2016 3:25 pm
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]
Re: use new plugin on my clients
Posted: Thu Sep 22, 2016 3:36 pm
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
Re: use new plugin on my clients
Posted: Thu Sep 22, 2016 3:51 pm
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.