/chef-rsyslog

Chef cookbook that sets rsyslog to forward a copy of the logs to a listening server.

Primary LanguageRuby

rsyslog Cookbook

This cookbook sets your rsyslog to forward logs to another rsyslog server that's listening on port 514. This is one of my first recipes so it's a bit rough.

Requirements

Tested on: RHEL 6 / CentOS 6

e.g.

packages

  • rsyslog - Default CentOS 6 logger

Attributes

rsyslog::default

Key Type Description Default
['rsyslog']['client']['config'] string This is where rsyslog.conf is located /etc/rsyslog.conf
['rsyslog']['client']['service'] string rsyslog is the service rsyslog
['rsyslog']['server']['ipaddress'] string This is the IP address for the listening server 10.13.37.23
['rsyslog']['server']['subnet'] string Your local subnet 10.13.37.0/24
['rsyslog']['server']['mysqlip'] string The IP address of your mysql server 127.0.0.1
['rsyslog']['server']['mysqldb'] string The database name of your rsyslog server Syslog
['rsyslog']['server']['mysqluser'] string The username for your mysqluser root
['rsyslog']['server']['mysqlpass'] string The password for the mysqluser secret

Note: I don't know how to use encrytped databags yet so the password is currently plaintext. Keep that in mind

Usage

rsyslog::client

rsyslog::server

Just include rsyslog in your node's run_list:

Contributing

TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.

e.g.

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Authors: Andrew Raymer