summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorosgn422w <gervais-martial.ngueko@intl.att.com>2020-02-04 16:10:00 +0100
committerosgn422w <gervais-martial.ngueko@intl.att.com>2020-02-04 16:10:00 +0100
commit06f6ee695b944990d82012f1db1fb22064342b21 (patch)
tree99738f977acbf23c5f79c9207b5598edcb398f68
parentbc33254bd75ba75022cc7e03dacea872787b51a3 (diff)
correct kibana restore
make some corrections to have correct restore on kibana Issue-ID: CLAMP-483 Change-Id: Ifad7cbc4b98a0844b45ae3452f9ce64077ab5790 Signed-off-by: osgn422w <gervais-martial.ngueko@intl.att.com>
-rw-r--r--pom.xml2
-rwxr-xr-xsrc/main/docker/kibana/backup.py2
-rwxr-xr-xsrc/main/docker/kibana/restore.py7
-rw-r--r--src/main/docker/kibana/saved-objects/default/dashboard/dashboard-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json2
-rw-r--r--src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-45238b70-b7ae-11e8-8c46-97881a199baf.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-54038730-b7ae-11e8-8c46-97881a199baf.json1
-rwxr-xr-xsrc/main/docker/kibana/startup.sh26
7 files changed, 32 insertions, 9 deletions
diff --git a/pom.xml b/pom.xml
index c4fc2d4..28de301 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
<groupId>org.onap.clamp</groupId>
<artifactId>clds</artifactId>
<version>4.2.0-SNAPSHOT</version>
- <name>clamp</name>
+ <name>clamp-dashboard</name>
<parent>
diff --git a/src/main/docker/kibana/backup.py b/src/main/docker/kibana/backup.py
index b1e4518..841e9af 100755
--- a/src/main/docker/kibana/backup.py
+++ b/src/main/docker/kibana/backup.py
@@ -68,7 +68,7 @@ def main():
# get list of the set of objects we update
url = "%s/api/saved_objects/_find" % (args.kibana_host.rstrip("/"),)
- saved_objects_req = requests.get(url, auth=('admin', 'admin'), verify=False,
+ saved_objects_req = requests.get(url, auth=('clampadmin', 'kibanaro'), verify=False,
params={'per_page': PER_PAGE,'type':['config','search','dashboard','visualization','index-pattern']})
saved_objects = saved_objects_req.json()['saved_objects']
diff --git a/src/main/docker/kibana/restore.py b/src/main/docker/kibana/restore.py
index eee2e6b..a96f6af 100755
--- a/src/main/docker/kibana/restore.py
+++ b/src/main/docker/kibana/restore.py
@@ -36,7 +36,8 @@ else:
-OBJECT_TYPES = ['index-pattern', 'config', 'search', 'visualization', 'dashboard']
+#OBJECT_TYPES = ['index-pattern', 'config', 'search', 'visualization', 'dashboard']
+OBJECT_TYPES = ['index-pattern', 'search', 'visualization', 'dashboard']
def parse_args(args):
""" Parse arguments given to this script"""
@@ -95,10 +96,10 @@ def main():
except KeyError:
logger.info("Could not find key %s in %s[%s]", key, obj_type, obj_id)
- logger.info('Restoring %s id:%s (overwrite:%s)', obj_type, obj_id, args.force)
+ logger.info('Restoring %s id:%s (overwrite:%s on HOST:%s)', obj_type, obj_id, args.force, args.kibana_host.rstrip("/"))
url = "%s/api/saved_objects/%s/%s" % (args.kibana_host.rstrip("/"), obj_type, obj_id)
params = {'overwrite': True} if args.force else {}
- post_object_req = requests.post(url, auth=('admin', 'admin'), verify=False,
+ post_object_req = requests.post(url, auth=('clampadmin', 'kibanaro'), verify=False,
headers={'content-type': 'application/json',
'kbn-xsrf': 'True'},
params=params,
diff --git a/src/main/docker/kibana/saved-objects/default/dashboard/dashboard-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json b/src/main/docker/kibana/saved-objects/default/dashboard/dashboard-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json
index 76670d2..e774ce4 100644
--- a/src/main/docker/kibana/saved-objects/default/dashboard/dashboard-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json
+++ b/src/main/docker/kibana/saved-objects/default/dashboard/dashboard-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json
@@ -1 +1 @@
-{"attributes": {"hits": 0, "timeRestore": false, "description": "", "title": "Clamp Dashboard", "uiStateJSON": "{\n \"P-4\": {\n \"vis\": {\n \"legendOpen\": false\n }\n },\n \"P-6\": {\n \"vis\": {\n \"params\": {\n \"sort\": {\n \"columnIndex\": null,\n \"direction\": null\n }\n }\n }\n }\n}", "panelsJSON": "[\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"1\",\n \"w\": 6,\n \"x\": 0,\n \"y\": 0\n },\n \"id\": \"e1f0fa00-38f5-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"1\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"2\",\n \"w\": 6,\n \"x\": 6,\n \"y\": 0\n },\n \"id\": \"f724dfd0-38f6-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"2\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"3\",\n \"w\": 6,\n \"x\": 0,\n \"y\": 3\n },\n \"id\": \"9a1a6750-38f7-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"3\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"4\",\n \"w\": 6,\n \"x\": 6,\n \"y\": 3\n },\n \"id\": \"0ef409f0-38f8-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"4\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"5\",\n \"w\": 6,\n \"x\": 0,\n \"y\": 6\n },\n \"id\": \"ae8c22b0-3905-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"5\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"6\",\n \"w\": 6,\n \"x\": 6,\n \"y\": 6\n },\n \"id\": \"a9d9d120-38f8-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"6\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n }\n]", "optionsJSON": "{\n \"darkTheme\": false,\n \"hidePanelTitles\": false,\n \"useMargins\": true\n}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\n \"query\": {\n \"language\": \"lucene\",\n \"query\": \"\"\n },\n \"filter\": [],\n \"highlightAll\": true,\n \"version\": true\n}"}}, "version": 4, "type": "dashboard", "id": "e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4", "updated_at": "2019-04-04T06:45:02.504Z"} \ No newline at end of file
+{"attributes": {"hits": 0, "timeRestore": false, "description": "", "title": "Clamp Dashboard", "panelsJSON": "[\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"1\",\n \"w\": 6,\n \"x\": 0,\n \"y\": 0\n },\n \"id\": \"e1f0fa00-38f5-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"1\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"2\",\n \"w\": 6,\n \"x\": 6,\n \"y\": 0\n },\n \"id\": \"f724dfd0-38f6-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"2\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"3\",\n \"w\": 6,\n \"x\": 0,\n \"y\": 3\n },\n \"id\": \"9a1a6750-38f7-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"3\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"4\",\n \"w\": 6,\n \"x\": 6,\n \"y\": 3\n },\n \"id\": \"0ef409f0-38f8-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"4\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"5\",\n \"w\": 6,\n \"x\": 0,\n \"y\": 6\n },\n \"id\": \"ae8c22b0-3905-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"5\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n },\n {\n \"gridData\": {\n \"h\": 3,\n \"i\": \"6\",\n \"w\": 6,\n \"x\": 6,\n \"y\": 6\n },\n \"id\": \"a9d9d120-38f8-11e9-beac-8d2beda26615\",\n \"panelIndex\": \"6\",\n \"type\": \"visualization\",\n \"version\": \"6.1.3\"\n }\n]", "optionsJSON": "{\n \"darkTheme\": false,\n \"hidePanelTitles\": false,\n \"useMargins\": true\n}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\n \"query\": {\n \"language\": \"lucene\",\n \"query\": \"\"\n },\n \"filter\": [],\n \"highlightAll\": true,\n \"version\": true\n}"}}, "version": 4, "type": "dashboard", "id": "e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4", "updated_at": "2019-04-04T06:45:02.504Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-45238b70-b7ae-11e8-8c46-97881a199baf.json b/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-45238b70-b7ae-11e8-8c46-97881a199baf.json
new file mode 100644
index 0000000..66e4806
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-45238b70-b7ae-11e8-8c46-97881a199baf.json
@@ -0,0 +1 @@
+{"attributes": {"fields": "[{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@version.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.cloud-region.identity-url\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.cloud-region.identity-url.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.complex.city\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.complex.city.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.complex.physical-location-id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.complex.physical-location-id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.complex.state\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.complex.state.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.service-id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.service-id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.vnf-id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.vnf-id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.vnf-name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.vnf-name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.vnf-type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.vnf-type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.tenant.tenant-id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.tenant.tenant-id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.vserver.in-maint\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.vserver.in-maint.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.vserver.is-closed-loop-disabled\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.vserver.is-closed-loop-disabled.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.vserver.l-interface.interface-name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.vserver.l-interface.interface-name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.vserver.l-interface.l3-interface-ipv4-address-list.l3-inteface-ipv4-address\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.vserver.l-interface.l3-interface-ipv4-address-list.l3-inteface-ipv4-address.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.vserver.l-interface.network-name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.vserver.l-interface.network-name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.vserver.prov-status\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.vserver.prov-status.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.vserver.selflink\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.vserver.selflink.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.vserver.vserver-id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.vserver.vserver-id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.vserver.vserver-name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.vserver.vserver-name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"action\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"action.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"closedLoopAlarmEnd\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"closedLoopAlarmStart\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"closedLoopControlName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"closedLoopControlName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"closedLoopEventClient\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"closedLoopEventClient.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"closedLoopEventStatus\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"closedLoopEventStatus.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"eNodeB.cell_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"eNodeB.cell_id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"eNodeB.common_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"eNodeB.common_id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"eNodeB.datetime\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"eNodeB.datetime.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"eNodeB.ems_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"eNodeB.ems_id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"eNodeB.oam_ip\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"eNodeB.oam_ip.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"eNodeB.software_version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"eNodeB.software_version.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"eNodeB.vendor\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"eNodeB.vendor.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"eventDetails\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"eventDetails.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"flagAbated\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"flagAbated.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"flagAbatedTime\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"flagFinalFailure\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"flagFinalFailure.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"from\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"from.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"history.actor\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"history.actor.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"history.end\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"history.message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"history.message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"history.operation\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"history.operation.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"history.outcome\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"history.outcome.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"history.start\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"history.subRequestId\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"history.subRequestId.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"history.target\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"history.target.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"locationCity\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"locationCity.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"locationState\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"locationState.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"notification\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"notification.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"notificationTime\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"path\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"path.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"policyName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"policyName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"policyScope\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"policyScope.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"policyVersion\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"policyVersion.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"requestID\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"requestID.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"resourceInstance.resourceInstanceName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"resourceInstance.resourceInstanceName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"resourceInstance.resourceName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"resourceInstance.resourceName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"serviceInstance.serviceInstanceName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"serviceInstance.serviceInstanceName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"serviceInstance.serviceName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"serviceInstance.serviceName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"status.code\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"status.code.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"status.description\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"status.description.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"subRequestID\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"subRequestID.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"target\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"target.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"target_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"target_type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"triggerID\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"triggerID.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"triggerSourceName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"triggerSourceName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"version.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vmName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"vmName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vnfName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"vnfName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vnfType\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"vnfType.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"eventDuration\",\"type\":\"number\",\"count\":2,\"scripted\":true,\"script\":\"if (doc.containsKey('closedLoopEventStatus.keyword') && !doc['closedLoopEventStatus.keyword'].empty && (doc.get('closedLoopEventStatus.keyword').value == 'ABATED')) { \\n return doc.get('closedLoopAlarmEnd').value.getMillis()- doc.get('closedLoopAlarmStart').value.getMillis(); \\n} else if(doc.containsKey('notificationTime') && !doc['notificationTime'].empty && (doc.get('notificationTime').value.getMillis() > 0) && !doc['notification.keyword'].empty && doc.containsKey('notification.keyword') ){\\n String val = doc.get('notification.keyword').value.toString();\\n String val2 = val.toUpperCase();\\n// String val3 = val2.replaceAll(/s/,\\\"\\\");\\n if(val2 == 'FINAL: FAILURE') {\\n return doc.get('notificationTime').value.getMillis() - doc.get('closedLoopAlarmStart').value.getMillis();\\n }\\n else return null;\\n} \\nreturn null\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"controlLoopIDTime\",\"type\":\"string\",\"count\":0,\"scripted\":true,\"script\":\"if (doc.containsKey('closedLoopEventStatus.keyword') && !doc['closedLoopEventStatus.keyword'].empty && (doc.get('closedLoopEventStatus.keyword').value == 'ABATED')) {\\n return (doc.get('closedLoopAlarmStart').value.toString()+'-'+doc.get('requestID.keyword').value.toString()+'-'+doc.get('closedLoopAlarmEnd').value.toString());\\n}else if (doc.containsKey('notificationTime') && !doc['notificationTime'].empty){\\n return (doc.get('closedLoopAlarmStart').value.toString()+'-'+doc.get('requestID.keyword').value.toString()+'-'+doc.get('notificationTime').value.toString());\\n}else{\\n return (doc.get('closedLoopAlarmStart').value.toString()+'-'+doc.get('requestID.keyword').value.toString());\\n}\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"controlLoopID\",\"type\":\"string\",\"count\":0,\"scripted\":true,\"script\":\"return (doc.get('closedLoopAlarmStart').value.toString()+'-'+doc.get('requestID.keyword').value.toString());\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"controlLoopScore\",\"type\":\"number\",\"count\":0,\"scripted\":true,\"script\":\"if (doc.containsKey('closedLoopEventStatus.keyword') && !doc['closedLoopEventStatus.keyword'].empty && (doc.get('closedLoopEventStatus.keyword').value == 'ABATED')) { \\n return 1;\\n}else if(doc.containsKey('notificationTime') && !doc['notificationTime'].empty && (doc.get('notificationTime').value.getMillis() > 0) && !doc['notification.keyword'].empty && doc.containsKey('notification.keyword') ){ \\n String val = doc.get('notification.keyword').value.toString(); \\n String val2 = val.toUpperCase().trim(); \\n// String val3 = val2.replaceAll(/s/,\\\"\\\"); \\n if(val2 == 'FINAL: FAILURE') { \\n return 1; \\n } else return 0; \\n} \\nreturn 0;\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false}]", "fieldFormatMap": "{\"eventDuration\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"milliseconds\",\"outputFormat\":\"asMilliseconds\"}},\"controlLoopIDTime\":{\"id\":\"string\"},\"controlLoopID\":{\"id\":\"string\"},\"controlLoopScore\":{\"id\":\"number\"}}", "timeFieldName": "closedLoopAlarmStart", "title": "events-raw-*"}, "version": 1, "type": "index-pattern", "id": "45238b70-b7ae-11e8-8c46-97881a199baf", "updated_at": "2018-10-02T12:10:16.111Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-54038730-b7ae-11e8-8c46-97881a199baf.json b/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-54038730-b7ae-11e8-8c46-97881a199baf.json
new file mode 100644
index 0000000..4f601af
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-54038730-b7ae-11e8-8c46-97881a199baf.json
@@ -0,0 +1 @@
+{"attributes": {"fields": "[{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"@version.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"closedLoopAlarmStart\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"closedLoopControlName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"closedLoopControlName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"locationCity\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"locationCity.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"policyName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"policyName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"policyScope\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"policyScope.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"policyVersion\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"policyVersion.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"requestID\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"requestID.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"tags\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"tags.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"target\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"target.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"target_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"target_type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"triggerSourceName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"triggerSourceName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vmName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"vmName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vnfName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"vnfName.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"vnfType\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"vnfType.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"controlLoopID\",\"type\":\"string\",\"count\":0,\"scripted\":true,\"script\":\"return (doc.get('closedLoopAlarmStart').value.toString()+'-'+doc.get('requestID.keyword').value.toString());\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"eventDuration\",\"type\":\"number\",\"count\":1,\"scripted\":true,\"script\":\"if (doc.containsKey('flagAbatedTime') && (doc.get('flagAbatedTime').value != null) && !doc['flagAbatedTime'].empty) { \\n return doc.get('flagAbatedTime').value.getMillis()- doc.get('closedLoopAlarmStart').value.getMillis(); \\n} else if (doc.containsKey('flagFinalFailureTime') && (doc.get('flagFinalFailureTime').value != null) && !doc['flagFinalFailureTime'].empty) { \\n return doc.get('flagFinalFailureTime').value.getMillis()- doc.get('closedLoopAlarmStart').value.getMillis(); \\n}else return null;\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"CLStartday\",\"type\":\"string\",\"count\":2,\"scripted\":true,\"script\":\"ZoneId zone = ZoneId.of(\\\"Europe/Paris\\\");\\nInstant instant = Instant.ofEpochSecond(doc['closedLoopAlarmStart'].value.getMillis()/1000 ) ;\\nZonedDateTime zdt = instant.atZone(zone);\\nreturn DateTimeFormatter.ofPattern(\\\"dd/MM/yyyy\\\").format(zdt) ;\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"CLStartHours\",\"type\":\"string\",\"count\":0,\"scripted\":true,\"script\":\"ZoneId zone = ZoneId.of(\\\"Europe/Paris\\\");\\nInstant instant = Instant.ofEpochSecond(doc['closedLoopAlarmStart'].value.getMillis()/1000 ) ;\\nZonedDateTime zdt = instant.atZone(zone);\\nreturn DateTimeFormatter.ofPattern(\\\"dd/MM/yyyy-hh\\\").format(zdt) ;\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"CLStartMinutes\",\"type\":\"string\",\"count\":0,\"scripted\":true,\"script\":\"ZoneId zone = ZoneId.of(\\\"Europe/Paris\\\");\\nInstant instant = Instant.ofEpochSecond(doc['closedLoopAlarmStart'].value.getMillis()/1000 ) ;\\nZonedDateTime zdt = instant.atZone(zone);\\nreturn DateTimeFormatter.ofPattern(\\\"dd/MM/yyyy-hh:mm\\\").format(zdt) ;\",\"lang\":\"painless\",\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false}]", "fieldFormatMap": "{\"controlLoopID\":{\"id\":\"string\"},\"eventDuration\":{\"id\":\"duration\",\"params\":{\"inputFormat\":\"milliseconds\",\"outputFormat\":\"asMilliseconds\"}},\"CLStartday\":{\"id\":\"string\"},\"CLStartHours\":{\"id\":\"string\"},\"CLStartMinutes\":{\"id\":\"string\"}}", "timeFieldName": "closedLoopAlarmStart", "title": "events-cl-*"}, "version": 2, "type": "index-pattern", "id": "54038730-b7ae-11e8-8c46-97881a199baf", "updated_at": "2018-10-30T14:53:08.395Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/startup.sh b/src/main/docker/kibana/startup.sh
index 1ea475a..2232d52 100755
--- a/src/main/docker/kibana/startup.sh
+++ b/src/main/docker/kibana/startup.sh
@@ -23,11 +23,12 @@
###
KIBANA_CONF_FILE="/usr/share/kibana/config/kibana.yml"
SAVED_OBJECTS_ROOT="/saved-objects/"
-RESTORE_CMD="/usr/local/bin/restore.py -H https://127.0.0.1:5601/ -f"
+RESTORE_CMD="/usr/local/bin/restore.py -H https://localhost:5601/ -f"
BACKUP_BIN="/usr/local/bin/backup.py"
KIBANA_START_CMD="/usr/local/bin/kibana-docker"
LOG_FILE="/tmp/load.kibana.log"
-KIBANA_LOAD_CMD="/usr/local/bin/kibana-docker -H 127.0.0.1 -l $LOG_FILE"
+#KIBANA_LOAD_CMD="/usr/local/bin/kibana-docker -H 127.0.0.1 -l $LOG_FILE"
+KIBANA_LOAD_CMD="/usr/local/bin/kibana-docker -l $LOG_FILE"
TIMEOUT=60
WAIT_TIME=2
LOADED_FLAG=$SAVED_OBJECTS_ROOT/.loaded
@@ -66,6 +67,18 @@ then
tail -f $LOG_FILE &
LOG_PID=$!
+ # Wait for kibana to be listening !!!
+ RES_KIBANA=$(curl -k --write-out %{http_code} --silent --output /dev/null https://localhost:5601)
+ echo "KIBANA Site status is now: $RES_KIBANA"
+ while [[ "$RES_KIBANA" -ne 302 ]] && [ "$TIMEOUT" -gt "0" ];
+ do
+ echo "KIBANA Site status is still: $RES_KIBANA"
+ sleep $WAIT_TIME
+ let LOG_TIMEOUT=$LOG_TIMEOUT-$WAIT_TIME
+ RES_KIBANA=$(curl -k --write-out %{http_code} --silent --output /dev/null https://localhost:5601)
+ done
+ echo "KIBANA Site status is good(http code 302): $RES_KIBANA"
+
# Wait for kibana to be listening
while [ -z "$(grep "Server running at" $LOG_FILE)" ] && [ "$TIMEOUT" -gt "0" ];
do
@@ -73,7 +86,14 @@ then
sleep $WAIT_TIME
let TIMEOUT=$TIMEOUT-$WAIT_TIME
done
- sleep 1
+
+ while [ -z "$(grep "http server running" $LOG_FILE)" ] && [ "$TIMEOUT" -gt "0" ];
+ do
+ echo "Waiting for kibana http server to start..."
+ sleep $WAIT_TIME
+ let TIMEOUT=$TIMEOUT-$WAIT_TIME
+ done
+ sleep 4
# restore files
for saved_objects_path in $SAVED_OBJECTS_ROOT/*