Actually, you can use NRPE as a proxy (this is what this thread is about) from something on a network with a external facing IP to internal machines that dont have external facing IP(s).<div><br></div><div>by adding a </div>
<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: medium; ">command[check_ping_foobar]=/usr/local/nagios/libexec/check_ping -H 10.x.x.x -w 3000.0,80% -c 5000.0,100% -p </span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: medium; ">to your remote hosts nrpe.cfg</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: medium; "><br></span></div><div><font class="Apple-style-span" face="arial, sans-serif" size="3"><span class="Apple-style-span" style="border-collapse: collapse;">nagios Core -> check_nrpe -> === SSL == -> nrpe_daemon -> internal server</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif" size="3"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif" size="3"><span class="Apple-style-span" style="border-collapse: collapse;">so you would call this from your nagios master like </span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif" size="3"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif" size="3"><div>
<span class="Apple-style-span" style="border-collapse: collapse;">define service{</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-tab-span" style="white-space:pre">        </span>use<span class="Apple-tab-span" style="white-space:pre">                        </span> generic-service</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-tab-span" style="white-space:pre">        </span>host_name<span class="Apple-tab-span" style="white-space:pre">                </span>application-foobar</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-tab-span" style="white-space:pre">        </span>service_description<span class="Apple-tab-span" style="white-space:pre">        </span>Alive Ping</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-tab-span" style="white-space:pre">        </span>check_command <span class="Apple-tab-span" style="white-space:pre">                </span>check_nrpe!check_ping_foobar</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">}</span></div><div style="border-collapse: collapse; "><br></div><div style="border-collapse: collapse; "><br></div><div style="border-collapse: collapse; ">
<br></div></font></div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Fri, Apr 8, 2011 at 3:40 PM, Chuck Payne <span dir="ltr"><<a href="mailto:terrorpup@gmail.com">terrorpup@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Fri, Apr 8, 2011 at 3:24 PM, Shawn <<a href="mailto:taaj.shawn@gmail.com">taaj.shawn@gmail.com</a>> wrote:<br>
> To add to this .. the nrpe daemon needs to be compiled with<br>
><br>
> 1. Run the configure script with the --enable-command-args<br>
> option<br>
><br>
> 2. Set the 'dont_blame_nrpe' directive in the NRPE config<br>
> file to 1.<br>
><br>
> ./check_nrpe -H x.x.x.x -c check_ping -a "-H 10.x.x.x. -w 3000.0,80% -c<br>
> 5000.0,100% -p 5"<br>
> NRPE: Command 'check_ping' not defined<br>
><br>
> So this is better than the error I was seeing -><br>
><br>
> CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for<br>
> error messages.<br>
><br>
> so instead of passing arguments with a check i decided to just make the<br>
> check command static to the server its talking to.<br>
> ex. from the nrpe.cfg of the remote host<br>
> command[check_ping_mysqlmaster]=/usr/local/nagios/libexec/check_ping -H<br>
> 10.x.x.x -w 3000.0,80% -c 5000.0,100% -p 5<br>
> this returns<br>
> ./check_nrpe -H x.x.x.x -c check_ping_patientpadmysqlmaster<br>
> PING OK - Packet loss = 0%, RTA = 0.62<br>
> ms|rta=0.622000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0<br>
> so it looks like im good to go the proxy is working.. Any tips on how to get<br>
> this to show as a unique host in nagios?<br>
><br>
><br>
><br>
> On Fri, Apr 8, 2011 at 1:40 PM, Shawn <<a href="mailto:taaj.shawn@gmail.com">taaj.shawn@gmail.com</a>> wrote:<br>
>><br>
>> I am trying to understand how a NRPE proxy works so I can test this as a<br>
>> solution..<br>
>> Currently my nagios core is outside of the "production" network for<br>
>> various reasons. I have NRPE setup via xinetd on two production servers<br>
>> inside this network. a number of the servers inside this network are<br>
>> internal only db servers with no outbound access.<br>
>> I found this here -><br>
>> <a href="http://serverfault.com/questions/117815/distributed-nagios-installation" target="_blank">http://serverfault.com/questions/117815/distributed-nagios-installation</a><br>
>> So I would need the NRPE and plugins i'm using installed on the db<br>
>> server..<br>
>><br>
>> >From the main nagios server: check_nrpe -H NRPEPROXYHOST -c check_ping -H<br>
>> 10.0.0.3 ....<br>
>><br>
>> So that makes sense, you call a regular check and then have it run<br>
>> whatever check on the internal.. What if I wanted to do something besides a<br>
>> check ping, maybe a disk check that requires the plugin to be on the server?<br>
>> Can I string something to together? Can anyone provide me with an example of<br>
>> this?<br>
>> So I assume to do that the NRPE daemon needs to be running on internal db<br>
>> server. Which is fine, but when nagios checks through the proxy.. How do I<br>
>> configure it to display it is a unique host instead of the NRPEPROXYHOST?<br>
>> thanks<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Ale mailing list<br>
> <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
> <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
> See JOBS, ANNOUNCE and SCHOOLS lists at<br>
> <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
><br>
><br>
<br>
Shawn,<br>
<br>
nrpe is an agent that runs local on the on host you want to monitor,<br>
you have to have the plugin install on the host as well. Make sure<br>
that you have port 5665 open.<br>
<br>
--<br>
(678) 636-9678<br>
-----------------------------------------<br>
Discover it! Enjoy it! Share it! openSUSE Linux.<br>
-----------------------------------------<br>
openSUSE -- <a href="http://en.opensuse.org/User:Terrorpup" target="_blank">en.opensuse.org/User:Terrorpup</a><br>
openSUSE Ambassador/openSUSE Member<br>
skype,twiiter,identica,friendfeed -- terrorpup<br>
freenode(irc) --terrorpup/lupinstein<br>
Register Linux Userid: 155363<br>
<br>
Have you tried SUSE Studio? Need to create a Live CD, an app you want<br>
to package and distribute , or create your own linux distro. Give SUSE<br>
Studio a try. <a href="http://www.susestudio.com" target="_blank">www.susestudio.com</a>.<br>
</blockquote></div><br></div>