Installs and configures the collector-sidecar package for graylog.
- Description
- Setup - The basics of getting started with graylog-collector-sidecar
- What graylog-collector-sidecar affects
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This module can be used to install and configure the Graylog Collector Sidecar. (http://docs.graylog.org/en/2.2/pages/collector_sidecar.html)
Since this module has not been published to puppetforge yet, include its git repository in your Puppetfile:
mod 'gcs',
git: 'https://github.com/tentwentyfour/puppet-graylog-collector-sidecar.git',
ref: '0.4.2'
The module requires puppetlabs-stdlib, puppet-remote_file and puppetlabs-apt on Debian-based OSs.
The graylog-collector-sidecar module manages the following things:
- Graylog-collector-sidecar packages
- Graylog-collector-sidecar configuration file
- Graylog-collector-sidecar service
You can configure the module using hiera:
include ::gcs
gcs::server_url: http://my.graylog.server:9000/api
gcs::update_interval: 15
gcs::tags:
- linux
- icinga2
- nginx
The same can be achieved using puppet manifests only:
class { '::gcs':
update_interval => 10,
server_url => 'http://my.graylog.server:9000/api',
tags => [
'linux',
'icinga2',
'nginx',
],
}
The default class of this module. It handles the basic installation and configuration of Graylog Collector Sidecar. When you declare this class, puppet will do the following:
- Install Graylog Collector Sidecar
- Place a default configuration for the Collector-Sidecar daemon
- Start collector-sidecar and enable the service
This class requires that you set the server_url parameter. All other parameters are optional.
class { 'gcs':
server_url => 'https://my.graylog.server/api',
}
Parameters within gcs
Valid values are running or stopped. Default: running
Whether to enable the collector-sidecar service. Default: true
Whether or not to install the collector-sidecar service. Default: true
URL to the api of your graylog server. Collector-sidecar will fetch configurations from this host based on the configured tags. Default: undef
Tags for this host. Default: []
Which package version to install. Default: 0.1.0
Which package revision to install. Default: 1 (For most versions there is only one revision.)
Location of log files to index and report to the Graylog server. Default: ['/var/log']
The interval in seconds the sidecar will fetch new configurations from the Graylog server. Default: 10.
Ignore errors when the REST API was started with a self-signed certificate. Default: false
Send the status of each backend back to Graylog and display it on the status page for the host. Default: false
Specify the configuration directory for collector-sidecar. Default: /etc/graylog/collector-sidecar
Specify the service name for collector-sidecar. Default: collector-sidecar
Whether to enable the filebeat service. Default: true
Whether to enable the nxlog service. Default: false
Whether to create the archive directory for the downloaded package. Default: true
Specify the archives directory parent directory. Default: /var/cache/puppet
Specify the archives directory. Default: "${puppet_cache}/archives"
Specify the checksum type. Default: 'sha256'
Service provider to use. Default: Depends on your operating system.
- Ubuntu 15.04:
upstart
- Ubuntu 16.04:
systemd
- Debian:
systemd
- Red Hat:
systemd
- CentOS:
systemd
Package provider to use. Default: Depends on your operating system family.
- Debian:
dpkg
- Red Hat:
rpm
Specify the checksum of the downloaded package. Default: Depends on your operating system.
Specify where to download the collector-sidecar package. Default: Depends on your operating system family.
- Debian:
${archive_dir}/collector-sidecar.${package_version}.deb
- Red Hat:
${archive_dir}/collector-sidecar.${package_version}.rpm
The URL from which the package will be downloaded. Default: Depends on your operating system family.
- Debian:
https://github.com/Graylog2/collector-sidecar/releases/download/${major_version}.${minor_version}.${patch_level}${version_suffix}/collector-sidecar_${major_version}.${minor_version}.${patch_level}${version_suffix}-${package_revision}_${::architecture}.deb
- Red Hat:
https://github.com/Graylog2/collector-sidecar/releases/download/${major_version}.${minor_version}.${patch_level}${version_suffix}/collector-sidecar-${major_version}.${minor_version}.${patch_level}${version_suffix}-${package_revision}.${::architecture}.rpm
Todo
- Currently only supports Beats (filebeat) backend.
- Only supports Debian (and derivates, e.g. Ubuntu) as well as RedHat (and derivates, e.g. CentOS)
Pull requests are welcome, especially those adding specs, further OS compatibility and documentation.