Add mqtt output plugin to logstash indexers
This commit adds support for configuring the mqtt logstash output plugin. This will enable us to push events from our logstash workers to firehose.o.o. The plugin can be found here: https://github.com/kompa3/logstash-output-mqtt (althought it's README is from a template and you have to look at the inline docs for how to use it) and the gem is published on rubygems.org here: https://rubygems.org/gems/logstash-output-mqtt/ Change-Id: I7255f6c256ab3e3ca33caf69b71bf4ffab02c1bb
This commit is contained in:
parent
f671fcf2c9
commit
5a9ea735e8
|
@ -31,6 +31,8 @@ class logstash::indexer (
|
|||
$conf_template = undef,
|
||||
$input_template = 'logstash/input.conf.erb',
|
||||
$output_template = 'logstash/output.conf.erb',
|
||||
$enable_mqtt = false,
|
||||
$mqtt_ca_cert_contents = undef,
|
||||
) {
|
||||
include ::logstash
|
||||
|
||||
|
@ -84,7 +86,22 @@ class logstash::indexer (
|
|||
mode => '0644',
|
||||
require => Class['logstash'],
|
||||
}
|
||||
if $enable_mqtt {
|
||||
exec {'install_mqtt_plugin':
|
||||
command => '/opt/logstash/bin/plugin install logstash-output-mqtt',
|
||||
before => Service['logstash']
|
||||
}
|
||||
|
||||
file { '/etc/logstash/mqtt-root-CA.pem.crt':
|
||||
ensure => present,
|
||||
content => $mqtt_ca_cert_contents,
|
||||
replace => true,
|
||||
owner => 'logstash',
|
||||
group => 'logstash',
|
||||
mode => '0600',
|
||||
before => Service['logstash']
|
||||
}
|
||||
}
|
||||
service { 'logstash':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
|
|
Loading…
Reference in New Issue