Ansible play to test out logstash and ILM.
Requires Vagrant and Ansible.
vagrant up
cd ..
ansible-playbook -i inventory.yml ansible-playbook.yml
http://192.168.50.35:5601
PUT _ilm/policy/test-logs
{
"policy" : {
"phases" : {
"hot" : {
"min_age" : "0ms",
"actions" : {
"rollover" : {
"max_size" : "50gb",
"max_docs" : "20"
}
}
}
}
}
}
GET _ilm/policy/test-logs
vagrant ssh ls-node1-rpm
sudo bin/filebeat -e -c /etc/filebeat/filebeat.yml -d "publish"
vagrant ssh ls-node1-rpm
sudo /usr/share/logstash/bin/logstash -f /usr/share/logstash/pipeline2.conf --config.reload.automatic --path.settings /etc/logstash/
GET _template/test-threat-logs
GET test-threat-logs*/_ilm/explain
if the log files fill the index too quickly due to indices.lifecycle.poll_interval being set to low, just run sudo yum update to update the os packages and that should create some more log files.