Page 1 of 1
How to check ICMP/HTTP from remote NRPE
Posted: Thu Oct 27, 2016 7:12 am
by dlukinski
Please advice how to use remote NRPE client (Linux agent) to check on hosts availability via ICMP/HTTP or any other plugins?
modGearman would not work in this case, so we need to know how remote NRPE client could be used as a relay to report on host being inaccessible from the location that NRPE/Linux client resides?
Re: How to check ICMP/HTTP from remote NRPE
Posted: Thu Oct 27, 2016 10:23 am
by avandemore
Does this document help? It walks through installation and setup with some examples:
NRPE Documentation
Re: How to check ICMP/HTTP from remote NRPE
Posted: Fri Oct 28, 2016 11:15 am
by dlukinski
avandemore wrote:Does this document help? It walks through installation and setup with some examples:
NRPE Documentation
This is not what we need
Essentially we want to know how to configure in XI and run check_http (example) on remote host, monitoring another remote host, so that when that other remote host is down or not accessible, we would get an alert
Re: How to check ICMP/HTTP from remote NRPE
Posted: Fri Oct 28, 2016 1:01 pm
by avandemore
Assume the following:
XI runs on HostA
There is some NRPE intermediary HostB
Target service(check_http) is HostC
If HostC goes down, HostA will send an alert about HostC with HostB relaying the required info.
Does this describe what you are asking? If not, can you correct it so it explicitly details what you want?
Re: How to check ICMP/HTTP from remote NRPE
Posted: Fri Oct 28, 2016 1:29 pm
by dlukinski
avandemore wrote:Assume the following:
XI runs on HostA
There is some NRPE intermediary HostB
Target service(check_http) is HostC
If HostC goes down, HostA will send an alert about HostC with HostB relaying the required info.
Does this describe what you are asking? If not, can you correct it so it explicitly details what you want?
Yes
Host A - Nagios XI
Host B - some remote host running checks based of standard Linux Agent plugins (check_http)
Host C - host under monitoring by those checks
Re: How to check ICMP/HTTP from remote NRPE
Posted: Fri Oct 28, 2016 1:53 pm
by dwhitfield
We're running up against our EOD here, so I don't have time to rewrite this for HTTP, but I think this should work as an example:
Here is a generic command that I will use as an example:
Code: Select all
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
So Host(C) will have this in their nrpe.cfg file.
On Host(B) you will have this in the nrpe.cfg file:
Code: Select all
command[check_remote]=/usr/local/nagios/libexec/check_nrpe -H $ARG1$ -t 30 -c $ARG2$
Then from XI you would execute the following command:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H host_B_address -t 30 -c check_remote host_C_address check_load
XI will request Host(B) to execute a check which in turn requests Host(C) to execute the check check_load
Re: How to check ICMP/HTTP from remote NRPE
Posted: Fri Oct 28, 2016 1:54 pm
by mcapra
You could define the following command in /usr/local/nagios/etc/nrpe.cfg:
Code: Select all
command[check_http]=/usr/local/nagios/libexec/check_http $ARG1$
Restart the nrpe/xinetd service, then execute checks from Nagios XI like so (where 192.168.67.97 is the NRPE intermediary):
Code: Select all
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.97 -c check_http -a "-H www.google.com"
HTTP OK: HTTP/1.1 200 OK - 10922 bytes in 0.137 second response time |time=0.136902s;;;0.000000 size=10922B;;;0
Re: How to check ICMP/HTTP from remote NRPE
Posted: Tue Dec 20, 2016 9:15 am
by dlukinski
mcapra wrote:You could define the following command in /usr/local/nagios/etc/nrpe.cfg:
Code: Select all
command[check_http]=/usr/local/nagios/libexec/check_http $ARG1$
Restart the nrpe/xinetd service, then execute checks from Nagios XI like so (where 192.168.67.97 is the NRPE intermediary):
Code: Select all
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.97 -c check_http -a "-H www.google.com"
HTTP OK: HTTP/1.1 200 OK - 10922 bytes in 0.137 second response time |time=0.136902s;;;0.000000 size=10922B;;;0
Thank you, please close this support thread