Skip to content
Ansible role to forward logs to Logz.io
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
defaults
handlers
meta
spec
tasks
templates fix ignore_older indentation error Aug 8, 2016
tests
vars
.rspec
.travis.yml Run serverspec as part of the travis build Jan 22, 2016
LICENSE
README.md
Rakefile
VERSION

README.md

Build Status

jmcvetta.logzio

Ansible role to configure forwarding logs to Logz.io using Filebeat. Can also configure Topbeat and Packetbeat to forward their data to Logz.io.

Based on mediapeers.filebeat by Stefan Horning.

Requirements

Tested on Ubuntu 14.04LTS

Role Variables

logzio_token: YOUR_LOGZIO_TOKEN

# Logging level for Filebeat, Topbeat, and Packetbeat daemons
logzio_daemon_log_level: warning


#-------------------------------------------------------------------------------
#
# Logs
#
#-------------------------------------------------------------------------------

# Example, overwrite this variable:
logzio_logs:
  - 
    # Paths for files you want forwarded to Logz.io
    paths:
      - '/var/log/apache2/access.log'
      - '/var/log/apache2/error.log'
    # codec must be 'plain' or 'json'
    codec: plain 
    # Informational tag describing what type of data these files contain
    type: apache2

# Extra logs - will be added to logzio_logs list at runtime.  Facilitates
# having a base set of logs plus extra logs per host or group.
logzio_extra_logs: []

# Ignore files which were modified more then the defined timespan in the past.
# Time strings like 2h (2 hours), 5m (5 minutes) can be used, or the value can 
# be left blank to disablet this option (default).
logzio_ignore_older: 


#-------------------------------------------------------------------------------
#
# Topbeat
#
#-------------------------------------------------------------------------------

# Install and configure Topbeat
logzio_topbeat: false

# In seconds, defines how often to read server statistics
logzio_topbeat_period: 60

# What information should Topbeat monitor?
logzio_topbeat_system: true
logzio_topbeat_process: false
logzio_topbeat_filesystem: true
logzio_topbeat_cpu_per_core: false


#-------------------------------------------------------------------------------
#
# Packetbeat
#
#-------------------------------------------------------------------------------

# Install and configure Packetbeat
logzio_packetbeat: false

# Netowrk interface devices to monitor
logzio_packetbeat_interfaces: any

Dependencies

Example Playbook

- name: Ensure logs are forwarded 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 terms of the Apache v2 license.

Author Information

Jason McVetta

Support and consulting services are available from Silicon Heavy.

You can’t perform that action at this time.