That's because you're running nrpe with inetd and not as a standalone daemon. inetd will use /etc/services and the nrpe.cfg entry won't have an effect.<br><br>Regards,<br>Martin Melin<br><br><div class="gmail_quote">
On Tue, Oct 20, 2009 at 7:04 PM, akp geek <span dir="ltr"><<a href="mailto:akpgeek@gmail.com">akpgeek@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks so much Marc..<div><br></div><div>I did the following</div><div><br></div><div>1. I changed the port in /etc/services to 5777</div><div>2. I disabled and enabled the service using </div><div>        ./svcadm disable  /network/nrpe/tcp:default  and ./svcadm enable /network/nrpe/tcp:default</div>

<div>3. But I have not changed nrpe.cfg</div><div><br></div><div>4. From the nagios server I did the following and it worked</div><div>    ./check_nrpe -H 10.112.161.130 -c check_users -p 5777</div><div><br></div><div>It worked fine. confusing part is I did not have to change the nrpe.cfg</div>

<div><br></div><div>Any suggestions, why it's working ?</div><div><br></div><div>Regards<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, Oct 20, 2009 at 11:53 AM, Marc Powell <span dir="ltr"><<a href="mailto:marc@ena.com" target="_blank">marc@ena.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div><br>
On Oct 20, 2009, at 10:32 AM, akp geek wrote:<br>
<br>
> Hi all<br>
>                   I have a question on how NRPE works. I have<br>
> installed Nagios on one server1 and Nrpe on server2. they are on the<br>
> same subnet.<br>
><br>
> the way I execute the commands on the server2 is  Server1:nrpe!<br>
> commandonServer2<br>
><br>
> It works fine now. both servers are on the same subnet. But if I<br>
> would like to monitor a server outside the firewall, Is there<br>
> particular port that needs to be opened or how does that<br>
> communication work?<br>
<br>
</div></div>Nagios calls check_nrpe locally which contacts NRPE on the remote host<br>
on the port specified by the check_nrpe command line (look at the<br>
command{} definition for nrpe). You can change the port that NRPE uses<br>
in nrpe.cfg on the remote host. You'll also need to change the<br>
check_nrpe command line to match. If the remote host is behind a<br>
firewall that restricts access, you'll need to ensure that TCP access<br>
to that port is permitted.<br>
<br>
--<br>
Marc<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Come build with us! The BlackBerry(R) Developer Conference in SF, CA<br>
is the only developer event you need to attend this year. Jumpstart your<br>
developing skills, take BlackBerry mobile applications to market and stay<br>
ahead of the curve. Join us from November 9 - 12, 2009. Register now!<br>
<a href="http://p.sf.net/sfu/devconference" target="_blank">http://p.sf.net/sfu/devconference</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</blockquote></div><br></div></div></div>
<br>------------------------------------------------------------------------------<br>
Come build with us! The BlackBerry(R) Developer Conference in SF, CA<br>
is the only developer event you need to attend this year. Jumpstart your<br>
developing skills, take BlackBerry mobile applications to market and stay<br>
ahead of the curve. Join us from November 9 - 12, 2009. Register now!<br>
<a href="http://p.sf.net/sfu/devconference" target="_blank">http://p.sf.net/sfu/devconference</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>