AerisCloud.rsyslog

rsyslog

This roles configures rsyslog. It manages the general configuration file and several service-specific configuration files.

Usage

In your role's meta, add a dependency to this role using the syntax described below.

# my_role/meta/main.yml
dependencies:
  - role: aerisloud.rsyslog
    caller_name: my_role

Your role must contain a template file named rsyslog.conf.j2 which will be copied on to the server.

Variables

When use_rsyslog_udp is set to true, rsyslog will provides UDP syslog reception. Default is false. The default UDP listening port is 514. Set use_rsyslog_udp_port to change the port.

If logstash_forwarder is set to the name of one of the machine in the inventory, rsyslog will forward the logs to this machine.

In addition to setting logstash_forward, if private_ip is set, rsyslog will forward to this IP address. Default is the ansible_host of the logstash_forwarder. This is useful when the logstash_forwarder have multiple IPs, such as global and private IPs.

If logstash_syslog_port is set, rsyslog will send to the logstash_forwarder on that port. The default port is 514. This is useful if logstash is not running as root and cannot listen on ports 0-1024.

If you are not using a centralized log forwarding service and would like to have rsyslog on each server to send logs directly to Papertrail, set the following:

  • set use_papertrail to true. Default is false.
  • set papertrail_host to the Papertrail log destination. An account is required.
  • set papertrail_port to the Papertrail port given.
  • logstash_forwarder defaults to an empty string, ''. If it is defined, rsyslog will forward the logs to this machine.
  • set papertrail_pem to the full path of the papertrail-bundle.pem file. Default: /etc/papertrail-bundle.pem.
About

Manage the rsyslog configuration.

Install
ansible-galaxy install AerisCloud.rsyslog
GitHub repository
License
mit
Downloads
374
Owner
Integrated local development and production management