[clug] Nagios service error

Andrew Smith andrew at coolchilli.com
Thu Jun 10 07:52:16 GMT 2004


Hi Steve,

I loooove Nagios, it rocks!

You're actually skipping a step.  Your service definition "check_command" actually references a defined command from
etc/checkcommands.cfg, also called "check_http", like the plugin.

It is this command that expects check_commands from service.cfg to be syntaxed as "check_http!sitecentraltest.industry.gov.au". That
check_command then calls the plugin named "check_http" with a "-H sitecentraltest.industry.gov.au" option.

Also, get in the habit, or write a bash script, to run "bin/nagios -v" to check your config sanity prior to restarting, this will
maximise run time when you've got 100's of services you're checking and you're playing with templating, or configs alot :)

HTH
Andrew

> -----Original Message-----
> From: linux-bounces+andrew=coolchilli.com at lists.samba.org
> [mailto:linux-bounces+andrew=coolchilli.com at lists.samba.org]On Behalf Of
> Collins, Steve
> Sent: Thursday, 10 June 2004 12:50 PM
> To: linux at lists.samba.org
> Subject: [clug] Nagios service error
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> We're in the process of establishing a monitoring box using Nagios.  I'm now at a point where I want to expand the
> check_http on several servers to actually check virtual hosts on those boxes.  A ./check_http -help
> suggests I can do the following as an initial step in my services.cfg file:
>
> # Service definition - http
> define service{
>         use                             generic-service         ; Name of service template to use
>         host_name                       itrwebtest2
>         service_description             HTTP_SITECENTRAL
>         is_volatile                     0
>         check_period                    24x7
>         max_check_attempts              3
>         normal_check_interval           5
>         retry_check_interval            1
>         contact_groups                  web-admins
>         notification_interval           120
>         notification_period             24x7
>         notification_options            w,u,c,r
>         check_command                   check_http --hostname=sitecentraltest.industry.gov.au
>         }
>
> Yet, when I put this in place and restart Nagios, I get the following:
>
> [root at blacksheep root]# /etc/rc.d/init.d/nagios restart
> Running configuration check...
> Nagios 1.2
> Copyright (c) 1999-2004 Ethan Galstad (nagios at nagios.org)
> Last Modified: 02-02-2004
> License: GPL
>
> Reading configuration data...
>
> Running pre-flight check on configuration data...
>
> Checking services...
> Error: Service check command 'check_http --hostname=sitecentraltest.industry.gov.au' specified in service
> 'HTTP_SITECENTRAL' for host 'itrwebtest2' not defined anywhere!
>
> <SNIP extra error data>
>
> Strangely, this all works just frin when I do the check_http from the command line.
>
> Can anyone give me a hand here?
>
> Steve
> - --
> Stephen Collins
> Web Development Section
> eBusiness Division
> __________________________________________________
> Department of Industry, Tourism and Resources
> Level 12, 20 Allara Street, Canberra City ACT 2600
> GPO Box 9839, Canberra ACT 2601
>
> E steve.collins at industry.gov.au
> P +61 2 62137193
> C +61 410 680722
> F +61 2 62136227
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (MingW32)
>
> iD8DBQFAx8xuB6K6hSCnql4RAvdsAKCaRtoCRZzJBh3ZLYELcSIt/r3INwCfR/iz
> Ko24lvZM5neCB9Hm+xOPD80=
> =YiTP
> -----END PGP SIGNATURE-----
>
>
> **********************************************************************
> The information contained in this e-mail, and any attachments to it, is
> intended for the use of the addressee and is confidential. If you are not the intended recipient you must not use,
> disclose, read, forward, copy or retain any of the information. If you have received this e-mail in
> error, please delete it and notify the sender by return e-mail or telephone.
> The Commonwealth does not warrant that any attachments are free from viruses or any other defects. You assume all
> liability for any loss, damage or other consequences which may arise from opening or using the attachments.
> ***********************************************************************************
>
>
>



More information about the linux mailing list