Problem with resource.cfg macro definiton

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Sat Apr 12 10:07:56 CEST 2003


Dear Sir,

I am writing to thank you for your letter and say,

> On Thu, 10 Apr 2003, Gotner, James wrote:
> 
> > I got it figured out...  I had all of my object config files in the same dir
> > as nagios.cfg.. so nagios was trying to parse all the files (resource.cfg,
> > cgi.cfg) as templates... Oops!
> > 

this doesn't seem right to me. This installation of Nagios-1.0 has had
object files (services, hosts, hostgroups, ..) and non object files in
the same directory without problem since conversion from Netsaint.

tsitc> ls /usr/local/nagios/etc/
RCS                             contactgroups.cfg-sample
escalations.cfg-sample          misccommands.cfg
resource.cfg                    timeperiods.cfg-sample
cgi.cfg                         contacts.cfg
help_covert_from_netsaint       misccommands.cfg-sample
resource.cfg-sample
cgi.cfg-sample                  contacts.cfg-sample
hostgroups.cfg                  misccommands.cfg.no_notify
sap_its.txt
checkcommands.cfg               dependencies.cfg
hostgroups.cfg-sample           misccommands.cfg.ok
services.cfg
checkcommands.cfg-sample        dependencies.cfg-sample
hosts.cfg                       nagios.cfg
services.cfg-sample
contactgroups.cfg               escalations.cfg
hosts.cfg-sample                nagios.cfg-sample
timeperiods.cfg
tsitc> 

tsitc> perl -ne 'print if \! /^#/ and \! /^$/ '
/usr/local/nagios/etc/cgi.cfg
main_config_file=/usr/local/nagios/etc/nagios.cfg
physical_html_path=/usr/local/nagios/share
url_html_path=/nagios
show_context_help=0
use_authentication=1

tsitc> head -60 /usr/local/nagios/etc/services.cfg | tail -35
#

################################################################################
# SERVICE DEFINITIONS
#
# SYNTAX:
#
################################################################################

# Generic service definition template
define service{
        name                            generic-service ; The 'name' of
this service template, referenced in other service definitions

        active_checks_enabled           1       ; Active service checks
are enabled
        passive_checks_enabled          1       ; Passive service checks
are enabled/accepted
        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           1       ; Service notifications
are enabled
        event_handler_enabled           1       ; Service event handler
is enabled
        flap_detection_enabled          1       ; Flap detection is
enabled
        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

        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        notification_interval           120
        notification_period             24x7
        notification_options            u,c,r

        register                        0       ; DONT REGISTER THIS
DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
tsitc> 


> > James Gotner

I am obviously not with you.

Please would you say again what you think is the cause of the problem
and how you dealt with it ?

Yours sincerely.

-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
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