Hi,
I'm trying to configure Slack Action in Watcher but every time I update the elasticsearch.yml as per https://www.elastic.co/guide/en/x-pack/current/actions-slack.html#configuring-slack my node gets offline
I edited elasticsearch.yml as:
cluster.name: MyCluster
node.name: master-0
discovery.zen.ping.unicast.hosts: ["master-0:9300","master-1:9300","master-2:9300"]
node.master: true
node.data: false
discovery.zen.minimum_master_nodes: 2
network.host: [_site_, _local_]
node.max_local_storage_nodes: 1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
xpack.notification.slack:
account: Admin
monitoring:
url: https://hooks.slack.com/services/mywebhookxxxxxxxx
I also tried to changed the account to something else or to add an email address linked to the account outcome is always the same.
If I check logs from /var/logs/elasticsearch I doesn't show any activity, just that the node is closed
If I run /usr/share/elasticsearch/bin$ sudo systemctl status elasticsearch.service then I got:
elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-01-17 08:46:59 UTC; 978ms ago
Docs: http://www.elastic.co
Process: 3491 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 3491 (code=exited, status=1/FAILURE)
Jan 17 08:46:59 master-0 elasticsearch[3491]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
Jan 17 08:46:59 master-0 elasticsearch[3491]: at org.elasticsearch.cli.Command.main(Command.java:90)
Jan 17 08:46:59 master-0 elasticsearch[3491]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Jan 17 08:46:59 master-0 elasticsearch[3491]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85)
Jan 17 08:46:59 master-0 elasticsearch[3491]: Caused by: com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException: mapping values are not allowed here
Jan 17 08:46:59 master-0 elasticsearch[3491]: in 'reader', line 13, column 15:
Jan 17 08:46:59 master-0 elasticsearch[3491]: monitoring:
Jan 17 08:46:59 master-0 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jan 17 08:46:59 master-0 systemd[1]: elasticsearch.service: Unit entered failed state.
Jan 17 08:46:59 master-0 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Now from digging this I kind of understand there might be space issue in my yaml next to 'monitoring'
If I edit the yml such as
cluster.name: MyCluster
node.name: master-0
discovery.zen.ping.unicast.hosts: ["master-0:9300","master-1:9300","master-2:9300"]
node.master: true
node.data: false
discovery.zen.minimum_master_nodes: 2
network.host: [_site_, _local_]
node.max_local_storage_nodes: 1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
xpack.notification.slack:
account: Admin
monitoring:
url: https://hooks.slack.com/services/mywebhookxxxxxxxx
then I got:
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-01-17 08:59:18 UTC; 3s ago
Docs: http://www.elastic.co
Process: 4304 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 4304 (code=exited, status=1/FAILURE)
Jan 17 08:59:18 master-0 systemd[1]: Started Elasticsearch.
Jan 17 08:59:18 master-0 elasticsearch[4304]: Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000099f30000, 1712128000, 0) failed; error='Cannot allocate memory' (errn
Jan 17 08:59:18 master-0 elasticsearch[4304]: #
Jan 17 08:59:18 master-0 elasticsearch[4304]: # There is insufficient memory for the Java Runtime Environment to continue.
Jan 17 08:59:18 master-0 elasticsearch[4304]: # Native memory allocation (mmap) failed to map 1712128000 bytes for committing reserved memory.
Jan 17 08:59:18 master-0 elasticsearch[4304]: # An error report file with more information is saved as:
Jan 17 08:59:18 master-0 elasticsearch[4304]: # /tmp/hs_err_pid4304.log
Jan 17 08:59:18 ELK2master-0 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jan 17 08:59:18 master-0 systemd[1]: elasticsearch.service: Unit entered failed state.
Jan 17 08:59:18 master-0 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Did I break more the yml or what's next fix?