config check problem

Bill Corcoran wcorcor at siue.edu
Mon Mar 15 15:46:19 CET 2004


you need to name the service that inherits generic-service.  "service 
description" isn't enough.  try adding the following to your custom 
service definition:

name			ping

-bill



Stefan Kargl wrote:

> Hi List!
> 
> When I run: nagios -v /etc/nagios/nagios.cfg I get the following error:
> 
> 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: There are no services defined!
>        Checked 0 services.
> 
> my services.cfg:
> 
> # Generic service definition template
> define service{
>        ; The 'name' of this service template, referenced in other
> service definitions
>        name                            generic-service
>        active_checks_enabled           0       ; Active service checks
> are disabled
>        passive_checks_enabled          0       ; Passive service checks
> are enabled/disabled
>        parallelize_check               1       ; Active service checks
> should be parallelized
>                                                ; (disabling this can
> lead to major performance problems)
>        obsess_over_service             1       ; We should obsess over
> this service (if necessary)
>        check_freshness                 0       ; Default is to NOT
> check service 'freshness'
>        notifications_enabled           0       ; Service notifications
> are disabled
>        event_handler_enabled           0       ; Service event handler
> is disabled
>        flap_detection_enabled          0       ; Flap detection is disabled
>        process_perf_data               1       ; Process performance data
>        retain_status_information       1       ; Retain status
> information across program restarts
>        retain_nonstatus_information    1       ; Retain non-status
> information across program restarts
> 
>        register                        0       ; DONT REGISTER THIS
> DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
>        }
> 
> # Service definition
> define service{
>        use                             generic-service         ; Name
> of service template to use
> 
>        host_name                       gateway
>        service_description             PING
>        is_volatile                     0
>        check_command                   check_ping!100.0,20%!500.0,60%
>        check_period                    24x7
>        max_check_attempts              3
>        normal_check_interval           5
>        retry_check_interval            1
>        contact_groups                  superuser
>        notification_interval           240
>        notification_period             24x7
>        notification_options            c,r
>        }
> 
> the path to the services.cfg is set correctly in nagios.cfg, group
> superuser exists with users, host gateway exists
> 
> thanks
> Stefan
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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
> 



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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