Monitoring remote hosts using NRPE on another remote host
Monitoring remote hosts using NRPE on another remote host
Hello All,
What I want to implement is as below :
I have a nagios monitoring server (Say A). I have a remote linux host with NRPE installed on it(Say B). Now I want to monitor another remote linux/windows host (Say C) using the NRPE installed on Host B.
Is this possible for linux and windows server? If yes, then please please provide me the the steps / links on how to get this configured.
Thanks in advance for any help you provide.
What I want to implement is as below :
I have a nagios monitoring server (Say A). I have a remote linux host with NRPE installed on it(Say B). Now I want to monitor another remote linux/windows host (Say C) using the NRPE installed on Host B.
Is this possible for linux and windows server? If yes, then please please provide me the the steps / links on how to get this configured.
Thanks in advance for any help you provide.
Re: Monitoring remote hosts using NRPE on another remote hos
I can't say we have documentation exactly for this scenario, but in this case you would just define the NRPE commands on the NRPE host (B) to be whatever check you would like to run against (C), then call this as usual from Core (A).
Former Nagios employee
Re: Monitoring remote hosts using NRPE on another remote hos
Thank you for your reply tmcdonald.
So as I understand, I need to add some service definitions on Host(B) to check the services on Host(C) using NRPE on Host(B) itself.
Can you please provide me an example of a service definition that can be added on Host(B) to check the services on Host(C) using the NRPE service on Host(B) itself?
Thanks for your help in advance!
So as I understand, I need to add some service definitions on Host(B) to check the services on Host(C) using NRPE on Host(B) itself.
Can you please provide me an example of a service definition that can be added on Host(B) to check the services on Host(C) using the NRPE service on Host(B) itself?
Thanks for your help in advance!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Monitoring remote hosts using NRPE on another remote hos
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 Core(A) you would execute the following command:
Core(A) will request Host(B) to execute a check which in turn requests Host(C) to execute the check check_load
Code: Select all
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
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 Core(A) 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Monitoring remote hosts using NRPE on another remote hos
Got ya!! Box293...
And if we have to do this check for a windows server ?
Assuming that the nagios server(Host A) and remote windows server (Host B) are in same network. Remote windows server(Host C) is in a different network. How would we be able to monitor the stats on (Host C) using the NSCP++ client on (Host B).
Can anyone of you please guide me on achieving results on the above situation?
And if we have to do this check for a windows server ?
Assuming that the nagios server(Host A) and remote windows server (Host B) are in same network. Remote windows server(Host C) is in a different network. How would we be able to monitor the stats on (Host C) using the NSCP++ client on (Host B).
Can anyone of you please guide me on achieving results on the above situation?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Monitoring remote hosts using NRPE on another remote hos
It's basically the same concept but I'm unsure how to get NSClient++ to run check_nrpe from Host(B). I'm sure NSClient++ has the ability to do this, just not sure what it is.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Monitoring remote hosts using NRPE on another remote hos
Thank you very much Box293 and tmcdonald for ur help.
I was able to implement indirect checks using the guidelines provided by you.
Now I wanna try to do indirect host check using NSCP++ client on windows servers.
Could you please assist me with any other guidelines to achieve the indirect checks using NSCP++?
I was able to implement indirect checks using the guidelines provided by you.
Now I wanna try to do indirect host check using NSCP++ client on windows servers.
Could you please assist me with any other guidelines to achieve the indirect checks using NSCP++?
Re: Monitoring remote hosts using NRPE on another remote hos
Can you give us an example of what type of checks you want to implement? Are you talking about running indirect checks against Windows or Linux machines? What metrics would you like to monitor?Could you please assist me with any other guidelines to achieve the indirect checks using NSCP++?
Be sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Monitoring remote hosts using NRPE on another remote hos
OK So I did some research on this and came up with this article which is exactly what you want to do.Apurv wrote:Thank you very much Box293 and tmcdonald for ur help.
I was able to implement indirect checks using the guidelines provided by you.
Now I wanna try to do indirect host check using NSCP++ client on windows servers.
Could you please assist me with any other guidelines to achieve the indirect checks using NSCP++?
Code: Select all
http://www.medin.name/blog/2012/12/16/putting-some-client-into-nsclient/
FIRST I will make it clear, Host(B) is using NSClient++ 0.4.1.105 for my tests below.
My host(B) is 10.25.14.2 and will respond to a check_nrpe request:
Code: Select all
check_nrpe -H 10.25.14.2
I (0,4,1,105 2014-04-28) seem to be doing fine...
Code: Select all
check_nrpe -H 10.25.14.1
I (0,4,1,73 2012-12-17) seem to be doing fine...
Logon to the windows server Host(B)
Open a command prompt
Code: Select all
cd "\Program Files\NSClient++\"
nscp client -M NRPEClient -H 10.25.14.1
lots of output which ends with:
I (0,4,1,73 2012-12-17) seem to be doing fine...
Lets do a real check.
Code: Select all
nscp client -M NRPEClient -H 10.25.14.1 -c CheckCPU --arguments warn=80 crit=90 time=1m time=5m time=15m
lots of output which ends with:
OK CPU Load ok.|'1m'=2%;80;90 '5m'=0%;80;90 '15m'=0%;80;90
Logon to the windows server Host(B)
Open a command prompt
Code: Select all
cd "\Program Files\NSClient++\"
nscp settings --activate-module NRPEClient
nscp service --stop
nscp service --start
Code: Select all
check_nrpe -H 10.25.14.2 -c nrpe_query -a host=10.25.14.1 query-command=CheckCPU query-arguments="warn=80" query-arguments="crit=90" query-arguments="time=1m" query-arguments="time=5m" query-arguments="time=15m"
Which should output:
OK CPU Load ok.|'1m'=0%;80;90 '5m'=0%;80;90 '15m'=0%;80;90
-a host=10.25.14.1 = Host(C)
It's a simple as that. Even I learnt something new today
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Monitoring remote hosts using NRPE on another remote hos
Wow!!!!!! Box293..... Ur way tooo good with nagios...
Thanks for the above reply... Now I have learnt how to perform an indirect check from nagios server to a windows server...
Do u have any idea about using graphite to generate real time graphs? If yes, then I would like to know how to implement graphite to generate real time graphs using nagios data.
Counting on you.... Thanks for your help in advance....
Thanks for the above reply... Now I have learnt how to perform an indirect check from nagios server to a windows server...
Do u have any idea about using graphite to generate real time graphs? If yes, then I would like to know how to implement graphite to generate real time graphs using nagios data.
Counting on you.... Thanks for your help in advance....