Nagios/NSCA/Munin Integration

Marc Powell mpowell at ena.com
Thu Feb 10 22:43:36 CET 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Jørgen Birkhaug
> Sent: Thursday, February 10, 2005 3:38 PM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Nagios/NSCA/Munin Integration
> 
> 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?

The error message you see --

> > shortly followed by message stating that the service 'df' could not 
> > be found by Nagios.

Indicates that nagios can't find the service df associated with the host that was also in that error message. This could be because you added it without restarting nagios or that there is a typo of some sort or it's really not associated with the host. Try running '/path/to/nagios -v /path/to/nagios.cfg' to check for errors and restart nagios.



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