<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006>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:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006>/usr/local/bin/check_nagios: line 3:  3278 
Segmentation fault      /usr/local/nagios/bin/nagios -v 
/usr/local/nagios/etc/nagios.cfg</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006>This is on an old 
version of nagios 2.0b2</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006>I plan on updating 
this to use the version in Debian sarge, but first I must prove that this new 
process is feasible.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006></SPAN></FONT> </DIV>
<DIV><FONT><SPAN class=218334419-16072006><FONT face=Arial size=2>Any help would 
be great.</FONT></DIV>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV>
<DIV>
<DIV align=left><FONT face=Arial size=2><SPAN class=218334419-16072006>Thanks in 
advance</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Tony Heal</FONT></DIV>
<DIV align=left><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2></FONT> </DIV></SPAN></FONT><FONT 
face=Arial size=2><SPAN class=218334419-16072006></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006>here are the changes 
to nagios.cfg. I remarked out the relevant cfg files and added a 
cfg_dir</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006>__nagios.cfg__</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006># You can split 
other types of object definitions across several<BR># config files if you wish 
(as done here), or keep them all in a<BR># single config 
file.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006>cfg_file=/usr/local/nagios/etc/contactgroups.cfg<BR>cfg_file=/usr/local/nagios/etc/contacts.cfg<BR>#cfg_file=/usr/local/nagios/etc/dependencies.cfg<BR>#cfg_file=/usr/local/nagios/etc/escalations.cfg<BR>#cfg_file=/usr/local/nagios/etc/hostgroups.cfg<BR>#cfg_file=/usr/local/nagios/etc/hosts.cfg<BR>#cfg_file=/usr/local/nagios/etc/services.cfg<BR>#cfg_file=/usr/local/nagios/etc/servicegroup.cfg<BR>cfg_file=/usr/local/nagios/etc/timeperiods.cfg</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006># Extended 
host/service info definitions are now stored along with<BR># other object 
definitions:<BR>#cfg_file=/usr/local/nagios/etc/hostextinfo.cfg<BR>#cfg_file=/usr/local/nagios/etc/serviceextinfo.cfg</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006># You can also tell 
Nagios to process all config files (with a .cfg<BR># extension) in a particular 
directory by using the cfg_dir<BR># directive as shown 
below:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006>#cfg_dir=/usr/local/nagios/etc/servers<BR>#cfg_dir=/usr/local/nagios/etc/printers<BR>#cfg_dir=/usr/local/nagios/etc/switches<BR>#cfg_dir=/usr/local/nagios/etc/routers<BR>cfg_dir=/usr/local/nagios/etc/clienthosts<BR>**__nagios.cfg__**</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=218334419-16072006>__client.cfg__</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006>define 
host{<BR>    
name                            
generic-host<BR>    
host_name                       
TEST_SERVER<BR>    
alias                           
TEST_SERVER<BR>    
address                         
TEST_SERVER.cust.pace2020.com<BR>    
notifications_enabled     1 ; Host notifications are 
enabled<BR>    event_handler_enabled     
1 ; Host event handler is enabled<BR>    
flap_detection_enabled     1 ; Flap detection is 
enabled<BR>    process_perf_data      
1 ; Process performance data<BR>    
retain_status_information     1 ; Retain status 
information across program restarts<BR>    
max_check_attempts             
20<BR>    
notification_interval           
60<BR>    
notification_period             
24x7<BR>    
notification_options            
d,u,r<BR>    retain_nonstatus_information    
1 ; Retain non-status information across program 
restarts<BR>    
contact_groups                  
network-admins<BR>    }<BR>    
</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006>define 
hostgroup{<BR>    
hostgroup_name             
hostgroup.test.common<BR>    
alias              
test services<BR>    
members              
TEST_SERVER<BR>    }</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006>define 
servicedependency{<BR>    
host_name                       
TEST_SERVER<BR>    
service_description             
test.memory.total<BR>    
dependent_host_name             
TEST_SERVER<BR>    dependent_service_description   
test.memory.free<BR>    notification_failure_criteria   
o    ; criteria for which notifications will be 
supressed<BR>    }</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006>define 
servicedependency{<BR>    
host_name                       
TEST_SERVER<BR>    
service_description             
cc.memory.total<BR>    
dependent_host_name             
TEST_SERVER<BR>    dependent_service_description   
cc.memory.free<BR>    notification_failure_criteria   
o    ; criteria for which notifications will be 
supressed<BR>    }</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006>define servicegroup{ 
<BR>    servicegroup_name common<BR>    
alias             
common<BR>    
members           
TEST_SERVER<BR>    }</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006># Generic service 
definition template<BR>define 
service{<BR> name                            
standard-passive      ; The 'name' of this service 
template, ref'd in other service 
definitions<BR> active_checks_enabled           
0       ; Active service checks are 
enabled<BR> passive_checks_enabled          
1       ; Passive service checks are 
enabled/accepted<BR> parallelize_check               
1       ; Active service checks should be 
parallelized (do not 
disabling)<BR> obsess_over_service             
1       ; We should obsess over this service (if 
necessary)<BR> check_freshness                 
1<BR> freshness_threshold             
900               
; 15 minutes threshold to determine if checks are 
stale<BR> notifications_enabled           
1       ; Service notifications are 
enabled<BR> notification_interval           
0<BR> notification_period             
24x7<BR> notification_options            
w,u,c,r<BR> event_handler_enabled           
1       ; Service event handler is 
enabled<BR> flap_detection_enabled          
1       ; Flap detection is 
enabled<BR> process_perf_data               
1       ; Process performance 
data<BR> retain_status_information       
1       ; Retain status information across program 
restarts<BR> retain_nonstatus_information    
1       ; Retain non-status information across 
program 
restarts<BR> is_volatile                     
0<BR> check_period                    
24x7<BR> max_check_attempts              
3<BR> normal_check_interval           
5<BR> retry_check_interval            
1<BR> contact_groups                  
network-admins<BR> check_command                   
stale-checks             
; this command is run only if the service results are 
"stale"<BR> register                        
0       ; DONT REGISTER THIS DEFINITION - ITS NOT 
A REAL SERVICE, JUST A TEMPLATE!<BR> }<BR># Service definition 
cpu.load.fifteen<BR>define service{<BR>    
use                             
standard-passive         ; Name of 
service template to use<BR>    
service_description             
cpu.load.fifteen<BR>    
hostgroup_name                  
hostgroup.test.common<BR>    }</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=218334419-16072006># Service definition 
cpu.load.five<BR>define service{<BR>    
use                             
standard-passive         ; Name of 
service template to use<BR>    
service_description             
cpu.load.five<BR>    
hostgroup_name                  
hostgroup.test.common<BR>    
}<BR>**__client.cfg__**</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>