Skip to content

Installs and configures rsyslog server or client and logrotate for the server too.

License

Notifications You must be signed in to change notification settings

AaltoSciComp/ansible-role-rsyslog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status ansible-role-rsyslog

  • Assumes rsyslog is installed and configured to include /etc/rsyslog.d/*.conf

  • Installs a config file into /etc/rsyslog.d

  • Restarts rsyslog if that file changed.

  • If listener is set true then setup UDP and TCP listeners on port 514

  • Create a directory to store logs

  • Configure logrotate to rotate the logs

Requirements

The listener conditional syntax is rsyslog7 specific. It uses "stop" instead of &~

It is possible to install rsyslog7 on EL6, but it's not there by default.

Role Variables

For shipping over UDP:

central_log_host: "@Address.To.Loghost"

For shipping over TCP:

central_log_host: "@@Address.To.Loghost"

For listening:

  • central_log_listener: False
  • central_logs_directory: "/var/log/remote/servers"
  • central_logs_retention_days: 30
  • central_log_by_function: False

Setting log_by_function to True will store logs not in %hostname% but per function instead.

For extra settings:

central_log_extra_settings:
 - "$MainMsgQueueType LinkedList"
 - "$MainMsgQueueHighWatermark 400000"
 - "$MainMsgQueueHighWatermark 100000"
 - "$MainMsgQueueDequeueBatchSize 10000"
 - "$MainMsgQueueSaveOnShutdown on"
 - "$MainMsgQueueWorkerThreads 8"
 - "$ActionQueueWorkerThreads 8"
 - "$ActionQueueSize 1000000"
 - "$ActionQueueDequeueBatchSize 500000"
 - "$ActionQueueType LinkedList"

There is also option to setup secondary log host for forwarding. See defauls/main.yml for params.

Dependencies

Example Playbook

License

MIT

Author Information

About

Installs and configures rsyslog server or client and logrotate for the server too.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 43.5%
  • Dockerfile 30.9%
  • Jinja 25.6%