Dist. Monitoring - need help

Marc Powell marc at ena.com
Thu Jan 27 18:19:35 CET 2005



> -----Original Message-----
> From: Chuck at BlackForest-Co.com [mailto:Chuck at BlackForest-Co.com]
> Sent: Wednesday, January 26, 2005 2:06 PM
> To: Marc Powell
> Subject: RE: [Nagios-users] Dist. Monitoring - need help
> 
> >
> >
> >> -----Original Message-----
> >> From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-
> >> admin at lists.sourceforge.net] On Behalf Of Chuck at BlackForest-Co.com
> >> Sent: Wednesday, January 26, 2005 12:56 PM
> >> To: Nagios-users at lists.sourceforge.net
> >> Subject: [Nagios-users] Dist. Monitoring - need help
> >>
> >> I've set every thing up, the script works(via command line), but
after
> > the
> >> service runs it doesn't call the submit script.
> >>
> >> Notifications = 0
> >> Obsess = 1
> >> ocsp_command=submit_check_result
> >>
> >> Am I missing something in the service.cfg file?
> >
> >
> > Focusing exclusively on the execution of submit_check_result and
> > presuming you're using 1.x, ocsp_command and obsess_over_services
(not
> 
> Yes, V1
> 
> > simply 'Obsess') should be in nagios.cfg and not service.cfg. In
your
> > service definitions or template you'll also need to set
> 
> nagios.cfg
>   obsess_over_services=1
>   ocsp_command=submit_check_result
>   enable_notifications=0
> 
> services.cfg
>   define service{
>         use                             generic-service
>         host_name                       cosstmx0
>         service_description             CkDf
>         obsess_over_service             1
>         is_volatile                     0
>         check_period                    24x7
>         max_check_attempts              30
>         normal_check_interval           5
>         retry_check_interval            1
>         contact_groups                  NPST
>         notification_interval           5
>         notification_period             24x7
>         notification_options            u,c
>         check_command                   check_nrpe!check_DF
>         }

Looks fine. I'd probably add 'active_checks_enabled 1' if it's not
defined in your generic-service template. It's unrelated but 29 checks
at 1 minute intervals for disk space seems to be a bit aggressive. Why
not do 6 max_check_attempts at a 5 minute retry_check_interval or some
other less burdensome combination?

> AND
>    define command{
> 	command_name	submit_check_result
> 	command_line	/usr/local/nag.../submit_check_result ...etc...
>    }
> goes in checkcommands.cfg? commands.cfg? misccommands.cfg?

It can go in any of those as long as the file is listed as a cfg_file in
nagios.cfg. Can you also post the complete command definition? I suspect
that the problem might be here. Mine is as follows --

# 'submit_check_result' command definition
define command{
        command_name    submit_check_result
        command_line    $USER1$/submit_check_result $HOSTNAME$
'$SERVICEDESC$' $SERVICESTATE$ '$OUTPUT$'
        }

Note the quotes around specific variables.

> 
> > obsess_over_service to 1 for each service result you wish to send to
the
> > central server (probably all). Nagios must be restarted after making
> > these changes/additions.
> 
> ..bout 7000 times  :-(

Then just to be sure, make sure you only have 1 nagios master process
running.

> 
> > You should also verify that submit_check_result
> > can be executed by the user Nagios is running as. It's common to see
> > that it runs as the root user but not as the Nagios user.
> 
> It is and runs fine ... from the command line
>   ./submit_check_result a b c d e f
>      1 data packet(s) sent to host successfully.


--
Marc 



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
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