Update log4j2.properties on all elastic search servers, restart them and check if logs are being rolled and purged over or not.
- Take backup of existing log4j2.properties if exists
- Update log4j2.properties of all the elastic search data and master nodes
- Restart elastic search server
playbook : log4j-update.yml
command:ansible-playbook -i els-inventory.ini log4j-update.yml
- Check whether elastic search service is up and running on all nodes or not,
- If an instance got terminated and ECS launced a new instance get the IP of that node
command:ansible-playbook -i els-inventory.ini service-status.yml&amp;nbsp;
- Check whether logs are being rolled and purged over correctly
command:ansible-playbook -i els-inventory.ini log-rotation.yml&amp;nbsp;
Note: Use case 3 will give you correct result only on next day.
Code is available here at github https://github.com/santoshjoshi/ansible-utilities