You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The apt Puppet library when using repo management on Debian/Ubuntu.
Usage
Installation, make sure service is running and will be started at boot time:
class { 'logstashforwarder': }
Install a certain version:
'1.0'
}"> class { 'logstashforwarder': version => '1.0' }
In the absense of an appropriate package for your environment it is possible to install from other sources as well.
http/https/ftp source:
'http://download.website.com/packages/logstashforwarder.rpm'
}"> class { 'logstashforwarder': package_url => 'http://download.website.com/packages/logstashforwarder.rpm' }
puppet:// source:
'puppet:///path/to/logstashforwarder.rpm'
}"> class { 'logstashforwarder': package_url => 'puppet:///path/to/logstashforwarder.rpm' }
Local file source:
'file:/path/to/logstashforwarder.rpm'
}"> class { 'logstashforwarder': package_url => 'file:/path/to/logstashforwarder.rpm' }
Attempt to upgrade logstashforwarder if a newer package is detected (false by default):
true
}"> class { 'logstashforwarder': autoupgrade => true }
Install everything but disable the service (useful for pre-configuring systems):
'disabled'
}"> class { 'logstashforwarder': status => 'disabled' }
Under normal circumstances a modification to the logstashforwarder configuration will trigger a restart of the service. This behaviour can be disabled:
false
}"> class { 'logstashforwarder': restart_on_change => false }
Disable and remove logstashforwarder entirely:
'absent'
} "> class { 'logstashforwarder': ensure => 'absent' }
Configuration
Network and SSL
For the network part of the configuration you need to set the servers and ssl information.
The 'fields' hash allows you to set custom fields which you can use in Logstash.
Repository management
Most sites will manage repositories seperately; however, this module can manage the repository for you.
true
}"> class { 'logstashforwarder': manage_repo => true }
Note: When using this on Debian/Ubuntu you will need to add the Puppetlabs/apt module to your modules.
Service Management
Currently only the basic SysV-style init service provider is supported but others could be implemented relatively easily (pull requests welcome).
init
Defaults File
The defaults file (/etc/defaults/logstashforwarder or /etc/sysconfig/logstashforwarder) for the logstashforwarder service can be populated as necessary. This can either be a static file resource or a simple key value-style hash object, the latter being particularly well-suited to pulling out of a data source such as Hiera.
file source
'puppet:///path/to/defaults'
}"> class { 'logstashforwarder': init_defaults_file => 'puppet:///path/to/defaults' }