Changes between Version 4 and Version 5 of NSM2021/Agenda/AlertsIcinga2Email
- Timestamp:
- May 21, 2021, 8:05:55 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
<
NSM2021/Agenda/AlertsIcinga2Email
v4 | v5 | |
---|---|---|
47 | 47 | Test mail transport by `mail -s "Hello World" youremail@yourdomain.tld` |
48 | 48 | |
49 | === Create users who needs to be notified === | |
50 | ||
51 | On your Icinga Director web portal, goto `Users/Contacts` | |
52 | ||
53 | [[Image(Users-Contacts.png, 600px, nolink)]] | |
54 | ||
55 | and then to User Groups. Create a `User group` as follows by clicking `+Add`. | |
56 | ||
57 | [[Image(UserGroup.png, 800px, nolink)]] | |
58 | ||
59 | Next, 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 | ||
63 | For the States and Transition Types, you have to select all available, one by one. | |
64 | ||
65 | Next 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 | ||
49 | 69 | |
50 | 70 | === Enable Email Notifications from Director === |
… | … | |
76 | 96 | * Command Type: `Notification Plugin Command` |
77 | 97 | * Command Name: `Host Alarm By Email` |
78 | * Command: `/etc/icinga2/scripts/ |
|
98 | * Command: `/etc/icinga2/scripts/icinga2-mail-host.sh` | |
79 | 99 | |
80 | 100 | and click add. Now go to the `Arguments` tab of the created command. Then add an Argument like, |
… | … | |
84 | 104 | Value type: `String`[[br]] |
85 | 105 | Value: `$address$`[[br]] |
86 | Required: `Yes` | |
106 | ||
87 | 107 | |
88 | 108 | and Click `Add`. |
… | … | |
95 | 115 | |
96 | 116 | |
117 | At the end of adding all arguments, click `Deploy` and check whether it deployed without any error. | |
97 | 118 | |
119 | Then 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 | ||
129 | And Deploy. | |
130 | ||
131 | ||
132 | ||
133 | Then on the Director, Goto `Notifications` --> `Notification Templates` and click `Add` | |
134 |