[ale] nagios NRPE proxy

Shawn taaj.shawn at gmail.com
Fri Apr 8 15:56:02 EDT 2011


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).

by adding a

command[check_ping_foobar]=/usr/local/nagios/libexec/check_ping -H 10.x.x.x
-w 3000.0,80% -c 5000.0,100% -p

to your remote hosts nrpe.cfg

nagios Core -> check_nrpe -> === SSL == -> nrpe_daemon -> internal server

so you would call this from your nagios master like

define service{
use         generic-service
host_name application-foobar
service_description Alive Ping
check_command check_nrpe!check_ping_foobar
}






On Fri, Apr 8, 2011 at 3:40 PM, Chuck Payne <terrorpup at gmail.com> wrote:

> On Fri, Apr 8, 2011 at 3:24 PM, Shawn <taaj.shawn at gmail.com> wrote:
> > To add to this .. the nrpe daemon needs to be compiled with
> >
> >    1.  Run the configure script with the --enable-command-args
> >        option
> >
> >    2.  Set the 'dont_blame_nrpe' directive in the NRPE config
> >        file to 1.
> >
> > ./check_nrpe -H x.x.x.x -c check_ping -a "-H 10.x.x.x. -w 3000.0,80% -c
> > 5000.0,100% -p 5"
> > NRPE: Command 'check_ping' not defined
> >
> > So this is better than the error I was seeing ->
> >
> > CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs
> for
> > error messages.
> >
> > so instead of passing arguments with a check i decided to just make the
> > check command static to the server its talking to.
> > ex. from the nrpe.cfg of the remote host
> > command[check_ping_mysqlmaster]=/usr/local/nagios/libexec/check_ping -H
> > 10.x.x.x -w 3000.0,80% -c 5000.0,100% -p 5
> > this returns
> > ./check_nrpe -H x.x.x.x -c check_ping_patientpadmysqlmaster
> > PING OK - Packet loss = 0%, RTA = 0.62
> > ms|rta=0.622000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0
> > so it looks like im good to go the proxy is working.. Any tips on how to
> get
> > this to show as a unique host in nagios?
> >
> >
> >
> > On Fri, Apr 8, 2011 at 1:40 PM, Shawn <taaj.shawn at gmail.com> wrote:
> >>
> >> I am trying to understand how a NRPE proxy works so I can test this as a
> >>  solution..
> >> Currently my nagios core is outside of the "production" network for
> >> various reasons. I have NRPE setup via xinetd on two production servers
> >> inside this network. a number of the servers inside this network are
> >> internal only db servers with no outbound access.
> >> I found this here ->
> >> http://serverfault.com/questions/117815/distributed-nagios-installation
> >> So I would need the NRPE and plugins i'm using installed on the db
> >> server..
> >>
> >> >From the main nagios server: check_nrpe -H NRPEPROXYHOST -c check_ping
> -H
> >> 10.0.0.3 ....
> >>
> >> So that makes sense, you call a regular check and then have it run
> >> whatever check on the internal.. What if I wanted to do something
> besides a
> >> check ping, maybe a disk check that requires the plugin to be on the
> server?
> >> Can I string something to together? Can anyone provide me with an
> example of
> >> this?
> >> So I assume to do that the NRPE daemon needs to be running on internal
> db
> >> server.  Which is fine, but when nagios checks through the proxy.. How
> do I
> >> configure it to display it is a unique host instead of the
> NRPEPROXYHOST?
> >> thanks
> >
> >
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://mail.ale.org/mailman/listinfo/ale
> > See JOBS, ANNOUNCE and SCHOOLS lists at
> > http://mail.ale.org/mailman/listinfo
> >
> >
>
> Shawn,
>
> nrpe is an agent that runs local on the on host you want to monitor,
> you have to have the plugin install on the host as well. Make sure
> that you have port 5665 open.
>
> --
> (678) 636-9678
> -----------------------------------------
> Discover it! Enjoy it! Share it! openSUSE Linux.
> -----------------------------------------
> openSUSE -- en.opensuse.org/User:Terrorpup
> openSUSE Ambassador/openSUSE Member
> skype,twiiter,identica,friendfeed -- terrorpup
> freenode(irc) --terrorpup/lupinstein
> Register Linux Userid: 155363
>
> Have you tried SUSE Studio? Need to create a Live CD,  an app you want
> to package and distribute , or create your own linux distro. Give SUSE
> Studio a try. www.susestudio.com.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20110408/24893a06/attachment.html 


More information about the Ale mailing list