Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-8173

Media type Slack doesn't handle params.event_source to 4 (Service actions)

    XMLWordPrintable

Details

    • Change Request
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 6.0.12
    • None
    • Server (S)
    • None

    Description

      I would like send a notification to Slack from Service action.

      Step to reproduce:

      • in Media types -> Slack -> Message templates added Service and Service recovery
      • in Service actions created a new action with Send message to users: pager_appl via Slack (user pager_appl has Media Type Slack)

      When the action will be triggered the message doesn't arrive on slack due an error

      3915222:20221223:103436.207 In am_db_update_alert() alertid:17402 status:2 retries:3 value: error:Slack notification failed : Incorrect "event_source" parameter given: "4". 

      And checking on Slack's Media type Script it looks like that event source 4 (I guess for Services) is not handled

      https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media/slack/media_slack.yaml

      branch: master

      line: 429

                  if ([0, 1, 2, 3].indexOf(parseInt(params.event_source)) === -1) {
                      throw 'Incorrect "event_source" parameter given: "' + params.event_source + '".\nMust be 0-3.';
                  } 

      It would be nice that Slack Media type could handle Service actions.

      Attachments

        Activity

          People

            wiper Andris Zeila
            bagni Lorenzo Bagni
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: