Installs and configures Logstash-forwarder.
- Ubuntu 12.04 (Precise)
- logrotate
- logstash
-
node["logstash-forwarder"]["version"]
- Version of Logstash-forwarder to install. -
node["logstash-forwarder"]["user"]
- User for Logstash-forwarder. -
node["logstash-forwarder"]["group"]
- Group for Logstash-forwarder. -
node["logstash-forwarder"]["dir"]
- Directory to install into. -
node["logstash-forwarder"]["log_dir"]
- Log directory. -
node["logstash-forwarder"]["hosts"]
- A list of downstream servers listening for our messages. logstash-forwarder will pick one at random and only switch if the selected one appears to be dead or unresponsive. -
node["logstash-forwarder"]["timeout"]
- Network timeout in seconds. If an timeout is reached, logstash-forwarder will assume the connection or server is bad and will connect to a server chosen at random from the servers list. -
node["logstash-forwarder"]["ssl_key"]
- The path to your client ssl key (optional). -
node["logstash-forwarder"]["ssl_certificate"]
- The path to your client ssl certificate (optional). -
node["logstash-forwarder"]["ssl_ca"]
- The path to your trusted ssl CA file. This is used to authenticate your downstream server. -
node["logstash-forwarder"]["files"]
- Collection of files to watch.
If you require a collection of files to watch. The structure looks like this:
{ "syslog" => ['/var/log/syslog'], "auth" => ['/var/log/auth.log'] }
-
node["logstash-forwarder"]["logstash_role"]
– Role assigned to Logstash server for search. -
node["logstash-forwarder"]["logstash_fqdn"]
– FQDN to Logstash server if you're trying to target one that isn't searchable. -
node["logstash-forwarder"]["config_file"]
– The path to config file.
recipe[logstash-forwarder]
will install Logstash-forwarder.recipe[logstash-forwarder::certificates]
will configure a Logstash-forwarder key and certificate.
In order to automatically discover Logstash, setup your roles like the following:
default_attributes(
"logstash-forwarder" => {
"logstash_fqdn" => "http://logstash.example.com"
}
)
Or in a Chef Server environment:
default_attributes()
"logstash-forwarder" => {
"logstash_role" => "logstash_server"
}
)
If you use the logstash-forwarder::certificates
recipe, node["logstash-forwarder"]["ssl_certificate_contents"]
will be populated with the contents of the Logstash-forwarder certificate to
secure client/server communication. The default recipe uses this attribute to
create a client-side certificate.