https://github.com/Graylog2/graylog-ansible-role
Ansible role which installs and configures Graylog
https://github.com/Graylog2/graylog-ansible-role
ansible ansible-galaxy ansible-playbook ansible-role graylog log-analysis log-management logging playbook
Last synced: about 1 month ago
JSON representation
Ansible role which installs and configures Graylog
- Host: GitHub
- URL: https://github.com/Graylog2/graylog-ansible-role
- Owner: Graylog2
- License: apache-2.0
- Created: 2014-08-27T16:46:48.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-11-23T16:56:39.000Z (over 1 year ago)
- Last Synced: 2024-11-14T00:02:57.236Z (7 months ago)
- Topics: ansible, ansible-galaxy, ansible-playbook, ansible-role, graylog, log-analysis, log-management, logging, playbook
- Language: Jinja
- Homepage:
- Size: 371 KB
- Stars: 212
- Watchers: 35
- Forks: 126
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list-ansible - graylog-ansible-role
README
[](https://galaxy.ansible.com/Graylog2/graylog) [](https://github.com/Graylog2/graylog-ansible-role/actions/workflows/ci.yml)   
# Graylog Ansible Role
## Requirements
- Ansible 11.2.0
- Python 3.12
- At least 4gb of memory on the target instance.
- Linux
- Currently tested against:
- Ubuntu 18.04
- Ubuntu 20.04
- Ubuntu 22.04
- Ubuntu 24.04
- Centos 7
- Centos 8
- Centos 9To install the role, run:
ansible-galaxy install graylog2.graylog
## Dependencies
Graylog has the following dependencies:
- Java
- OpenSearch
- MongoDBSee the official [Graylog documentation](https://docs.graylog.org/docs/installing) for more details on these requirements.
Be certain you are running a supported version of OpenSearch.
**Compatibility Matrix**
| Graylog version | 3.x | 4.x | 5.x | 6.x |
|:--------------|:-------------:|:----------:|:-------------:|:-------------:|
| Elasticsearch | 5-6 | 6.8 - 7.10 | 6.8 - 7.10 | n/a |
| OpenSearch | | 1.x* | 1.x - 2.x | 1.x - 2.x |
*Graylog 4.3.x introduces support for OpenSearch.Refer to the [Software Interoperability Chart](https://go2docs.graylog.org/5-0/planning_your_deployment/planning_your_upgrade_to_opensearch.htm)
You will need to these Ansible role dependencies:
- [Java](https://github.com/lean-delivery/ansible-role-java)To install it, run:
ansible-galaxy install -r /requirements.yml
## Example Playbook
Here is an example playbook that uses this role. This is a single-instance configuration. It installs Java, MongoDB, Elasticsearch, and Graylog onto the same server.
```yaml
# Graylog vars
graylog_version: 6.1
graylog_install_java: True
graylog_password_secret: "" # Insert your own here. Generate with: pwgen -s 96 1
graylog_root_password_sha2: "" # Insert your own root_password_sha2 here.
graylog_http_bind_address: "{{ ansible_default_ipv4.address }}:9000"
graylog_http_publish_uri: "http://{{ ansible_default_ipv4.address }}:9000/"
graylog_http_external_uri: "http://{{ ansible_default_ipv4.address }}:9000/"
graylog_install_open_package: True
graylog_install_enterprise_package: Falseroles:
- role: "graylog2.graylog"
tags:
- "graylog"
```Remember to generate a unique `password_secret` and `root_password_sha2` for your instance.
To generate `password_secret`:
pwgen -s 96 1
To generate `root_password_sha2`:
echo -n "Enter Password: " && head -1