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?
How to check ICMP/HTTP from remote NRPE
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: How to check ICMP/HTTP from remote NRPE
Does this document help? It walks through installation and setup with some examples:
NRPE Documentation
NRPE Documentation
Previous Nagios employee
Re: How to check ICMP/HTTP from remote NRPE
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
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: How to check ICMP/HTTP from remote NRPE
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?
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?
Previous Nagios employee
Re: How to check ICMP/HTTP from remote NRPE
Yesavandemore 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?
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
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: How to check ICMP/HTTP from remote NRPE
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:
So Host(C) will have this in their nrpe.cfg file.
On Host(B) you will have this in the nrpe.cfg file:
Then from XI you would execute the following command:
XI will request Host(B) to execute a check which in turn requests Host(C) to execute the check check_load
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,20On 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_loadXI 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
You could define the following command in /usr/local/nagios/etc/nrpe.cfg:
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
command[check_http]=/usr/local/nagios/libexec/check_http $ARG1$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;;;0Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: How to check ICMP/HTTP from remote NRPE
Thank you, please close this support threadmcapra wrote:You could define the following command in /usr/local/nagios/etc/nrpe.cfg:
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
command[check_http]=/usr/local/nagios/libexec/check_http $ARG1$
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