mklettner.graylog_collector
Ansible Role: Graylog Collector Sidecar
This role installs and sets up Graylog Sidecar Collector on RedHat/CentOS Linux servers.
Installation Options:
- Install the latest version from the official GitHub repository.
- Install a specific version from the official GitHub repository.
- Install from a local RPM file that you upload to the server.
Requirements
No specific requirements.
Role Variables
Here are the available settings (see defaults/main.yml
for default values):
sidecar_server_url: Address of the Graylog server (default:
http://127.0.0.1:9000/api/
)sidecar_update_interval: Time between updates (default:
10
seconds)sidecar_tls_skip_verify: Skip TLS verification (default:
false
)sidecar_send_status: Send status updates (default:
true
)sidecar_list_log_files: Directory for log files (default:
/var/log
)sidecar_node_id: Identifier for the node (default:
graylog-collector-sidecar
)sidecar_collector_id: Path to collector ID file (default:
file:/etc/graylog/collector-sidecar/collector-id
)sidecar_cache_path: Cache location (default:
/var/cache/graylog/collector-sidecar
)sidecar_log_path: Log file location (default:
/var/log/graylog/collector-sidecar
)sidecar_log_rotation_time: Log rotation time in seconds (default:
86400
which is one day)sidecar_log_max_age: Maximum age of logs in seconds (default:
604800
which is one week)sidecar_tags: Tags for classification (default:
['linux', 'apache']
)sidecar_backends: Backends to use for log collection (example provided).
If you want to install a specific version, set sidecar_version
to the desired version (e.g., sidecar_version: 0.1.5
).
If you want to install from a local RPM, upload it to the files directory and set sidecar_local_package
accordingly (e.g., sidecar_local_package: collector-sidecar-0.1.5-1.x86_64.rpm
).
Dependencies
No dependencies required.
Example Playbook
---
- hosts: all
roles:
- role: mklettner.graylog_collector
sidecar_server_url: https://example.com:9000/api/
sidecar_update_interval: 20
sidecar_node_id: "{{ ansible_hostname }}"
sidecar_backends:
- {name: filebeat, enabled: true, binary_path: /usr/bin/filebeat, configuration_path: /etc/graylog/collector-sidecar/generated/filebeat.yml}
License
MIT / BSD
Author Information
This role was created by Matthias Klettner in 2018.
Install Graylog Collector Sidecar, Filebeat & NXLog latest version or specific version via internet or local package. Also manages graylog-collector settings.
ansible-galaxy install mklettner.graylog_collector