We'll start by provisioning the
logging server with the ELK stack (ElasticSearch, LogStash, and Kibana). We'll continue using Ansible for provisioning since it converted itself into our favorite configuration management tool.
Let's run the elk.yml playbook and explore it while it's executing:
ansible-playbook /vagrant/ansible/elk.yml \ -i /vagrant/ansible/hosts/prod \ --extra-vars "logstash_config=file.conf"
The definition of the playbook is as follows:
- hosts: logging remote_user: vagrant serial: 1 roles: - common - docker - elasticsearch - logstash - kibana
We used the
common and the
docker roles many times before, so we'll skip them, and jump straight into
elasticsearch tasks defined in the