Changes between Version 4 and Version 5 of NSM2021/Agenda/AlertsIcinga2Email


Ignore:
Timestamp:
May 21, 2021, 8:05:55 PM (4 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NSM2021/Agenda/AlertsIcinga2Email

    v4 v5  
    4747Test mail transport by `mail -s "Hello World" youremail@yourdomain.tld`
    4848
     49=== Create users who needs to be notified ===
     50
     51On your Icinga Director web portal, goto `Users/Contacts`
     52
     53[[Image(Users-Contacts.png, 600px, nolink)]]
     54
     55and then to  User Groups. Create a `User group` as follows by clicking `+Add`.
     56
     57[[Image(UserGroup.png, 800px, nolink)]]
     58
     59Next, Click on the 'Templates' tab under `Users/Contacts` and create a new template with `+Add` having the following details.
     60
     61[[Image(User-Temp.png, 800px, nolink)]]
     62
     63For the States and Transition Types, you have to select all available, one by one.
     64
     65Next Go to the Users Tab and add Users of your choice as per the below example. (these users are only for the notification purposes, they cannot log in to Icinga System )
     66
     67[[Image(user.png, 800px, nolink)]]
     68
    4969
    5070=== Enable Email Notifications from Director ===
     
    7696* Command Type: `Notification Plugin Command`
    7797* Command Name: `Host Alarm By Email`
    78 * Command: `/etc/icinga2/scripts/host-by-mail.sh`
     98* Command: `/etc/icinga2/scripts/icinga2-mail-host.sh`
    7999
    80100and click add. Now go to the `Arguments` tab of the created command. Then add an Argument like,
     
    84104Value type: `String`[[br]]
    85105Value: `$address$`[[br]]
    86 Required: `Yes`
     106
    87107
    88108and Click `Add`.
     
    95115
    96116
     117At the end of adding all arguments, click `Deploy` and check whether it deployed without any error.
    97118
     119Then go back to command window and Add another command with following details and arguments.
     120
     121
     122* Command Type: `Notification Plugin Command`
     123* Command Name: `Service Alarm By Email`
     124* Command: `/etc/icinga2/scripts/icinga2-mail-service.sh`
     125* Arguments;
     126
     127[[Image(Service-Arg.png, 400px, nolink)]]
     128
     129And Deploy.
     130
     131
     132
     133Then on the Director, Goto `Notifications` --> `Notification Templates` and click `Add`
     134