Icinga2 Problem setting up email notification

This forum was archived to /woltlab and is now in read-only mode.
  • Hey guys,


    I finally setup icinga2 / icingaweb2 and icinga director.


    I can monitor hosts and services by adding them over icinga director everything just works fine with that.


    My problem right now is i try to get email notifications if a host is down or gets up (or any service that has problems).


    What I did till now :


    - Install postfix and mailutils

    - configure postfix

    -> sending mails with = mail -s "TEST" works fine ! I receive those mails i send via the terminal !


    after this 3 steps I changed the scripts under /etc/icinga2/scripts


    mail-host-notification

    mail-service-notification


    The only thing I did here was changing the last line :


    OLD :

    mail -s ....


    NEW :

    mail -S smtp=MY.SERVER.ADRESS:PORT -s

    ____________________________________________________


    after i have done all this


    I went to Director

    I defined an user with an email address...


    I went to notifications under icinga Director :


    - created a template for the timeperiod

    - created notificationtemplate

    - created notification


    SCREENSHOTS NOTIFICATIONS :


    TIMEPERIOD :


    NOTIFICATIONTEMPLATE :


    NOTIFICATION :




    What am I doing wrong here ?

    Or did i forget somthing ?


    Many Thanks!!!!

  • can you verify that the notification is applied to the host you want them on?

    Also you should not add Filter in the Notification Object, if you have already defined them in the Template, as I believe they will overwrite each other.

    Linux is dead, long live Linux


    Remember to NEVER EVER use git repositories in a productive environment if you CAN NOT control them

  • The option "Apply where" I define the IP address of the host.. isn't the notification now applied on the host if I just define the IP address of the host right there ?


    For me I have no clue right now where to look at and what to do right now I'm absolutely clueless.

  • could you show me the previews of all the notification objects you defined?

    Linux is dead, long live Linux


    Remember to NEVER EVER use git repositories in a productive environment if you CAN NOT control them

  • This is what i did.

    I created 1 Template.

    For testing i created 2 notification objects.

    1 for UP state

    and 1 for DOWN state.


    And both of those notification objects have the same setting (except the state).

    (Picture of setting you can see up on thread start)


    EDIT :

    when i run the script in terminal i get a mail to my address

    The post was edited 1 time, last by bizzar ().