Skip to content

Instantly share code, notes, and snippets.

@HackRanger
Created April 24, 2013 14:41
Show Gist options
  • Save HackRanger/5452649 to your computer and use it in GitHub Desktop.
Save HackRanger/5452649 to your computer and use it in GitHub Desktop.
logstash_server role which creates the logstash.conf
name "logstash_server"
description "Attributes and run_lists specific to FAO's logstash instance"
default_attributes(
:logstash => {
:server => {
:enable_embedded_es => false,
:inputs => [
{:udp => {
:port =>1514,
:type => "syslog",
:buffer_size => 8192,
:format => "plain"
}},
{:tcp => {
:port =>1500,
:type => "all_log",
:host => '10.14.11.102',
:format => "plain"
}}
],
:filters => [
:grok => {
:type => "syslog",
:pattern => "%{SYSLOGLINE}"
}
],
:outputs => [
{:file => {
:type => '["all_log","syslog"]',
:path => '/opt/logstash/server/log/rsyslog.log',
}},
{:elasticsearch => {
:type => '["all_log","syslog"]',
:host => "10.14.11.101",
:port => "9200"
}}
]
}
}
)
run_list(
"role[elasticsearch_server]",
"recipe[erlang]",
"recipe[git]",
"recipe[logstash::server]",
"recipe[php::module_curl]"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment