Notifications Not Going Out - How can I test?

Wil Schultz wschultz at bsdboy.com
Thu May 24 01:08:01 CEST 2007


Do the logs show the notification as being sent?

-wil

On May 23, 2007, at 3:53 PM, Richard Solid wrote:

>
> I have everything configured and working with nagios except the  
> notifications. How can I fully test this?
>
> Mail is found in the path and I can send emails manually from the  
> machine to the outside.
>
> [root@]# whereis mail
> mail: /bin/mail
>
> This is the contact.cfg
>
> define contact{
>         contact_name                    admin
>         alias                                  Nagios Admin
>         service_notification_period     24x7
>         host_notification_period        24x7
>         service_notification_options    w,u,c,r,f,n
>         host_notification_options       d,r
>         service_notification_commands   notify-by-email
>         host_notification_commands      host-notify-by-email
>         email                           myemail at domain.tld
>         }
>
>
> This is the definition for emails:
>
> define command{
>         command_name    notify-by-email
>         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$
>
>
>
> define service{
>         name                            generic-service ; Generic  
> service name
>         active_checks_enabled           1               ; Active  
> service checks are enabled
>         passive_checks_enabled          1               ; Passive  
> service checks are enabled/accepted
>         parallelize_check               1               ; Active  
> service checks should be parallelized (disabling this can lead to  
> major performance problems)
>         obsess_over_service             1               ; We should  
> obsess over this service (if necessary)
>         check_freshness                 0               ; Default  
> is to NOT check service 'freshness'
>         notifications_enabled           1               ; Service  
> notifications are enabled
>         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
>         register                        0               ; DONT  
> REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
>         }
>
>
> This is the first part of my services.cfg:
>
>
> # Generic for all services
> define service{
>         use                             generic-service
>         name                            basic-service
>         is_volatile                     0
>         check_period                    24x7
>         max_check_attempts              15
>         normal_check_interval           10
>         retry_check_interval            2
>         notification_interval           120
>         notification_period             24x7
>         register                        0
>         }
>
>
> define service{
>         use                             basic-service
>         name                            ping-service
>         notification_options            n
>         check_command                   check_ping!1000.0,20%! 
> 2000.0,60%
>         register                        0
>         }
>
> define service{
>         use                                   ping-service
>         service_description             PING
>         contact_groups                  admins
>
>         hostgroup_name                myservers
>         }
>
>
> Any inputs?
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/ 
> _______________________________________________
> 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


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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