<div><font color="#333333">Dear All,</font></div>
<div> </div>
<div><font color="#333333">I am able to send mails to my persoanl email id by "mail" command.<br>But notification is not going. I have configured sendmail. I am not<br>even receiving mails on local system at nagios@localhost
( I tried).<br>I am even not getting any error messages in logs of nagios.</font></div>
<div><font color="#333333"></font> </div>
<div><font color="#333333">I am using solaris 8. Pls also suggest how we can specify subject as in solaris i did n't find option of specifying subject.</font></div>
<div><font color="#333333"></font> </div>
<div><font color="#333333">contacts.cfg</font></div>
<div><font color="#333333">define contact{<br> contact_name nagios<br> alias Nagios Admin<br> service_notification_period 24x7<br> host_notification_period 24x7
<br> service_notification_options w,u,c,r<br> host_notification_options d,u,r<br> service_notification_commands notify-by-email<br> host_notification_commands host-notify-by-email
<br> email <a href="mailto:sap-ops.mumbai@ril.com">sap-ops.mumbai@ril.com</a><br> }<br>hostgroups.cfg</font></div>
<div><font color="#333333"></font> </div>
<div><font color="#333333">define hostgroup{<br> hostgroup_name solaris-boxes<br> alias Solaris Servers<br> contact_groups solaris-admins<br> members Blaze</font></div>
<div><font color="#333333">}</font></div>
<div><font color="#333333"></font> </div>
<div><font color="#333333">contactgroups.cfg</font></div>
<div><font color="#333333">define contactgroup{<br> contactgroup_name solaris-admins<br> alias Solaris Administrators<br> members nagios<br>}</font></div>
<div><font color="#333333"></font> </div>
<div><font color="#333333">
<p>define host{<br> name generic-host ; The name of this host template - referenced in other host definition<br>s, used for template recursion/resolution<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> retain_nonstatus_information 1 ; Retain non-status information across program restarts</p>
<p> register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!<br> }</p>
<p>hosts.cfg</p>
<p># 'Solaris' host definition<br>define host{<br> use generic-host ; Name of host template to use<br> host_name Blaze<br> alias Solaris Server
<br> address <a href="http://10.8.217.251">10.8.217.251</a><br> check_command check-host-alive<br> max_check_attempts 10<br> notification_interval 480<br> notification_period 24x7
<br> notification_options d,u,r<br> }</p>
<p><br>services.cfg</p>
<p>define service{<br> name generic-service ; The 'name' of this service template, referenced in other service def<br>initions<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 maj
<br>or 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> 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
</p>
<p> register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!<br> }</p>
<p># Service definition<br>define service{<br> use generic-service ; Name of service template to use</p>
<p> host_name Blaze<br> service_description PING<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 solaris-admins<br> notification_interval 240<br> notification_period 24x7
<br> notification_options c,r<br> check_command check_ping!100.0,20%!500.0,60%<br> }<br>misccommands.cfg</p>
<p># '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: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
<br> }</p>
<p><br># 'host-notify-by-email' command definition<br>define command{<br> command_name host-notify-by-email<br> command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $DATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
<br> }<br></p></font></div>