Page 1 of 1

nagios agents?

Posted: Thu Dec 12, 2013 3:36 pm
by gekko95
I am posting to the discussion board hoping to get a recommendation from other nagios users. We love the platform and use it extensively, but have one odd requirement which has proven hard to fill.

Does anyone know of a plugin/agent/utility which can monitor a server _on behalf_ of nagios and relay the data back for central collection and monitoring? Here is a practical example.

- I have a server which can see tcp port 80 (www) on another server across a site-to-site tunnel.
- I have a nagios server on another network which can see the first server but has no line-of-sight to the webserver
- I would like to use the first server to monitor the availability of port 80 on behalf of nagios and communicate the data back.

Moving nagios is not an option.
agent-nagios.png
I might be misreading something, but all of the nagios agents I have seen so far are typically installed on a server for local resource monitoring. I have seen a similar function on another product (http://wiki.mikrotik.com/wiki/Manual:The_Dude/Agents) but we have standardized on nagios and have no intention of moving.

Any advice, pointers or random thoughts would be greatly appreciated.

Warm regards,
Stewart

Re: nagios agents?

Posted: Thu Dec 12, 2013 3:53 pm
by abrist
You can use NRPE as a proxy for checks. Essentially, you would instal nrpe on the intermediary server. You would then create an nrpe check command to run check_http on the intermediary server against port 80 on the remote server. Finally, you would need to create a service check definition for the nrpe check on the nagios server.
Service check definition:

Code: Select all

define service{
        use                             generic-service       
        host_name                       <intermediary server>
        service_description             http check of remote node
        check_command                   check_nrpe!check_http_remote
        notifications_enabled           0
        }
Command definition:

Code: Select all

define command {
       command_name                             check_nrpe
       command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
Intermediary nrpe.cfg command definition:

Code: Select all

command[check_http_remote]=/usr/local/nagios/libexec/check_http -H <remote ip>

Re: nagios agents?

Posted: Fri Dec 13, 2013 11:26 am
by gekko95
Exactly what I was looking for, abrist...thank you very much.

Warm regards,
Stewart

Re: nagios agents?

Posted: Fri Dec 13, 2013 12:02 pm
by abrist
no problem. Let me know if you have any issues with the implementation.