Skip to content

Instantly share code, notes, and snippets.

@teknofire
Last active December 10, 2021 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teknofire/a62ce04fa9201f72e691db5e2fee3a05 to your computer and use it in GitHub Desktop.
Save teknofire/a62ce04fa9201f72e691db5e2fee3a05 to your computer and use it in GitHub Desktop.
Apply A2HA formatMsgNoLookups Config
The following instructions should be run from any Elasticsearch node in the A2HA Cluster.
It only needs to be done once and will automatically be applied to all the ES nodes in the cluster.
1. Get the current ES Configs
```
source /hab/sup/default/SystemdEnvironmentFile.sh
automate-backend-ctl applied --svc=automate-backend-elasticsearch | tail -n +2 > es_config.toml
```
2. Add the `es_java_opts` config, if there is already a `[runtime]` section add the `es_java_opts` config to that section
```
[runtime]
es_java_opts = "${ES_JAVA_HEAP} -Dlog4j2.formatMsgNoLookups=true"
```
3. Apply the config and wait for ES to go green
```
hab config apply automate-backend-elasticsearch.default $(date '+%s') es_config.toml
journalctl -u hab-sup -f | grep 'automate-backend-elasticsearch'
```
4. Check that the new config was applied correctly
```
ps -aef | grep java | grep formatMsgNoLookups=true
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment