From 931e0dc466b975d0c671a3553c5ecfbc8476dfdb Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 Jul 2014 15:44:47 -0600 Subject: [PATCH 1/2] added code for Steve's networkrules index --- ...elasticsearch_network_template_header.json | 2 +- resources/networkrules.json | 33 +++++++++++++++++++ scripts/buildESTemplate.sh | 1 - 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 resources/networkrules.json diff --git a/resources/elasticsearch_network_template_header.json b/resources/elasticsearch_network_template_header.json index bc61afd82c872..77dc2ddb42032 100644 --- a/resources/elasticsearch_network_template_header.json +++ b/resources/elasticsearch_network_template_header.json @@ -1,6 +1,6 @@ { "network" : { - "template" : "network*", + "template" : "network_*", "settings" : { "index.refresh_interval" : "10s", "index.cache.filter.expire" : "2m", diff --git a/resources/networkrules.json b/resources/networkrules.json new file mode 100644 index 0000000000000..307332583dfde --- /dev/null +++ b/resources/networkrules.json @@ -0,0 +1,33 @@ +{ + "network" : { + "template" : "networkrules", + "settings" : { + "index.refresh_interval" : "10s", + "index.cache.filter.expire" : "2m", + "index.cache.field.expire" : "2m" + }, + "mappings" : { + "rule" : { + "properties" : { + "enabled" : { + "type" : "boolean" + }, + "severity" : { + "type" : "string" + }, + "query" : { + "type" : "object" + }, + "createdDate" : { + "format" : "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||yyyy-MM-dd'T'HH:mm:ss.SSSZZ", + "type" : "date" + }, + "lastModifiedDate" : { + "format" : "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||yyyy-MM-dd'T'HH:mm:ss.SSSZZ", + "type" : "date" + } + } + } + } + } +} \ No newline at end of file diff --git a/scripts/buildESTemplate.sh b/scripts/buildESTemplate.sh index 3499bc2b35065..928d2b6c5f20c 100755 --- a/scripts/buildESTemplate.sh +++ b/scripts/buildESTemplate.sh @@ -10,4 +10,3 @@ 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 - From 910c2e1fb84f8ed401b19db25e14bc330eb2834c Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 Jul 2014 15:48:10 -0600 Subject: [PATCH 2/2] mapping name change for consistency --- resources/elasticsearch_events_template_header.json | 2 +- resources/networkrules.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/elasticsearch_events_template_header.json b/resources/elasticsearch_events_template_header.json index 125b65703ebaf..63c29356dc8cb 100644 --- a/resources/elasticsearch_events_template_header.json +++ b/resources/elasticsearch_events_template_header.json @@ -1,5 +1,5 @@ { - "network" : { + "events" : { "template" : "events*", "settings" : { "index.refresh_interval" : "10s", diff --git a/resources/networkrules.json b/resources/networkrules.json index 307332583dfde..b0548cb9ead7b 100644 --- a/resources/networkrules.json +++ b/resources/networkrules.json @@ -1,5 +1,5 @@ { - "network" : { + "networkrules" : { "template" : "networkrules", "settings" : { "index.refresh_interval" : "10s",