We have docker based elasticsearch cluster for multi-nodes architecture. We provide elasticsearch config as environment variables for respective nodes in docker-compose.yml. We are not using elasticsearch.yml as config file inside docker-compose file.
We need to implement slack notification as elasticsearch watcher alerts. Using following inside elasticsearch.yml, we can enable slack notification:
xpack.notification.slack: account:
monitoring:
url: <WEB-HOOK-URL>
message_defaults:
from: x-pack
icon: http://example.com/images/watcher-icon.jpg
attachment:
fallback: "X-Pack Notification"
color: "#36a64f"
title: "X-Pack Notification"
title_link: "https://www.elastic.co/guide/en/x-pack/current/index.html"
text: "One of your watches generated this notification."
mrkdwn_in: "pretext, text"
The question is, this above config is compatible with elasticsearch.yml, what is its equivalent config using docker-compose.yml without using elasticsearch.yml ?