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 -&gt; check_nrpe -&gt; === SSL == -&gt; nrpe_daemon -&gt; 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">&lt;<a href="mailto:terrorpup@gmail.com">terrorpup@gmail.com</a>&gt;</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 &lt;<a href="mailto:taaj.shawn@gmail.com">taaj.shawn@gmail.com</a>&gt; wrote:<br>

&gt; To add to this .. the nrpe daemon needs to be compiled with<br>
&gt;<br>
&gt;    1.  Run the configure script with the --enable-command-args<br>
&gt;        option<br>
&gt;<br>
&gt;    2.  Set the &#39;dont_blame_nrpe&#39; directive in the NRPE config<br>
&gt;        file to 1.<br>
&gt;<br>
&gt; ./check_nrpe -H x.x.x.x -c check_ping -a &quot;-H 10.x.x.x. -w 3000.0,80% -c<br>
&gt; 5000.0,100% -p 5&quot;<br>
&gt; NRPE: Command &#39;check_ping&#39; not defined<br>
&gt;<br>
&gt; So this is better than the error I was seeing -&gt;<br>
&gt;<br>
&gt; CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs for<br>
&gt; error messages.<br>
&gt;<br>
&gt; so instead of passing arguments with a check i decided to just make the<br>
&gt; check command static to the server its talking to.<br>
&gt; ex. from the nrpe.cfg of the remote host<br>
&gt; command[check_ping_mysqlmaster]=/usr/local/nagios/libexec/check_ping -H<br>
&gt; 10.x.x.x -w 3000.0,80% -c 5000.0,100% -p 5<br>
&gt; this returns<br>
&gt; ./check_nrpe -H x.x.x.x -c check_ping_patientpadmysqlmaster<br>
&gt; PING OK - Packet loss = 0%, RTA = 0.62<br>
&gt; ms|rta=0.622000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0<br>
&gt; so it looks like im good to go the proxy is working.. Any tips on how to get<br>
&gt; this to show as a unique host in nagios?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Apr 8, 2011 at 1:40 PM, Shawn &lt;<a href="mailto:taaj.shawn@gmail.com">taaj.shawn@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I am trying to understand how a NRPE proxy works so I can test this as a<br>
&gt;&gt;  solution..<br>
&gt;&gt; Currently my nagios core is outside of the &quot;production&quot; network for<br>
&gt;&gt; various reasons. I have NRPE setup via xinetd on two production servers<br>
&gt;&gt; inside this network. a number of the servers inside this network are<br>
&gt;&gt; internal only db servers with no outbound access.<br>
&gt;&gt; I found this here -&gt;<br>
&gt;&gt; <a href="http://serverfault.com/questions/117815/distributed-nagios-installation" target="_blank">http://serverfault.com/questions/117815/distributed-nagios-installation</a><br>
&gt;&gt; So I would need the NRPE and plugins i&#39;m using installed on the db<br>
&gt;&gt; server..<br>
&gt;&gt;<br>
&gt;&gt; &gt;From the main nagios server: check_nrpe -H NRPEPROXYHOST -c check_ping -H<br>
&gt;&gt; 10.0.0.3 ....<br>
&gt;&gt;<br>
&gt;&gt; So that makes sense, you call a regular check and then have it run<br>
&gt;&gt; whatever check on the internal.. What if I wanted to do something besides a<br>
&gt;&gt; check ping, maybe a disk check that requires the plugin to be on the server?<br>
&gt;&gt; Can I string something to together? Can anyone provide me with an example of<br>
&gt;&gt; this?<br>
&gt;&gt; So I assume to do that the NRPE daemon needs to be running on internal db<br>
&gt;&gt; server.  Which is fine, but when nagios checks through the proxy.. How do I<br>
&gt;&gt; configure it to display it is a unique host instead of the NRPEPROXYHOST?<br>
&gt;&gt; thanks<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Ale mailing list<br>
&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt; <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<br>
&gt;<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>