<!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.2722" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=036565318-31102005><FONT face=Arial size=2>I'm working on 
getting a nagios install up at my workplace and have run into a problem I can't 
figure out: e-mail notices are not being sent out. I'm using v2.0b4 on a Fedora 
Core 4 install. I have not altered the sendmail config files in any way (I don't 
**THINK** I need to). </FONT></SPAN></DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial size=2>The install works 
and properly tests our various "live" hosts. The website displays information 
correctly. There's just no e-mail going out.</FONT></SPAN></DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial size=2>For testing, I 
created a host file for a machine that doesn't exist. This ensures all the 
nagios tests will fail without requiring me to take down a real server. Here's 
what I get in the logs:</FONT></SPAN></DIV>
<DIV><SPAN class=036565318-31102005></SPAN> </DIV>
<DIV><SPAN class=036565318-31102005> <FONT face=Arial size=2>LOG FILE 
ENTRIES:<BR>=================<BR>[1130527025] SERVICE ALERT: fail tester;Web 
Server;CRITICAL;SOFT;2;No route to host<BR>[1130527085] SERVICE ALERT: fail 
tester;Web Server;CRITICAL;SOFT;3;No route to host<BR>[1130527145] SERVICE 
ALERT: fail tester;Web Server;CRITICAL;HARD;4;No route to 
host<BR></FONT></SPAN></DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial size=2>From my reading of 
the archives and various FAQs, there's supposed to be an ACTION entry in there 
somewhere. This makes me think I've turned something off, but I can't figure out 
where. All relevant cfg files (that I could think of) are below. The test fails 
properly (against the nonexistent host) when I run it on the command line, and 
the "notify-by-email" command works when I enter that at the command 
line.</FONT></SPAN></DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial size=2>It *does* appear to 
have tried e-mailing SOMETHING early on in the testing, but seems to have been 
unable to substitute values for the variables (it sent two messages, and no 
more, to <A href="mailto:$@[host">$@[host</A>], with all the other variables 
also seeming to be null). </FONT></SPAN></DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial size=2>I'm hoping this is a 
straightforward "dur, change this" sort of problem. Apologies in advance if this 
is in a FAQ or archive message somewhere. If so just send me the link and I'll 
be on my way. Thanks in advance for any help you can 
provide!</FONT></SPAN></DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial 
size=2></FONT></SPAN> </DIV><SPAN class=036565318-31102005><FONT face=Arial 
size=2>
<DIV><BR>SERVICE DEFINITION:<BR>=======================</DIV>
<DIV> </DIV>
<DIV>define service{<BR>        
name                            
generic-service ; The 'name' of this service 
template<BR>        
active_checks_enabled           
1       ; 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 (disabling this can lead to major performance 
problems)<BR>        
obsess_over_service             
1       ; We should obsess over this service (if 
necessary)<BR>        
check_freshness                 
0       ; Default is to NOT check service 
'freshness'<BR>        
notifications_enabled           
1       ; Service notifications are 
enabled<BR>        
event_handler_enabled           
1       ; Service event handler is 
enabled<BR>        
flap_detection_enabled          
1       ; Flap detection is 
enabled<BR>        
failure_prediction_enabled      
1       ; Failure prediction 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>        
register                        
0       ; DONT REGISTER THIS DEFINITION - ITS NOT 
A REAL SERVICE, JUST A TEMPLATE!<BR>        
}</DIV>
<DIV> </DIV>
<DIV>define service{<BR>        
use                             
generic-service         ; Name of 
service template to use<BR>        
host_name                       
fail tester<BR>        
service_description             
Web Server<BR>        
is_volatile                     
0<BR>        
check_period                    
24x7<BR>        
max_check_attempts              
4<BR>        
normal_check_interval           
5<BR>        
retry_check_interval            
1<BR>        
contact_groups                  
IT-admin<BR>        
notification_interval           
15<BR>        
notification_period             
24x7<BR>  check_command     check_http!failtester.[domain]![ip 
#]<BR>        }</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>CONTACT DEFINITION:<BR>=====================</DIV>
<DIV> </DIV>
<DIV>define contactgroup{<BR>        
contactgroup_name       
IT-admin<BR>        
alias                   
Main Admins<BR>        
members                 
scott<BR>        }</DIV>
<DIV> </DIV>
<DIV>define contact{<BR>        
contact_name                    
scott<BR>        
alias                           
NAMI network administrator<BR>        
service_notification_period     
24x7<BR>        
host_notification_period        
24x7<BR>        
service_notification_options    
w,u,c,r<BR>        
host_notification_options       
d,r<BR>        
service_notification_commands   
notify-by-email<BR>        
host_notification_commands      
host-notify-by-email<BR>        
email                           
<A 
href="mailto:scott@[domain">scott@[domain</A>]<BR>        
}</DIV>
<DIV> </DIV>
<DIV><BR>HOST DEFINITION:<BR>==================</DIV>
<DIV> </DIV>
<DIV>define host{<BR>        
name                            
generic-host    ; The name of this host 
template<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>        
failure_prediction_enabled      
1       ; Failure prediction 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>        
register                        
0       ; DONT REGISTER THIS DEFINITION - ITS NOT 
A REAL HOST, JUST A TEMPLATE!<BR>}</DIV>
<DIV> </DIV>
<DIV>define host {<BR> host_name  fail 
tester<BR> use             
generic-host            ; 
Name of host template to use<BR> alias    A machine that 
doesn't exist <BR> address   [IP 
#]<BR> max_check_attempts 3<BR> check_period  24x7<BR> contact_groups  IT-admin<BR> notification_interval 60<BR> notification_period 24x7<BR> notification_options d,u,r <BR>}</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>EMAIL COMMAND:<BR>===================<BR># 'notify-by-email' command 
definition<BR>define 
command{<BR> command_name notify-by-email<BR> command_line /usr/bin/printf 
"%b" "***** Nagios  *****\n\nNotification Type: 
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: 
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional 
Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - 
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$<BR> }</DIV>
<DIV> </DIV>
<DIV><BR>##############################################################################<BR>#<BR># 
NAGIOS.CFG - Sample Main Config File for Nagios </DIV>
<DIV> </DIV>
<DIV><BR>log_file=/usr/local/nagios/var/nagios.log</DIV>
<DIV> </DIV>
<DIV>cfg_file=/usr/local/nagios/etc/hosts.cfg<BR>cfg_file=/usr/local/nagios/etc/timeperiod.cfg<BR>cfg_file=/usr/local/nagios/etc/contacts.cfg<BR>cfg_file=/usr/local/nagios/etc/command.cfg<BR>cfg_file=/usr/local/nagios/etc/commands2.cfg<BR>cfg_file=/usr/local/nagios/etc/hostgroups.cfg</DIV>
<DIV> </DIV>
<DIV>cfg_dir=/usr/local/nagios/etc/servers</DIV>
<DIV> </DIV>
<DIV>object_cache_file=/usr/local/nagios/var/objects.cache</DIV>
<DIV> </DIV>
<DIV>resource_file=/usr/local/nagios/etc/resource.cfg</DIV>
<DIV> </DIV>
<DIV>status_file=/usr/local/nagios/var/status.dat</DIV>
<DIV> </DIV>
<DIV>nagios_user=nagios</DIV>
<DIV> </DIV>
<DIV>nagios_group=nagios</DIV>
<DIV> </DIV>
<DIV>check_external_commands=1</DIV>
<DIV> </DIV>
<DIV>command_check_interval=-1</DIV>
<DIV> </DIV>
<DIV>command_file=/usr/local/nagios/var/rw/nagios.cmd</DIV>
<DIV> </DIV>
<DIV>comment_file=/usr/local/nagios/var/comments.dat</DIV>
<DIV> </DIV>
<DIV>downtime_file=/usr/local/nagios/var/downtime.dat</DIV>
<DIV> </DIV>
<DIV>lock_file=/usr/local/nagios/var/nagios.lock</DIV>
<DIV> </DIV>
<DIV>temp_file=/usr/local/nagios/var/nagios.tmp</DIV>
<DIV> </DIV>
<DIV>event_broker_options=-1</DIV>
<DIV> </DIV>
<DIV>log_rotation_method=d</DIV>
<DIV> </DIV>
<DIV>log_archive_path=/usr/local/nagios/var/archives</DIV>
<DIV> </DIV>
<DIV>use_syslog=1</DIV>
<DIV> </DIV>
<DIV>log_notifications=1</DIV>
<DIV> </DIV>
<DIV>log_service_retries=1</DIV>
<DIV> </DIV>
<DIV>log_host_retries=1</DIV>
<DIV> </DIV>
<DIV>log_event_handlers=1</DIV>
<DIV> </DIV>
<DIV>log_initial_states=0</DIV>
<DIV> </DIV>
<DIV>log_external_commands=1</DIV>
<DIV> </DIV>
<DIV>log_passive_checks=1</DIV>
<DIV> </DIV>
<DIV>service_inter_check_delay_method=s</DIV>
<DIV> </DIV>
<DIV>max_service_check_spread=30</DIV>
<DIV> </DIV>
<DIV>service_interleave_factor=s</DIV>
<DIV> </DIV>
<DIV>host_inter_check_delay_method=s</DIV>
<DIV> </DIV>
<DIV>max_host_check_spread=30</DIV>
<DIV> </DIV>
<DIV>max_concurrent_checks=0</DIV>
<DIV> </DIV>
<DIV>service_reaper_frequency=10</DIV>
<DIV> </DIV>
<DIV>auto_reschedule_checks=0</DIV>
<DIV> </DIV>
<DIV>auto_rescheduling_interval=30</DIV>
<DIV> </DIV>
<DIV>auto_rescheduling_window=180</DIV>
<DIV> </DIV>
<DIV>sleep_time=0.25</DIV>
<DIV> </DIV>
<DIV>service_check_timeout=60<BR>host_check_timeout=30<BR>event_handler_timeout=30<BR>notification_timeout=30<BR>ocsp_timeout=5<BR>perfdata_timeout=5</DIV>
<DIV> </DIV>
<DIV>retain_state_information=1</DIV>
<DIV> </DIV>
<DIV>state_retention_file=/usr/local/nagios/var/retention.dat</DIV>
<DIV> </DIV>
<DIV>retention_update_interval=60</DIV>
<DIV> </DIV>
<DIV>use_retained_program_state=1</DIV>
<DIV> </DIV>
<DIV>use_retained_scheduling_info=0</DIV>
<DIV> </DIV>
<DIV>interval_length=60</DIV>
<DIV> </DIV>
<DIV>use_aggressive_host_checking=0</DIV>
<DIV> </DIV>
<DIV>execute_service_checks=1</DIV>
<DIV> </DIV>
<DIV>accept_passive_service_checks=1</DIV>
<DIV> </DIV>
<DIV>execute_host_checks=1</DIV>
<DIV> </DIV>
<DIV>accept_passive_host_checks=1</DIV>
<DIV> </DIV>
<DIV>enable_notifications=1</DIV>
<DIV> </DIV>
<DIV>enable_event_handlers=1</DIV>
<DIV> </DIV>
<DIV>process_performance_data=0</DIV>
<DIV> </DIV>
<DIV>obsess_over_services=0</DIV>
<DIV> </DIV>
<DIV>check_for_orphaned_services=0</DIV>
<DIV> </DIV>
<DIV>check_service_freshness=1</DIV>
<DIV> </DIV>
<DIV>service_freshness_check_interval=60</DIV>
<DIV> </DIV>
<DIV>check_host_freshness=0</DIV>
<DIV> </DIV>
<DIV>host_freshness_check_interval=60</DIV>
<DIV> </DIV>
<DIV>aggregate_status_updates=1</DIV>
<DIV> </DIV>
<DIV>status_update_interval=15</DIV>
<DIV> </DIV>
<DIV>enable_flap_detection=0</DIV>
<DIV> </DIV>
<DIV>low_service_flap_threshold=5.0<BR>high_service_flap_threshold=20.0<BR>low_host_flap_threshold=5.0<BR>high_host_flap_threshold=20.0</DIV>
<DIV> </DIV>
<DIV>date_format=us</DIV>
<DIV> </DIV>
<DIV>p1_file=/usr/local/nagios/bin/p1.pl</DIV>
<DIV> </DIV>
<DIV>illegal_object_name_chars=`~!$%^&*|'"<>?,()=</DIV>
<DIV> </DIV>
<DIV>illegal_macro_output_chars=`~$&|'"<></DIV>
<DIV> </DIV>
<DIV>use_regexp_matching=0</DIV>
<DIV> </DIV>
<DIV>use_true_regexp_matching=0</DIV>
<DIV> </DIV>
<DIV>admin_email=nagios</DIV>
<DIV> </DIV>
<DIV>admin_pager=pagenagios</DIV>
<DIV> </DIV>
<DIV>daemon_dumps_core=0</DIV>
<DIV> </DIV>
<DIV># EOF (End of file)</DIV>
<DIV> </DIV>
<DIV></FONT></SPAN> </DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=036565318-31102005><FONT face=Arial 
size=2> </DIV></FONT></SPAN></BODY></HTML>