Convert logstash ES output to HTTP.

The logstash elasticsearch output seems to degrade over time and slow
down. Restarting the logstash daemon temporarily corrects this problem.
Switch to the elasticsearch HTTP output to see if that corrects the
problem as well.

Note the logstash watchdog is disabled by this change as logstash
daemons using elasticsearch HTTP output will not join the elasticsearch
cluster which will force the watchdog to always trip. To avoid this
issue disable the watchdog.

Change-Id: I77044b26fa10fb1fc3690a0464d79d55bed2fe00
This commit is contained in:
Clark Boylan 2014-07-07 13:14:01 -07:00
parent 9a15781d5e
commit a339be3b8c
3 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,7 @@
# be a 'host:port' string).
class logstash::watchdog (
$cron_ensure = 'present',
$es_api_node = 'localhost'
) {
package { 'jq':
@ -36,6 +37,7 @@ class logstash::watchdog (
}
cron { 'logstash-watchdog':
ensure => $cron_ensure,
minute => '*/10',
environment => 'PATH=/bin:/usr/bin:/usr/local/bin',
command => "sleep $((RANDOM\%60)) && /usr/local/bin/logstash-watchdog ${es_api_node}",

View File

@ -40,6 +40,7 @@ class openstack_project::logstash_worker (
}
class { 'logstash::watchdog':
cron_ensure => 'absent',
es_api_node => $discover_node,
}

View File

@ -124,9 +124,8 @@ filter {
}
output {
elasticsearch {
elasticsearch_http {
host => "<%= scope.lookupvar("::openstack_project::logstash_worker::discover_node") %>"
node_name => "<%= scope.lookupvar("::hostname") %>"
manage_template => false
flush_size => 512
}