jmcvetta.logzio
jmcvetta.logzio
This is an Ansible role for sending logs to Logz.io using Filebeat. It can also set up Topbeat and Packetbeat to send their data to Logz.io.
It is based on the mediapeers.filebeat role created by Stefan Horning.
Requirements
Tested on Ubuntu 14.04 LTS.
Role Variables
logzio_token: YOUR_LOGZIO_TOKEN
# Logging level for Filebeat, Topbeat, and Packetbeat
logzio_daemon_log_level: warning
#-------------------------------------------------------------------------------
#
# Logs
#
#-------------------------------------------------------------------------------
# Example, you can change this variable:
logzio_logs:
-
# Paths for files you want to send to Logz.io
paths:
- '/var/log/apache2/access.log'
- '/var/log/apache2/error.log'
# codec must be 'plain' or 'json'
codec: plain
# Description of the type of data in these files
type: apache2
# Additional logs - will be added to logzio_logs when running.
# Helps in adding extra logs specific to a host or group.
logzio_extra_logs: []
# Ignore files modified more than the specified time ago.
# You can use time strings like 2h (2 hours) or 5m (5 minutes),
# or leave it blank to disable this option (default).
logzio_ignore_older:
#-------------------------------------------------------------------------------
#
# Topbeat
#
#-------------------------------------------------------------------------------
# Install and set up Topbeat
logzio_topbeat: false
# In seconds, sets how often to check server stats
logzio_topbeat_period: 60
# What information should Topbeat track?
logzio_topbeat_system: true
logzio_topbeat_process: false
logzio_topbeat_filesystem: true
logzio_topbeat_cpu_per_core: false
#-------------------------------------------------------------------------------
#
# Packetbeat
#
#-------------------------------------------------------------------------------
# Install and set up Packetbeat
logzio_packetbeat: false
# Network interfaces to monitor
logzio_packetbeat_interfaces: any
Dependencies
Example Playbook
- name: Ensure logs are sent to Logz.io
hosts: servers
vars:
logzio_token: YOUR_TOKEN_GOES_HERE
logzio_logs:
- type: fail2ban
codec: plain
paths:
- /var/log/fail2ban.log
roles:
- jmcvetta.logzio
License
This is Free Software, released under the Apache v2 license.
Author Information
Support and consulting services are available from Silicon Heavy.
Installa
ansible-galaxy install jmcvetta.logzio
Licenza
apache-2.0
Download
75
Proprietario