From 3eebd0021262cf5899cdc8031e6e0e0baa579cac Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 Jul 2014 13:33:38 -0600 Subject: [PATCH] added script to build Events* index config JSON for ES --- resources/elasticsearch_events_template_footer.json | 3 +++ resources/elasticsearch_events_template_header.json | 10 ++++++++++ scripts/buildESTemplate.sh | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 resources/elasticsearch_events_template_footer.json create mode 100644 resources/elasticsearch_events_template_header.json diff --git a/resources/elasticsearch_events_template_footer.json b/resources/elasticsearch_events_template_footer.json new file mode 100644 index 0000000000000..be8817a918c4a --- /dev/null +++ b/resources/elasticsearch_events_template_footer.json @@ -0,0 +1,3 @@ + } + } +} diff --git a/resources/elasticsearch_events_template_header.json b/resources/elasticsearch_events_template_header.json new file mode 100644 index 0000000000000..125b65703ebaf --- /dev/null +++ b/resources/elasticsearch_events_template_header.json @@ -0,0 +1,10 @@ +{ + "network" : { + "template" : "events*", + "settings" : { + "index.refresh_interval" : "10s", + "index.cache.filter.expire" : "2m", + "index.cache.field.expire" : "2m" + }, + "mappings" : { + "meta" : { diff --git a/scripts/buildESTemplate.sh b/scripts/buildESTemplate.sh index 8f5bfe8cb62e2..3499bc2b35065 100755 --- a/scripts/buildESTemplate.sh +++ b/scripts/buildESTemplate.sh @@ -1,8 +1,13 @@ #!/bin/sh ES_TEMPLATE=resources/network.json +EVENTS_TEMPLATE=resources/events.json cat resources/elasticsearch_network_template_header.json > $ES_TEMPLATE perl scripts/buildESTemplate.pl protofiles/DpiMsgLRproto.proto resources/remapping >> $ES_TEMPLATE cat resources/elasticsearch_network_template_footer.json >> $ES_TEMPLATE +cat resources/elasticsearch_events_template_header.json > $EVENTS_TEMPLATE +perl scripts/buildESTemplate.pl protofiles/DpiMsgLRproto.proto resources/remapping >> $EVENTS_TEMPLATE +cat resources/elasticsearch_events_template_footer.json >> $EVENTS_TEMPLATE +