Segmentation fault

Tony Heal theal at pace2020.com
Sun Jul 16 22:45:53 CEST 2006


sorry, I want to put the configurations for each host into a single file per
host.
 
 
Tony Heal
Pace Systems Group, Inc.
800-624-5999
theal at pace2020.com
 
 


  _____  

From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Tony Heal
Sent: Sunday, July 16, 2006 4:14 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Segmentation fault


I am trying to put all configurations for each host into a single file. I am
trying to automate adding removing monitored hosts. I have a script that
creates the following, but when I run the verification on it I get the
following error:
 
/usr/local/bin/check_nagios: line 3:  3278 Segmentation fault
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
 
This is on an old version of nagios 2.0b2
 
I plan on updating this to use the version in Debian sarge, but first I must
prove that this new process is feasible.
 
Any help would be great.


Thanks in advance
Tony Heal
 
 

here are the changes to nagios.cfg. I remarked out the relevant cfg files
and added a cfg_dir
__nagios.cfg__
# You can split other types of object definitions across several
# config files if you wish (as done here), or keep them all in a
# single config file.
 
cfg_file=/usr/local/nagios/etc/contactgroups.cfg
cfg_file=/usr/local/nagios/etc/contacts.cfg
#cfg_file=/usr/local/nagios/etc/dependencies.cfg
#cfg_file=/usr/local/nagios/etc/escalations.cfg
#cfg_file=/usr/local/nagios/etc/hostgroups.cfg
#cfg_file=/usr/local/nagios/etc/hosts.cfg
#cfg_file=/usr/local/nagios/etc/services.cfg
#cfg_file=/usr/local/nagios/etc/servicegroup.cfg
cfg_file=/usr/local/nagios/etc/timeperiods.cfg
 
# Extended host/service info definitions are now stored along with
# other object definitions:
#cfg_file=/usr/local/nagios/etc/hostextinfo.cfg
#cfg_file=/usr/local/nagios/etc/serviceextinfo.cfg
 
# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:
 
#cfg_dir=/usr/local/nagios/etc/servers
#cfg_dir=/usr/local/nagios/etc/printers
#cfg_dir=/usr/local/nagios/etc/switches
#cfg_dir=/usr/local/nagios/etc/routers
cfg_dir=/usr/local/nagios/etc/clienthosts
**__nagios.cfg__**
 
__client.cfg__
define host{
    name                            generic-host
    host_name                       TEST_SERVER
    alias                           TEST_SERVER
    address                         TEST_SERVER.cust.pace2020.com
    notifications_enabled     1 ; Host notifications are enabled
    event_handler_enabled     1 ; Host 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
    max_check_attempts             20
    notification_interval           60
    notification_period             24x7
    notification_options            d,u,r
    retain_nonstatus_information    1 ; Retain non-status information across
program restarts
    contact_groups                  network-admins
    }
    
 
define hostgroup{
    hostgroup_name             hostgroup.test.common
    alias              test services
    members              TEST_SERVER
    }
 
define servicedependency{
    host_name                       TEST_SERVER
    service_description             test.memory.total
    dependent_host_name             TEST_SERVER
    dependent_service_description   test.memory.free
    notification_failure_criteria   o    ; criteria for which notifications
will be supressed
    }
 
define servicedependency{
    host_name                       TEST_SERVER
    service_description             cc.memory.total
    dependent_host_name             TEST_SERVER
    dependent_service_description   cc.memory.free
    notification_failure_criteria   o    ; criteria for which notifications
will be supressed
    }
 
define servicegroup{ 
    servicegroup_name common
    alias             common
    members           TEST_SERVER
    }
 
# Generic service definition template
define service{
 name                            standard-passive      ; The 'name' of this
service template, ref'd in other service definitions
 active_checks_enabled           0       ; Active service checks are enabled
 passive_checks_enabled          1       ; Passive service checks are
enabled/accepted
 parallelize_check               1       ; Active service checks should be
parallelized (do not disabling)
 obsess_over_service             1       ; We should obsess over this
service (if necessary)
 check_freshness                 1
 freshness_threshold             900               ; 15 minutes threshold to
determine if checks are stale
 notifications_enabled           1       ; Service notifications are enabled
 notification_interval           0
 notification_period             24x7
 notification_options            w,u,c,r
 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
 contact_groups                  network-admins
 check_command                   stale-checks             ; this command is
run only if the service results are "stale"
 register                        0       ; DONT REGISTER THIS DEFINITION -
ITS NOT A REAL SERVICE, JUST A TEMPLATE!
 }
# Service definition cpu.load.fifteen
define service{
    use                             standard-passive         ; Name of
service template to use
    service_description             cpu.load.fifteen
    hostgroup_name                  hostgroup.test.common
    }
 
# Service definition cpu.load.five
define service{
    use                             standard-passive         ; Name of
service template to use
    service_description             cpu.load.five
    hostgroup_name                  hostgroup.test.common
    }
**__client.cfg__**
 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060716/532183a1/attachment.html>
-------------- next part --------------

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------- next part --------------
_______________________________________________
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