Changes between Version 1 and Version 2 of NSM2021/Agenda/AlertsIcinga2Slack


Ignore:
Timestamp:
May 30, 2021, 7:37:36 PM (3 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NSM2021/Agenda/AlertsIcinga2Slack

    v1 v2  
    33=== Prerequisite ===
    44
    5 * SLACK API WEbHook URL created.
     5* SLACK API WebHook URL created.
    66  If you haven't created these, please consult [wiki:NSM2021/Agenda/SlackGuide here]
    77* Notification Users are created in Icinga Director
     
    5353== Create Custom Variables ==
    5454
    55 Above scripts uses two custom variables called tokencode and chat_id, these are Telegram User specific data and we have to define them on Iciga Director before applying it on Notifications.
     55Above scripts uses a custom variable called slackAPI, this is a Slack channel specific data and we have to define it on Iciga Director before applying it on Notifications.
    5656
    57 Go to Icinga Director --> `Data Field Categories`
    5857
    59 [[Image(DataCat1.png, 500px, nolink)]]
     58Go to Icinga Director --> `Define Data Fields`
    6059
    61 Add a Data Category as below.
     60Create new Data Field as follows:
    6261
    63 [[Image(DataCat2.png, 500px, nolink)]]
     62* Slack WebHook URL
    6463
    65 Then go to Icinga Director --> `Define Data Fields`
     64[[Image(slackAPI.png, 500px, nolink)]]
    6665
    67 Create two new Data Fields as follows:
    6866
    69 * Token Code
    70 
    71 [[Image(TokenCode.png, 500px, nolink)]]
    72 
    73 * Chat ID
    74 
    75 [[Image(ChatId.png, 500px, nolink)]]
    76 
    77 == Telegram Notification Templates ==
     67== Slack Notification Templates ==
    7868
    7969Create following templates with the given data.
    8070
    81 * Telegram Host Notification Template
     71* Slack Host Notification Template
    8272
    83 [[Image(THT.png, 500px, nolink)]]
     73[[Image(SHT.png, 500px, nolink)]]
    8474
    85 * Include custom fields we created earlier. Goto the Fields tab of the template and enter chat_id and tockencode as mandatory fields
     75* Include custom field we created earlier. Goto the Fields tab of the template and enter `slackAPI` as amandatory field.
    8676
    87 [[Image(Field_chatId.png, 500px, nolink)]]
     77[[Image(Field_slackAPI.png, 500px, nolink)]]
    8878
    89 [[Image(Field_tokencode.png, 500px, nolink)]]
    9079
    91 * Telegram Service Notification Template
     80* Slack Service Notification Template
    9281
    93 [[Image(TST.png, 500px, nolink)]]
     82[[Image(SST.png, 500px, nolink)]]
    9483
    95 * Goto the Fields tab of the template and enter `chat_id` and `tockencode` as mandatory fields based on previous guidelines.
     84* Goto the Fields tab of the template and enter `slackAPI` as mandatory fields based on previous guidelines.
    9685
    97 == Create Notifications to Telegram ==
     86== Create Notifications to Slack ==
    9887
    9988In this setup, we shall create two notifications setups for Hosts and Services respectively. When assigning notifications we should select a user rather than a user group to avoid multiple duplicates of notifications.
    10089
    101 * Telegram-Host-Notification
     90* Slack-Host-Notification
    10291
    103 [[Image(THS.png, 600px, nolink)]]
     92[[Image(SHN.png, 600px, nolink)]]
    10493
    105 * Telegram-Service-Notification
     94* Slack-Service-Notification
    10695
    107 [[Image(TSN.png, 600px, nolink)]]
     96[[Image(SSN.png, 600px, nolink)]]
    10897
    10998