{"id":16060805,"url":"https://github.com/geerlingguy/ansible-role-filebeat","last_synced_at":"2025-05-16T07:05:55.807Z","repository":{"id":41309005,"uuid":"67325320","full_name":"geerlingguy/ansible-role-filebeat","owner":"geerlingguy","description":"Ansible Role - Filebeat for ELK stack","archived":false,"fork":false,"pushed_at":"2025-01-31T03:25:05.000Z","size":78,"stargazers_count":152,"open_issues_count":2,"forks_count":171,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-12T04:47:26.923Z","etag":null,"topics":["ansible","elasticsearch","elk","filebeat","logging","role"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/geerlingguy/filebeat/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geerlingguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"geerlingguy","patreon":"geerlingguy"}},"created_at":"2016-09-04T04:20:14.000Z","updated_at":"2025-04-02T07:18:00.000Z","dependencies_parsed_at":"2024-04-11T18:38:18.506Z","dependency_job_id":"65cfc092-6a3e-4f78-a14c-469f1500103f","html_url":"https://github.com/geerlingguy/ansible-role-filebeat","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-filebeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-filebeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-filebeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-filebeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geerlingguy","download_url":"https://codeload.github.com/geerlingguy/ansible-role-filebeat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485062,"owners_count":22078767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","elasticsearch","elk","filebeat","logging","role"],"created_at":"2024-10-09T04:06:35.364Z","updated_at":"2025-05-16T07:05:50.797Z","avatar_url":"https://github.com/geerlingguy.png","language":"Jinja","funding_links":["https://github.com/sponsors/geerlingguy","https://patreon.com/geerlingguy"],"categories":[],"sub_categories":[],"readme":"# Ansible Role: Filebeat for ELK Stack\n\n[![CI](https://github.com/geerlingguy/ansible-role-filebeat/actions/workflows/ci.yml/badge.svg)](https://github.com/geerlingguy/ansible-role-filebeat/actions/workflows/ci.yml)\n\nAn Ansible Role that installs [Filebeat](https://www.elastic.co/products/beats/filebeat) on RedHat/CentOS or Debian/Ubuntu.\n\n## Requirements\n\nNone.\n\n## Role Variables\n\nAvailable variables are listed below, along with default values (see `defaults/main.yml`):\n\n    filebeat_version: 7.x\n\nControls the major version of Filebeat which is installed.\n\n    filebeat_package: filebeat\n    filebeat_package_state: present\n\nThe specific package to be installed. You can specify a version of the package using the correct syntax for your platform and package manager by changing the package name. You can also control the package state (e.g. present, absent, or latest).\n\n    filebeat_create_config: true\n\nWhether to create the Filebeat configuration file and handle the copying of SSL key and cert for filebeat. If you prefer to create a configuration file yourself you can set this to `false`.\n\n    filebeat_inputs:\n      - type: log\n        paths:\n          - \"/var/log/*.log\"\n\nInputs that will be listed in the `inputs` section of the Filebeat configuration. Read through the [Filebeat Inputs configuration guide](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-filebeat-options.html) for more options.\n\n    filebeat_output_elasticsearch_enabled: false\n    filebeat_output_elasticsearch_hosts:\n      - \"localhost:9200\"\n\nWhether to enable Elasticsearch output, and which hosts to send output to.\n\n    filebeat_output_elasticsearch_auth:\n        username: \"admin\"\n        password: \"S3CR3eeet\"\n\n    # or, only for version 8+\n    filebeat_output_elasticsearch_auth:\n        api_key: \"xa-123a-f3ea012d-aaae1\"\n\nConfigures the authentication for the elasticsearch output. Note that api_key and user/pass are mutually exclusive, and api_key is only available from version 8.\n\n    filebeat_output_logstash_enabled: true\n    filebeat_output_logstash_hosts:\n      - \"localhost:5000\"\n\nWhether to enable Logstash output, and which hosts to send output to.\n\n    filebeat_enable_logging: false\n    filebeat_log_level: warning\n    filebeat_log_dir: /var/log/filebeat\n    filebeat_log_filename: filebeat.log\n\nFilebeat logging.\n\n    filebeat_ssl_certs_dir: /etc/pki/logstash\n    filebeat_ssl_private_dir: \"{{ filebeat_ssl_certs_dir }}\"\n\nThe path where certificates and keyfiles will be stored.\n\n    filebeat_ssl_ca_file: \"\"\n    filebeat_ssl_certificate_file: \"\"\n    filebeat_ssl_key_file: \"\"\n\nLocal paths to the SSL certificate and key files.\n\n    filebeat_ssl_copy_file: true\n\nWether to copy certificate and key into the `filebeat_ssl_dir`, or use existing ones.\n\nFor utmost security, you should use your own valid certificate and keyfile, and update the `filebeat_ssl_*` variables in your playbook to use your certificate.\n\nTo generate a self-signed certificate/key pair, you can use use the command:\n\n    $ sudo openssl req -x509 -batch -nodes -days 3650 -newkey rsa:2048 -keyout filebeat.key -out filebeat.crt\n\nNote that filebeat and logstash may not work correctly with self-signed certificates unless you also have the full chain of trust (including the Certificate Authority for your self-signed cert) added on your server. See: https://github.com/elastic/logstash/issues/4926#issuecomment-203936891\n\n    filebeat_ssl_insecure: \"false\"\n\nSet this to `\"true\"` to allow the use of self-signed certificates (when a CA isn't available).\n\n    filebeat_name: \"\"\n\nSets the name of the filebeat. If not set the hostname is used. \n\n### Overriding the filebeat template\n\nIf you can't customize via variables because an option isn't exposed, you can override the template used to generate the filebeat configuration.\n\n    filebeat_template: \"filebeat.yml.j2\"\n\nYou can either copy and modify the provided template, or you can, for example, point to a template file in your playbook directory that will be used instead of the managed template.\n\n    filebeat_template: \"{{ playbook_dir }}/templates/filebeat.yml.j2\"\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n    - hosts: logs\n    \n    - name: Set the java_packages variable (Debian/Ubuntu).\n      set_fact:\n        java_packages:\n          - openjdk-8-jdk\n      when: ansible_os_family == 'Debian'\n    \n      roles:\n        - geerlingguy.java\n        - geerlingguy.elasticsearch\n        - geerlingguy.logstash\n        - geerlingguy.filebeat\n\n## License\n\nMIT / BSD\n\n## Author Information\n\nThis role was created in 2016 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-filebeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeerlingguy%2Fansible-role-filebeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-filebeat/lists"}