stone-payments.journalbeat
stone-payments.journalbeat
===================
This is an Ansible role used to set up a journalbeat log shipper.
Basic Usage
To use a simple setup, modify the defaults in defaults/main.yml
. Here’s how to set it up minimally with an ElasticSearch endpoint:
- name: install and configure journalbeat
hosts: all
roles: stone-payments.journalbeat
vars:
journalbeat_elasticsearch: true
journalbeat_hosts: { "logs.example.com:9200" }
To use this role, pick the type of endpoint (like elasticsearch, logstash, kafka, or redis), set the relevant variable to true, and provide a list of endpoint addresses in the journalbeat_hosts
variable where the logs will be sent.
You can also include extra metadata for organization, like this:
journalbeat_product: "webserver"
journalbeat_env: "production"
journalbeat_net: "dmz"
journalbeat_dc: "ny1"
Advanced Settings
If there are configuration options not included in the simple setup, you can define them in the journalbeat_conf
variable. This variable accepts a dictionary that matches the format of the YAML file used for configuring the journalbeat daemon. Here’s an example:
journalbeat_conf:
journalbeat:
convert_to_numbers: false
output:
elasticsearch:
path: "/somePath"
For more details, check the configuration file reference in the original project documentation.
ansible-galaxy install stone-payments.journalbeat