Skip to content

Instantly share code, notes, and snippets.

@saez0pub
Last active December 23, 2015 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saez0pub/6671828 to your computer and use it in GitHub Desktop.
Save saez0pub/6671828 to your computer and use it in GitHub Desktop.
Elasticsearch Template for new schema of logstash
{
"template" : "logstash-*",
"settings" : {
"index.default_field" : "message",
"index.number_of_replicas" : "0",
"index.number_of_shards" : "1"
},
"mappings" : {
"_default_" : {
"dynamic_templates" : [ {
"string_template" : {
"mapping" : {
"index" : "not_analyzed",
"type" : "string"
},
"match" : "*",
"match_mapping_type" : "string"
}
} ],
"properties" : {
"@message" : {
"index" : "analyzed",
"type" : "string"
},
"bytes" : {
"index" : "not_analyzed",
"type" : "long"
},
"time_request" : {
"index" : "not_analyzed",
"type" : "long"
},
"time_queue" : {
"index" : "not_analyzed",
"type" : "long"
},
"time_backend_connect" : {
"index" : "not_analyzed",
"type" : "long"
},
"time_backend_response" : {
"index" : "not_analyzed",
"type" : "long"
},
"time_duration" : {
"index" : "not_analyzed",
"type" : "long"
},
"bytes" : {
"index" : "not_analyzed",
"type" : "long"
},
"bytes_read" : {
"index" : "not_analyzed",
"type" : "long"
},
"actconn" : {
"index" : "not_analyzed",
"type" : "long"
},
"feconn" : {
"index" : "not_analyzed",
"type" : "long"
},
"beconn" : {
"index" : "not_analyzed",
"type" : "long"
},
"beconn" : {
"index" : "not_analyzed",
"type" : "long"
},
"srvconn" : {
"index" : "not_analyzed",
"type" : "long"
},
"retries" : {
"index" : "not_analyzed",
"type" : "long"
},
"srv_queue" : {
"index" : "not_analyzed",
"type" : "long"
},
"backend_queue" : {
"index" : "not_analyzed",
"type" : "long"
}
}
}
}
}
@saez0pub
Copy link
Author

curl -XPUT 'http://localhost:9200/_template/template_logstash/' -d @etc/mapping.json

@saez0pub
Copy link
Author

haproxy and apache mapping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment