Does Watcher Slack Action support UTF-8?


(Serive) #1

Hi,

I tried slack action of watcher but Non-ASCII character becomes "?".

Elastic stack version: 6.1.0

watcher settings:

{
  "trigger": {
    "schedule": {
      "cron": "0 * * * * ?"
    }
  },
  "input": {
    "search": {
      "request": {
        "search_type": "query_then_fetch",
        "indices": [
          "*"
        ],
        "types": ["doc"],
        "body": {
          "query": {
            "match_all": {}
          }
        }
      }
    }
  },
  "condition": {
    "compare": {
      "ctx.payload.hits.total": {
        "gt": 0
      }
    }
  },
  "actions": {
    "send_email": {
      "transform": {},
      "email": {
        "profile": "standard",
        "to": [
          "xxx@xxx.xxx"
        ],
        "subject": "subjectあいうえお",
        "body": {
          "html": "bodyあいうえお"
        }
      }
    },
    "notify-slack": {
      "transform": {},
      "slack": {
        "message": {
          "to": [
            "#elastic-notify"
          ],
          "text": "textあいうえお",
          "attachments": [
            {
              "color": "danger",
              "title": "titleあいうえお",
              "text": "attachmentあいうえお"
            }
          ]
        }
      }
    }
  }
}

Email notification works fine.

2017-12-21_094722

Is there any necessary setting for character encoding for slack action?
Or, any workaround for this problem?

Thanks.


(Alexander Reelsen) #2

This is indeed a problem on the watcher side. I am working on a fix.

Thanks for bringing it up!


(Serive) #3

Thanks! I'll wait for that.


(Alexander Reelsen) #4

Quick heads-up: The fix for this will be included in the next Elastic Stack release.


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.