Nagios/NSCA/Munin Integration

Jørgen Birkhaug jorbir at gmail.com
Thu Feb 10 22:38:20 CET 2005


On Thu, 10 Feb 2005 19:59:55 +0100, Andreas Ericsson <ae at op5.se> wrote:
> Jørgen Birkhaug wrote:
> > Munin (third party monitoring software) is successfully sending alerts
> > to nagios.cmd via NSCA, but I'm still (after having read just about
> > everything about volatile services that I can find) having problems
> > getting the Nagios Daemon to react upon passive service alerts written
> > to nagios.cmd by NSCA.
> >
> > nagios.cmd might contain:
> >
> > -----------------------------------------------------------------------
> > EXTERNAL COMMAND:
> > PROCESS_SERVICE_CHECK_RESULT;kang.os.ergo.no;df;2;Filesystem usage (in
> > %):CRITICALs: /mnt/media is 100.00 (outside range [:98]).
> > -----------------------------------------------------------------------
> >
> 
> nagios.cmd isn't supposed to contain anything humanly readable. It's a
> named pipe used for inter-process communication and exists only as a
> fixed buffer of (usually, on linux) 4096 bytes of RAM allocated inside
> the kernel, which punts the incoming bytes to the ipc-channel on the
> reading end. No filesystem IO takes place, there has to be a reading end
> connected for writing to succeed, and if you actually access it with cat
> (or something else) you will empty the pipe (and possibly steal it)
> before nagios can read the message.
> 
> > shortly followed by message stating that the service 'df' could not be
> > found by Nagios.
> >
> > Sorry for yet again bringing up syntax questions regarding passive
> > alerts, but how do I correctly define a service that will pick up
> > alerts written to nagios.cmd?
> >
> > My services.cfg contains:
> >
> > -----------------------------------------------------------------------
> > define service {
> >         use                             generic-service
> >         name                          munin
> >         register                        0
> >         service_description       munin_alert
> >         is_volatile                     1
> >         check_command           check-host-alive
> >         active_checks_enabled   0
> >         passive_checks_enabled 1
> >         max_check_attempts      1
> >         normal_check_interval     1
> >         retry_check_interval        1
> >         check_period                  none
> >         notification_interval          31536000
> > }
> >
> > define service {
> >         use                             munin
> >         host_name                   host
> >         service_description       df
> >         register                        1
> > }
> > -----------------------------------------------------------------------
> >
> 
> --
> Andreas Ericsson                   andreas.ericsson at op5.se
> OP5 AB                             www.op5.se
> Lead Developer

I should probably have clarified this in my initial post. The above
message (EXTERNAL COMMAND) is derived from Nagios' own log file;
nagios.log.

It is not entered directly into nagios.cmd but rather dumped there by
using the NSCA Daemon's 'command_file' parameter).

So, presuming that external events are supposed to end up in
nagios.cmd, how do I define a service that will actually generate a
warning in Nagios?

-- 
Jørgen Birkhaug


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
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