<br style="font-weight: bold;"><span style="font-weight: bold;">I have everything configured and working with nagios except the notifications. How can I fully test this?</span><br style="font-weight: bold;"><br style="font-weight: bold;">
<span style="font-weight: bold;">Mail is found in the path and I can send emails manually from the machine to the outside.</span><br><br><span style="font-style: italic;">[root@]# whereis mail</span><br style="font-style: italic;">
<span style="font-style: italic;">
mail: /bin/mail<br><br><span style="font-weight: bold;">This is the contact.cfg</span><br></span><br><span style="font-style: italic;">define contact{</span><br style="font-style: italic;"><span style="font-style: italic;">
        contact_name                    admin</span><br style="font-style: italic;"><span style="font-style: italic;">        alias                                  Nagios Admin</span><br style="font-style: italic;"><span style="font-style: italic;">
        service_notification_period     24x7</span><br style="font-style: italic;"><span style="font-style: italic;">        host_notification_period        24x7</span><br style="font-style: italic;"><span style="font-style: italic;">
        service_notification_options    w,u,c,r,f,n</span><br style="font-style: italic;"><span style="font-style: italic;">        host_notification_options       d,r</span><br style="font-style: italic;"><span style="font-style: italic;">
        service_notification_commands   notify-by-email</span><br style="font-style: italic;"><span style="font-style: italic;">        host_notification_commands      host-notify-by-email</span><br style="font-style: italic;">
<span style="font-style: italic;">        email                           <a href="mailto:myemail@domain.tld">myemail@domain.tld</a></span><br style="font-style: italic;"><span style="font-style: italic;">        }</span>
<br style="font-style: italic;"><br><br><span style="font-weight: bold;">This is the definition for emails:</span><br><br><span style="font-style: italic;">define command{</span><br style="font-style: italic;"><span style="font-style: italic;">
        command_name    notify-by-email</span><br style="font-style: italic;"><span style="font-style: italic;">        command_line    /usr/bin/printf "%b" "***** Nagios 2.9 *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
</span><br><br><br><br>define service{<br>        name                            generic-service ; Generic service name<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>        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>        }<br><br><br><span style="font-weight: bold;">This is the first part of my services.cfg:</span><br><br><br># Generic for all services<br>define service{<br>        use                             generic-service
<br>        name                            basic-service<br>        is_volatile                     0<br>        check_period                    24x7<br>        max_check_attempts              15<br>        normal_check_interval           10
<br>        retry_check_interval            2<br>        notification_interval           120<br>        notification_period             24x7<br>        register                        0<br>        }<br><br><br>define service{
<br>        use                             basic-service<br>        name                            ping-service<br>        notification_options            n<br>        check_command                   check_ping!1000.0,20%!2000.0,60%
<br>        register                        0<br>        }<br><br>define service{<br>        use                                   ping-service<br>        service_description             PING<br>        contact_groups                  admins
<br><br>        hostgroup_name                myservers<br>        }<br><br><br>Any inputs?<br>