Announcement

Collapse
No announcement yet.

E-Mail notification not working: SOLVED

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • E-Mail notification not working: SOLVED

    Hi,

    I've been able to successfully get Oreon/Nagios installed (which was amazingly easy). However, like a couple of other people on this forum, I can't get e-mail notifications working.

    Here's the relevant part of nagios.cfg:
    Code:
    enable_notifications=1
    And services.cfg:
    Code:
    define service{
            use                             STemplate_MegaRAID
            service_description             MegaRAID
            host_name                               dummybox
            max_check_attempts                      5
            normal_check_interval           10
            retry_check_interval            2
            check_period                    24x7
            notification_interval           30
            notification_period             24x7
            notification_options            c,r
            contact_groups                  ops
            }
    Finally, contacts.cfg:
    Code:
    define contact{
            contact_name                    ops
            alias                           ops
            host_notification_period                24x7
            host_notification_options               d,u,r
            host_notification_commands              host-notify-by-email
            service_notification_period             24x7
            service_notification_options    w,u,c,r
            service_notification_commands   notify-by-email
            email                           [email protected]
    }
    E-mail can be sent successfully from the shell using the commands in misccommands.cfg

    Any ideas?

    Mike

  • #2
    Did you install and configure your mail relay server on nagios/Oreon server ?

    If you didn't, read this doc:
    http://wiki.oreon-project.org/wakka....ConfigSendMail
    Ubuntu 8.04
    Nagios 3.2 + nagios-plugins-1.4.14
    ndoutils-1.4b9
    Centreon 2.1.8
    centreon-syslog-frontend-1.2.1 + centreon-syslog-server-1.1

    Comment


    • #3
      Thanks for the response.

      Yes, sendmail is functioning correctly. I can send e-mail from the command line without problems.

      Also, I've noticed that machines that have service problems don't have an "Acknowledge this service problem" link. Maybe Oreon doesn't recognize that these hosts are supposed to send out notifications? Is there anywhere else I should look?

      Comment


      • #4
        oreon doesn't send mail. It's nagios. Your problem is strange. have you tested the notification command with your shell command line ?
        Julien Mathis
        Centreon Project Leader
        www.merethis.com |

        Comment


        • #5
          I agree that the problem is strange, considering that everything else is working fine....The command:
          Code:
          /usr/bin/printf "%b" "***** Nagios 1.X *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" [email protected]
          Works fine. Is there anything else I should be looking at within the Nagios config files?

          Thanks!

          Comment


          • #6
            How embarassing. It turns out e-mail was being sent (after digging through the sendmail logs). An overzealous SPAM filter was deleting the notification e-mails before they could be delivered.

            Thanks to all for the help!

            Comment

            Working...
            X