Deprecation warnings can be disabled by settingÄeprecation_warnings=False in ansible.cfg. This feature will be removed in a future release. : Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' $ ansible-playbook playbooks/filebeat.yaml -extra-vars "target=testmachine" I let the playbook run on a test machine (which has Nginx and HAProxy installed): $ cat /srv/ansible/setup-files/filebeat/filebeat.yml This is a minimal config file prepared with certain lines: Of course this only works when the correct "template" is used (see "FILEBEAT - Copy base filebeat config file"). name: ANSIBLE - Filebeat installation and configuration by hosts: ' - HAProxy logging configured by Ansible" $ cat /srv/ansible/playbooks/filebeat/filebeat.yml With the current code, it checks if there is Nginx and/or HAProxy installed on the target machine and automatically configures the prospectors and of course also the output (a Logstash receiver in my setup): This playbook should also be used to automatically configure the "logs to be followed", called "prospectors" in Filebeat terminology. Now I wanted to go one step further and automatically deploy Filebeat through an Ansible playbook. So far the first tests using Nginx access logs were quite successful. ![]() Filebeat is basically a log parser and shipper and runs as a daemon on the client. Whilst I'm currently building an ELK stack for centralized logging and visualizing these logs, I came also across Filebeat. Published on August 11th 2017 - Listed in Linux ELK Kibana Logstash Filebeat Ansible Install and configure Elastic Filebeat through Ansible
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |