Mail not working

Brad Dunn bdunn at rdac.com.au
Thu Jul 8 08:35:45 CEST 2004


 
In regards to this, I've managed to get emails working but only from the
CLI

If I run this (which is now my new defined command)

/usr/bin/printf "***** Nagios 1.0 *****\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$: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$"
alerts at rdac.com.au

>From the command line, I get the following email.


***** Nagios 1.0 *****
Notification Type: $

Service: $
Host: $
Address: $
State: $

Date/Time: $

Additional Info:

$


Now the actual content of the email is ok, I can trouble shoot that as
it is, however Nagios isn't sending notifications on its own. Now I've
defined it as

# ;notify-by-email' command definition
define command{
        command_name    notify-by-email


Here is an example of a service that is always down

# Service definition
define service{
        use                             generic-service         ; Name
of service template to use

        host_name                       megatron
        service_description             pop
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           1
        retry_check_interval            1
        contact_groups                  linux-admins
        notification_interval           120
        notification_period             24x7
        notification_options            c,r
        check_command                   check_pop
        }



And here is my alerts


# 'nagios' contact definition
define contact{
        contact_name                    nagios
        alias                           Nagios Admin
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-email
        host_notification_commands      host-notify-by-email
        email                           alerts at rdac.com.au
        }



Any reason why I don't get the alerts from nagios, but I can run the top
command manually and I get a response.

- Brad



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
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