<div dir="ltr">can you run check_nrpe locally on the host?<div>can you run check_nrpe -H <host> and no arguments?</div><div style>firewall issues?</div><div style>selinux on target host?</div><div style><br></div><div style>
some things that popped out of my head.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 27, 2013 at 5:54 PM, Edwin Zoeller <span dir="ltr"><<a href="mailto:Edwin.Zoeller@ama-assn.org" target="_blank">Edwin.Zoeller@ama-assn.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<font style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If you have nrpe agents running on the remote hosts make sure that the deamon is running with the user ID of nagios.</font><br>
<br>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<font style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><b>From</b>: Jim Miller [mailto:<a href="mailto:jmiller@centricgroup.com" target="_blank">jmiller@centricgroup.com</a>]
<br>
<b>Sent</b>: Saturday, April 27, 2013 10:24 AM<br>
<b>To</b>: <a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a> <<a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a>>
<br>
<b>Subject</b>: [Nagios-users] check_nrpe Connection refused by host <br>
</font> <br>
</div><div><div class="h5">
<div>
<p class="MsoNormal">Hello everyone,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m sure this is common issue. But I’m stumped. I can run check_nrpe from the command line on the monitoring server w/out any problem. But for all of the nrpe_checks the server runs, I see:<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:Consolas">LOGS:<u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[1367058676] SERVICE NOTIFICATION: icingaadmin;<a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a>;Free Space of sda1;CRITICAL;notify-service-by-email;Connection refused by host<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[1367059156] SERVICE NOTIFICATION: icingaadmin;<a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a>;Current Users;CRITICAL;notify-service-by-email;Connection refused by host<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[1367059216] SERVICE NOTIFICATION: icingaadmin;<a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a>;Total Processes;CRITICAL;notify-service-by-email;Connection refused by host<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[1367059276] SERVICE NOTIFICATION: icingaadmin;<a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a>;Zombie Processes;CRITICAL;notify-service-by-email;Connection refused by host<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[1367059646] SERVICE NOTIFICATION: icingaadmin;<a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a>;CPU Load;CRITICAL;notify-service-by-email;Connection refused by host<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:Consolas">MANUAL CHECKS:</span><u></u><u></u></b></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[root@xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe -H <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a> -c check_users_count -a 5 10<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">USERS OK - 1 users currently logged in |users=1;5;10;0<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[root@xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe -H <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a> -c check_load_avg -a 15,10,5 30,25,20<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">OK - load average: 0.00, 0.00, 0.00|load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0; load15=0.000;5.000;20.000;0;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[root@xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe -H <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a> -c check_sda1<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">DISK OK - free space: /boot 379 MB (82% inode=99%);| /boot=79MB;387;435;0;484<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[root@xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe -H <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a> -c check_swap_usage<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">SWAP OK - 100% free (5119 MB out of 5119 MB) |swap=5119MB;1023;511;0;5119<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[root@xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe -H <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a> -c check_zombie_procs<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">PROCS OK: 0 processes with STATE = Z<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">[root@xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe -H <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a> -c check_total_procs<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:Consolas">PROCS OK: 106 processes<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">==========================<u></u><u></u></p>
<p class="MsoNormal">Monitored Client:<u></u><u></u></p>
<p class="MsoNormal">RHEL 6.3<u></u><u></u></p>
<p class="MsoNormal">NRPE - <span style="font-size:9.0pt;font-family:Consolas">nrpe-2.13-1.el6.x86_64<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">[root@xio99cdejump02 nagios]# netstat -anp |grep nrpe<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">tcp 0 0 <a href="http://0.0.0.0:5666" target="_blank">0.0.0.0:5666</a> 0.0.0.0:* LISTEN 5418/nrpe<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">[root@xio99cdejump02 nagios]# /etc/init.d/nrpe restart<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">Shutting down nrpe: Apr 27 09:53:33 xio99cdejump02 nrpe[5418]: Caught SIGTERM - shutting down...<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">Apr 27 09:53:33 xio99cdejump02 nrpe[5418]: Daemon shutdown<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> [ OK ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">Starting nrpe: Apr 27 09:53:33 xio99cdejump02 nrpe[5502]: INFO: SSL/TLS initialized. All network traffic will be encrypted.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"> [ OK ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">[root@xio99cdejump02 nagios]# Apr 27 09:53:33 xio99cdejump02 nrpe[5503]: Starting up daemon<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">Apr 27 09:53:33 xio99cdejump02 nrpe[5503]: Warning: Daemon is configured to accept command arguments from clients!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">Apr 27 09:53:33 xio99cdejump02 nrpe[5503]: Listening for connections on port 5666<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">Apr 27 09:53:33 xio99cdejump02 nrpe[5503]: Allowing connections from: 127.0.0.1, 10.xxx.0.110<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b>Command Config Lines /etc/nagios/nrpe.cfg</b><br>
<span style="font-size:9.0pt;font-family:Consolas">command[check_users_count]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">command[check_load_avg]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">command[check_sda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">command[check_swap_usage]=/usr/lib64/nagios/plugins/check_swap -w 20% -c 10%<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Monitoring Server:<u></u><u></u></p>
<p class="MsoNormal">Nagios Plugins – v.1.4.16-5<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Config files:<u></u><u></u></p>
<p class="MsoNormal">-----------------------<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">define command{<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">command_name check_nrpe<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">}<u></u><u></u></span></p>
<p class="MsoNormal">-----------------------<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">define host {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">use linux-server<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">host_name <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">alias "xio99cdejump02"<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">address "10.xxx.0.110"<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">define service {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">use generic-service<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">host_name <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">service_description CPU Load<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">check_command check_nrpe!check_load_avg<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">define service {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">use generic-service<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">host_name <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">service_description Current Users<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">check_command check_nrpe!check_users_count<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">define service {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">use generic-service<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">host_name <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">service_description Check Swap<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">check_command check_nrpe!check_swap_usage<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">define service {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">use generic-service<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">host_name <a href="http://xio99cdejump02.example.com" target="_blank">xio99cdejump02.example.com</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">service_description Free Space of sda1<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">check_command check_nrpe!check_sda1<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">---------------------------<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks for any suggestions,<u></u><u></u></p>
<p class="MsoNormal">Jim<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><u></u> <u></u></span></p>
</div>
</div></div></div>
<br>------------------------------------------------------------------------------<br>
Try New Relic Now & We'll Send You this Cool Shirt<br>
New Relic is the only SaaS-based application performance monitoring service<br>
that delivers powerful full stack analytics. Optimize and monitor your<br>
browser, app, & servers with just a few lines of code. Try New Relic<br>
and get this awesome Nerd Life shirt! <a href="http://p.sf.net/sfu/newrelic_d2d_apr" target="_blank">http://p.sf.net/sfu/newrelic_d2d_apr</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><br clear="all"><div><br></div>-- <br>Vänliga hälsningar / Best Regards<br>Mattias Ryrlén<br><br>__________________________<br>
op5 AB<br>Första Långgatan 19<br>SE-413 27 Göteborg<br>Mobil: +46 735-17 70 99<br>Support: +46 31-774 09 24<br><a href="http://www.op5.com">www.op5.com</a>
</div></div>