Skip to content

Instantly share code, notes, and snippets.

@jordansissel
Created November 30, 2012 23:28
Show Gist options
  • Save jordansissel/4179445 to your computer and use it in GitHub Desktop.
Save jordansissel/4179445 to your computer and use it in GitHub Desktop.
logstash at dreamhost
# This file is generated by Chef in the elasticsearch cookbook.
node.name: <%= node.nodes.self %>
path.data: /home/elasticsearch/data
path.logs: /home/elasticsearch/logs
# Cluster name
cluster.name: <%= node.nodes.site %>
# The list of neighbors
discovery.zen.ping.unicast.hosts: <%= node.nodes.neighbors.join(",") %>
# Set the number of nodes required for a master election to the number of nodes
# in the cluster.
discovery.zen.minimum_master_nodes: <%= node.nodes.neighbors.count + 1 %>
# Practically never mark a node failed.
discovery.zen.fd.ping_retries: 9999999
# Run this against an elasticsearch cluster.
curl -XPUT http://localhost:9200/_template/logstash-template -d '
{
"template": "logstash-*",
"settings": {
"index.cache.field.type": "soft",
"index.compress.stored": true,
"index.merge.policy.max_merged_segment": "5g",
"index.query.default_field": "@message",
"index.refresh_interval": "5s",
"index.store.compress.stored": true,
"index.term_index_divisor": 1,
"index.term_index_interval": 128,
"number_of_replicas": 1,
"number_of_shards": 5
},
"mappings": {
"_default_": {
"@fields": { "type": "object", "dynamic": true, "path": "full" },
"@message": { "type": "string", "index": "analyzed" },
"@source": { "type": "string", "index": "not_analyzed" },
"@source_host": { "type": "string", "index": "not_analyzed" },
"@source_path": { "type": "string", "index": "not_analyzed" },
"@tags": { "type": "string", "index": "not_analyzed" },
"@timestamp": { "type": "date", "index": "not_analyzed" },
"@type": { "type": "string", "index": "not_analyzed" }
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment