check_nrpe Connection refused by host

Mattias Ryrlén mattias.ryrlen at op5.com
Sat Apr 27 19:23:17 CEST 2013


can you run check_nrpe locally on the host?
can you run check_nrpe -H <host>  and no arguments?
firewall issues?
selinux on target host?

some things that popped out of my head.


On Sat, Apr 27, 2013 at 5:54 PM, Edwin Zoeller
<Edwin.Zoeller at ama-assn.org>wrote:

>  If you have nrpe agents running on the remote hosts make sure that the
> deamon is running with the user ID of nagios.
>
>  *From*: Jim Miller [mailto:jmiller at centricgroup.com]
> *Sent*: Saturday, April 27, 2013 10:24 AM
> *To*: nagios-users at lists.sourceforge.net <
> nagios-users at lists.sourceforge.net>
> *Subject*: [Nagios-users] check_nrpe Connection refused by host
>
>
> Hello everyone,****
>
> ** **
>
> 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:****
>
> ** **
>
> *LOGS:*
>
> [1367058676] SERVICE NOTIFICATION: icingaadmin;xio99cdejump02.example.com;Free
> Space of sda1;CRITICAL;notify-service-by-email;Connection refused by host*
> ***
>
> [1367059156] SERVICE NOTIFICATION: icingaadmin;xio99cdejump02.example.com;Current
> Users;CRITICAL;notify-service-by-email;Connection refused by host****
>
> [1367059216] SERVICE NOTIFICATION: icingaadmin;xio99cdejump02.example.com;Total
> Processes;CRITICAL;notify-service-by-email;Connection refused by host****
>
> [1367059276] SERVICE NOTIFICATION: icingaadmin;xio99cdejump02.example.com;Zombie
> Processes;CRITICAL;notify-service-by-email;Connection refused by host****
>
> [1367059646] SERVICE NOTIFICATION: icingaadmin;xio99cdejump02.example.com;CPU
> Load;CRITICAL;notify-service-by-email;Connection refused by host****
>
> ** **
>
> *MANUAL CHECKS:*
>
> [root at xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe  -H
> xio99cdejump02.example.com -c check_users_count -a 5 10****
>
> USERS OK - 1 users currently logged in |users=1;5;10;0****
>
> ** **
>
> [root at xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe  -H
> xio99cdejump02.example.com -c check_load_avg -a 15,10,5 30,25,20****
>
> 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;****
>
> ** **
>
> [root at xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe  -H
> xio99cdejump02.example.com -c check_sda1****
>
> DISK OK - free space: /boot 379 MB (82% inode=99%);|
> /boot=79MB;387;435;0;484****
>
> ** **
>
> [root at xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe  -H
> xio99cdejump02.example.com -c check_swap_usage****
>
> SWAP OK - 100% free (5119 MB out of 5119 MB) |swap=5119MB;1023;511;0;5119*
> ***
>
> ** **
>
> [root at xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe  -H
> xio99cdejump02.example.com -c check_zombie_procs****
>
> PROCS OK: 0 processes with STATE = Z****
>
> ** **
>
> [root at xio99cdejump01 icinga]# /usr/lib64/nagios/plugins/check_nrpe  -H
> xio99cdejump02.example.com -c check_total_procs****
>
> PROCS OK: 106 processes****
>
> ** **
>
> ==========================****
>
> Monitored Client:****
>
> RHEL 6.3****
>
> NRPE - nrpe-2.13-1.el6.x86_64****
>
> ** **
>
> [root at xio99cdejump02 nagios]# netstat -anp |grep nrpe****
>
> tcp        0      0 0.0.0.0:5666                0.0.0.0:*
> LISTEN      5418/nrpe****
>
> ** **
>
> ** **
>
> [root at xio99cdejump02 nagios]# /etc/init.d/nrpe restart****
>
> Shutting down nrpe: Apr 27 09:53:33 xio99cdejump02 nrpe[5418]: Caught
> SIGTERM - shutting down...****
>
> Apr 27 09:53:33 xio99cdejump02 nrpe[5418]: Daemon shutdown****
>
>                                                            [  OK  ]****
>
> Starting nrpe: Apr 27 09:53:33 xio99cdejump02 nrpe[5502]: INFO: SSL/TLS
> initialized. All network traffic will be encrypted.****
>
>                                                            [  OK  ]****
>
> [root at xio99cdejump02 nagios]# Apr 27 09:53:33 xio99cdejump02 nrpe[5503]:
> Starting up daemon****
>
> Apr 27 09:53:33 xio99cdejump02 nrpe[5503]: Warning: Daemon is configured
> to accept command arguments from clients!****
>
> Apr 27 09:53:33 xio99cdejump02 nrpe[5503]: Listening for connections on
> port 5666****
>
> Apr 27 09:53:33 xio99cdejump02 nrpe[5503]: Allowing connections from:
> 127.0.0.1, 10.xxx.0.110****
>
> ** **
>
> *Command Config Lines /etc/nagios/nrpe.cfg*
> command[check_users_count]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
> ****
>
> command[check_load_avg]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c
> 30,25,20****
>
> command[check_sda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p
> /dev/sda1****
>
> command[check_swap_usage]=/usr/lib64/nagios/plugins/check_swap -w 20% -c
> 10%****
>
> command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c
> 10 -s Z****
>
> command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c
> 200****
>
> ** **
>
> Monitoring Server:****
>
> Nagios Plugins – v.1.4.16-5****
>
> ** **
>
> Config files:****
>
> -----------------------****
>
> define command{****
>
> command_name check_nrpe****
>
> command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$****
>
> }****
>
> -----------------------****
>
> ** **
>
> define host {****
>
> use linux-server****
>
> host_name xio99cdejump02.example.com****
>
> alias "xio99cdejump02"****
>
> address "10.xxx.0.110"****
>
> }****
>
> ** **
>
> define service {****
>
> use generic-service****
>
> host_name xio99cdejump02.example.com****
>
> service_description CPU Load****
>
> check_command check_nrpe!check_load_avg****
>
> }****
>
> ** **
>
> define service {****
>
> use generic-service****
>
> host_name xio99cdejump02.example.com****
>
> service_description Current Users****
>
> check_command check_nrpe!check_users_count****
>
> }****
>
> ** **
>
> define service {****
>
> use generic-service****
>
> host_name xio99cdejump02.example.com****
>
> service_description Check Swap****
>
> check_command check_nrpe!check_swap_usage****
>
> }****
>
> ** **
>
> define service {****
>
> use generic-service****
>
> host_name xio99cdejump02.example.com****
>
> service_description Free Space of sda1****
>
> check_command check_nrpe!check_sda1****
>
> }****
>
> ** **
>
> ---------------------------****
>
> ** **
>
> Thanks for any suggestions,****
>
> Jim****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>



-- 
Vänliga hälsningar / Best Regards
Mattias Ryrlén

__________________________
op5 AB
Första Långgatan 19
SE-413 27 Göteborg
Mobil: +46 735-17 70 99
Support: +46 31-774 09 24
www.op5.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20130427/71cc9405/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list