{"id":42712800,"url":"https://github.com/bimdata/ansible_role_fluentbit","last_synced_at":"2026-01-29T15:13:12.232Z","repository":{"id":42665126,"uuid":"304563926","full_name":"bimdata/ansible_role_fluentbit","owner":"bimdata","description":"Ansible role to install and configure Fluentbit. ","archived":false,"fork":false,"pushed_at":"2025-09-30T15:39:12.000Z","size":43,"stargazers_count":9,"open_issues_count":2,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-30T17:42:30.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bimdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-16T08:19:30.000Z","updated_at":"2025-04-25T17:14:36.000Z","dependencies_parsed_at":"2025-10-02T09:31:38.222Z","dependency_job_id":null,"html_url":"https://github.com/bimdata/ansible_role_fluentbit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bimdata/ansible_role_fluentbit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fansible_role_fluentbit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fansible_role_fluentbit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fansible_role_fluentbit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fansible_role_fluentbit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bimdata","download_url":"https://codeload.github.com/bimdata/ansible_role_fluentbit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimdata%2Fansible_role_fluentbit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28880017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-29T15:13:11.570Z","updated_at":"2026-01-29T15:13:12.227Z","avatar_url":"https://github.com/bimdata.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible role Fluentbit\n=========\n\nThis role installs and configures Fluentbit.\n\nRequirements\n------------\n\n* This role is only tested with Ansible \u003e= 2.9.\n\nRole Variables\n--------------\n\nThis role tries to keep the same default configuration as if you manually install\nFluentbit.\nYou can find more information about each option in the [Fluentbit documentation](\nhttps://docs.fluentbit.io/manual/v/1.6/administration/configuring-fluent-bit/configuration-file).\n\nVariables used for the installation:\n\n| Variables                       | Default value                               | Description                                                 |\n|---------------------------------|---------------------------------------------|-------------------------------------------------------------|\n| fluentbit_prerequisites         | ['apt-transport-https', 'curl', 'gnupg']    | List of package that need to be installed before Fluentbit. |\n| fluentbit_apt_use_deb822        | true                                        | Use APT deb822 format for the fluent-bit source file.       |\n| fluentbit_apt_key_path          | \"/usr/share/keyrings/fluentbit-keyring.gpg\" | APT keyring path use to store the fluentbit key.            |\n| fluentbit_apt_key_url           | https://packages.fluentbit.io/fluentbit.key | The APT key for the Fluentbit package.                      |\n| fluentbit_apt_repos_url         | \"https://packages.fluentbit.io/{{ ansible_distribution \\| lower }}/{{ ansible_distribution_release \\| lower }}\"  | The APT repository address needed to install Fluentbit. |\n| fluentbit_apt_repos_component   | main                                        | APT repository component.                                   |\n| fluentbit_pkg_name              | fluent-bit                                  | The Fluentbit APT package name.                             |\n| fluentbit_pkg_version           | \"\"                                          | Install a specific version of the package.                  |\n| fluentbit_pkg_version_hold      | \"{{ fluentbit_pkg_version \\| default(False) \\| ternary(True, False) }}\" | Lock package version to prevent accidental updates. By default, `True` if `fluentbit_pkg_version` is defined, `False` otherwise. |\n| fluentbit_svc_name              | fluent-bit                                  | The Fluentbit service name to start/stop the daemon.        |\n| fluentbit_apt_cleanup_legacy    | false                                       | Remove old keys and old APT sources if true.                |\n| fluentbit_apt_key_legacy_id     | F209D8762A60CD49E680633B4FF8368B6EA0722A    | ID of the old GPG key to remove from keyring.               |\n| fluentbit_naming_cleanup_legacy | false                                       | Remove old service / conf / apt with td-agent name.         |\n| fluentbit_pkg_name_legacy       | td-agent-bit                                | Pkg name that will be remove by legacy cleaner.             |\n| fluentbit_svc_name_legacy       | td-agent-bit                                | Service name that will be remove by legacy cleaner.         |\n| fluentbit_conf_directory_legacy | /etc/td-agent-bit/                          | Conf directory that will be remove by legacy cleaner.       |\n\n\nVariables used for the general configuration:\n\n| Variables                        | Default value     | Description                                               |\n|----------------------------------|-------------------|-----------------------------------------------------------|\n| fluentbit_svc_flush              | 5                 | Flush time in *seconds.nanoseconds* format.               |\n| fluentbit_svc_grace              | 5                 | Set the grace time is *seconds*.                          |\n| fluentbit_svc_daemon             | \"off\"             | On/Off value to specify if Fluentbit runs as a Deamon. Should be Off when using the provided Systemd unit. |\n| fluentbit_svc_logfile            | \"\"                | Absolute path for an optional log file. Log to stdout if not specified. |\n| fluentbit_svc_loglevel           | info              | Set the logging verbosity level.                          |\n| fluentbit_svc_parsers_file       | [\"parsers.conf\"]  | List of paths for *parsers* configuration files.          |\n| fluentbit_svc_plugins_file       | [\"plugins.conf\"]  | List of paths for *plugins* configuration files.          |\n| fluentbit_svc_streams_file       | []                | List of paths for *stream processors* configuration files.|\n| fluentbit_managed_parsers_enable | \"{{ ((_fluentbit_parsers \\| length) or (_fluentbit_mlparsers \\| length)) \\| bool }}\" | Define if Ansible should create/update a custom file for user defined parser. |\n| fluentbit_managed_parsers_file   | \"{{ fluentbit_conf_directory }}/managed-parsers.conf\"                                | File where the custom parsers are defined if needed. |\n| fluentbit_svc_http               | {}                | Dictionary for HTTP built-in server configuration.        |\n| fluentbit_svc_storage            | {}                | Dictionary for storage/buffer configuration.              |\n| fluentbit_svc_limit_open_files   | Undefined         | Configure LimitNOFILE for systemd service if defined      |\n\nFor `fluentbit_svc_http`, each key is used as a configuration option name and values as values.\nBut you don't need to add the prefix `HTTP_`, it will be added by the template.\nFor example, you can define it like this:\n```\nfluentbit_svc_http:\n  server: On\n  listen: 0.0.0.0\n  port: \"{{ fluentbit_monitoring_port }}\"\n```\n\nIt's the same for `fluentbit_svc_storage`: you don't need to specify the prefix `storage.`.\nExample:\n```\nfluentbit_svc_storage:\n  path: /var/log/flb-storage/\n  sync: full\n  checksum: \"off\"\n```\n\nOther variables:\n\n| Variables               | Default value | Description                                               |\n|-------------------------|---------------|-----------------------------------------------------------|\n| fluentbit_dbs_path      | \"\"            | A path for a directory that will be created by the role. For example to store your input DB files. |\n\nVariables for log processing:\n\n| Variables               | Default value                                                                      | Description                                    |\n|-------------------------|------------------------------------------------------------------------------------|------------------------------------------------|\n| _fluentbit_inputs       | \"{{ lookup('template', 'get_vars.j2'), template_vars=dict(var_type='input') }}\"    | List of dictionaries defining all log inputs.  |\n| _fluentbit_filters      | \"{{ lookup('template', 'get_vars.j2'), template_vars=dict(var_type='filter') }}\"   | List of dictionaries defining all log filters. |\n| _fluentbit_outputs      | \"{{ lookup('template', 'get_vars.j2'), template_vars=dict(var_type='output') }}\"   | List of dictionaries defining all log outputs. |\n| _fluentbit_parsers      | \"{{ lookup('template', 'get_vars.j2'), template_vars=dict(var_type='parser') }}\"   | List of dictionaries defining all log managed parser. |\n| _fluentbit_mlparsers    | \"{{ lookup('template', 'get_vars.j2'), template_vars=dict(var_type='mlparser') }}\" | List of dictionaries defining all log managed multiline parser. |\n\n**In most cases, you should not modify these variables.**\nTemplating is used to build these lists with other variables.\n* `_fluentbit_inputs` will aggregate all the variables whose name matches this regex: `^fluentbit_.+_input(s)?$'`.\n* `_fluentbit_filters` will aggregate all the variables whose name matches this regex: `^fluentbit_.+_filter(s)?$'`.\n* `_fluentbit_outputs` will aggregate all the variables whose name matches this regex: `^fluentbit_.+_output(s)?$'`.\n* `_fluentbit_parsers` will aggregate all the variables whose name matches this regex: `^fluentbit_.+_parser(s)?$'`.\n* `_fluentbit_mlparsers` will aggregate all the variables whose name matches this regex: `^fluentbit_.+_mlparser(s)?$'`.\n\nEach variables matching these regexes must be:\n  - a dictionary defining one input/filter/output/parser **or**\n  - a list of dictionaries defining one or more inputs/filters/outputs/parser.\n\nEach dictionary is used to define one `[INPUT]`, `[FILTER]`, `[OUTPUT]`, `[PARSER]` or `[MULTILINE_PARSER]` section\nin the Fluentbit configuration file or in managed parser file. Each configuration section\nis configured with key/value couples, so the dictionary's keys are used as\nconfiguration keys and values as values.\n\nFor example:\n```\nfluentbit_nginx_input:\n  - name: tail\n    path: /var/log/nginx/access.log\n  - name: tail\n    path: /var/log/nginx/error.log\n\nfluentbit_kernel_input:\n  name: tail\n  path: /var/log/kern.log\n```\n\nwill create:\n```\n[INPUT]\n  name tail\n  path /var/log/nginx/access.log\n[INPUT]\n  name tail\n  path /var/log/nginx/error.log\n[INPUT]\n  name tail\n  path /var/log/kern.log\n```\n\nIt allows you to define variables in multiple group_vars and cumulate them for\nhosts in multiples groups without the need to rewrite the complete list.\n\nAnsible dictionaries can't have the same key multiple times. This can be a problem\nto use stuff like `record`.\nTo overcome this issue, each key can be prefix with a number that will be remove\nin the template file. It needs to match this regex: `'^[0-9]+__'`.\n\nFir example:\n```\nfluentbit_add_context_filter:\n  - name: record_modifier\n    match: '*'\n    0__record: hostname ${HOSTNAME}\n    1__record: product Awesome_Tool\n```\n\nwill create:\n```\n[FILTER]\n  name record_modifier\n  match *\n  record hostname ${HOSTNAME}\n  record product Awesome_Tool\n\n```\n\nDependencies\n------------\n\nNone\n\nExample Playbook\n----------------\n\nin `group_vars/all.yml`:\n```\nfluentbit_kernel_input:\n  name: tail\n  path: /var/log/kern.log\n\nfluentbit_env_filter\n  name: record_modifier\n  match: '*'\n  record: \"env {{ env }}\"\n\nfluentbit_central_output:\n  name: forward\n  match: '*'\n  host: \"{{ logs_server_address }}\"\n  port: \"{{ log_forward_port }}\"\n```\n\nin `group_vars/web.yml`:\n```\nfluentbit_nginx_input:\n  - name: tail\n    path: /var/log/nginx/access.log\n  - name: tail\n    path: /var/log/nginx/error.log\n```\n\nin `playbook.yml`:\n```\n- hosts: web\n  gather_facts: True\n  become: yes\n  roles:\n    - bimdata.fluentbit\n```\n\nLicense\n-------\n\nBSD\n\nAuthor Information\n------------------\n\n[BIMData.io](https://bimdata.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbimdata%2Fansible_role_fluentbit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbimdata%2Fansible_role_fluentbit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbimdata%2Fansible_role_fluentbit/lists"}