Skip to content

Instantly share code, notes, and snippets.

@bartschuller
Created May 20, 2015 15:28
Show Gist options
  • Save bartschuller/da1c41722c055a44b61e to your computer and use it in GitHub Desktop.
Save bartschuller/da1c41722c055a44b61e to your computer and use it in GitHub Desktop.
Upload logstash template settings to elasticsearch for use with fluentd
#!/bin/sh
curl -XPUT localhost:9200/_template/logstash -d '{"template":"logstash-*","settings":{"index.refresh_interval":"5s"},"mappings":{"_default_":{"dynamic_templates":[{"string_fields":{"mapping":{"index":"analyzed","omit_norms":true,"type":"string","fields":{"raw":{"index":"not_analyzed","ignore_above":256,"type":"string"}}},"match_mapping_type":"string","match":"*"}}],"properties":{"geoip":{"dynamic":true,"path":"full","properties":{"location":{"type":"geo_point"}},"type":"object"},"@version":{"index":"not_analyzed","type":"string"}},"_all":{"enabled":true}}},"aliases":{}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment