Puppet Class: logstash
- Inherits:
-
logstash::params
- logstash::params
- logstash
- Defined in:
- manifests/init.pp
Overview
Class: logstash
This class is able to install or remove logstash on a node. It manages the status of the related service.
Parameters
- ensure
-
String. Controls if the managed resources shall be
present
orabsent
. If set toabsent
:-
The managed software packages are being uninstalled.
-
Any traces of the packages will be purged as good as possible. This may include existing configuration files. The exact behavior is provider dependent. Q.v.:
-
Puppet type reference: package, "purgeable"
-
-
System modifications (if any) will be reverted as good as possible (e.g. removal of created users, services, changed log settings, ...).
-
This is thus destructive and should be used with care.
Defaults to
present
. -
- autoupgrade
-
Boolean. If set to
true
, any managed package gets upgraded on each Puppet run when the package provider is able to find a newer version than the present one. The exact behavior is provider dependent. Q.v.:-
Puppet type reference: package, "upgradeable"
Defaults to
false
. -
- status
-
String to define the status of the service. Possible values:
-
enabled
: Service is running and will be started at boot time. -
disabled
: Service is stopped and will not be started at boot time. -
running
: Service is running but will not be started at boot time. You can use this to start a service on the first Puppet run instead of the system startup. -
unmanaged
: Service will not be started at boot time and Puppet does not care whether the service is running or not. For example, this may be useful if a cluster management software is used to decide when to start the service plus assuring it is running on the desired node.
Defaults to
enabled
. The singular form ("service") is used for the sake of convenience. Of course, the defined status affects all services if more than one is managed (seeservice.pp
to check if this is the case). -
- version
-
String to set the specific core package version you want to install. Defaults to
false
. - restart_on_change
-
Boolean that determines if the application should be automatically restarted whenever the configuration changes. Disabling automatic restarts on config changes may be desired in an environment where you need to ensure restarts occur in a controlled/rolling manner rather than during a Puppet run.
Defaults to
true
, which will restart the application on any config change. Setting tofalse
disables the automatic restart.
The default values for the parameters are set in logstash::params. Have a
look at the corresponding params.pp
manifest file if you need
more technical information about them.
- package_url
-
Url to the package to download. This can be a http,https or ftp resource for remote packages puppet:// resource or file:/ for local packages
- software_provider
-
Way to install the packages, currently only packages are supported.
- package_dir
-
Directory where the packages are downloaded to
- purge_package_dir
-
Purge package directory on removal
- package_dl_timeout
-
For http,https and ftp downloads you can set howlong the exec resource may take. Defaults to: 600 seconds
- logstash_user
-
The user Logstash should run as. This also sets the file rights.
- logstash_group
-
The group logstash should run as. This also sets the file rights
- purge_configdir
-
Purge the config directory for any unmanaged files
- service_provider
-
Service provider to use. By Default when a single service provider is possibe that one is selected.
- init_defaults
-
Defaults file content in hash representation
- init_defaults_file
-
Defaults file as puppet resource
- init_template
-
Service file as a template
- java_install
-
Install java which is required for Logstash. Defaults to: false
- java_package
-
If you like to install a custom java package, put the name here.
- manage_repo
-
Enable repo management by enabling our official repositories
- repo_version
-
Our repositories are versioned per major version (1.3, 1.4) select here which version you want
- configdir
-
Path to directory containing the logstash configuration. Use this setting if your packages deviate from the norm (/etc/logstash)
- repo_stage
-
Use stdlib stage setup for managing the repo, instead of anchoring
Examples
-
Installation, make sure service is running and will be started at boot time:
class { 'logstash': manage_repo => true, }
-
If you're not already managing Java some other way:
class { 'logstash': manage_repo => true, java_install => true, }
-
Removal/decommissioning:
class { 'logstash': ensure => 'absent', }
-
Install everything but disable service(s) afterwards
class { 'logstash': status => 'disabled', }
Authors
-
Richard Pijnenburg <richard.pijnenburg@elasticsearch.com>