summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorosgn422w <gervais-martial.ngueko@intl.att.com>2020-01-30 16:00:05 +0100
committerosgn422w <gervais-martial.ngueko@intl.att.com>2020-01-30 16:56:33 +0100
commit4abf1c966abcecfd42bcaaceeae6d2c197c69df3 (patch)
tree1ef3cd0c531faa9e47ab3373f6a83fc4539096a8
parent96078b6156c74da9c7810f2733d6c50f69711a62 (diff)
Dashboard initial commit
Initial commit of Dashboard based on Open Distro ES-kibana. Issue-ID: CLAMP-483 Change-Id: Ib4a3c686696dd77ba9012424f31389307c8bb720 Signed-off-by: osgn422w <gervais-martial.ngueko@intl.att.com>
-rw-r--r--.gitignore1
-rw-r--r--LICENSE.txt43
-rw-r--r--extra/docker/elk/.env2
-rw-r--r--extra/docker/elk/README.md90
-rw-r--r--extra/docker/elk/docker-compose.yml66
-rwxr-xr-xextra/docker/elk/tools/DMaaPServiceMocker/ds_mocker.py257
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/event_abated.json27
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/event_onset.json26
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/notification_active.json28
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/notification_final_failed.json42
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/notification_final_open.json28
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/notification_final_success.json40
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/notification_operation.json28
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/notification_operation_failure.json29
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/notification_operation_success.json29
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/notification_rejected_disabled.json29
-rw-r--r--extra/docker/elk/tools/DMaaPServiceMocker/notification_rejected_missing.json18
-rwxr-xr-xextra/docker/elk/tools/EsAutoQuery/autoQueryLoop.sh27
-rw-r--r--extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json34
-rw-r--r--extra/docker/elk/tools/EsAutoQuery/timeSince.json51
-rw-r--r--pom.xml297
-rw-r--r--src/main/docker/elasticsearch/Dockerfile26
-rw-r--r--src/main/docker/elasticsearch/bin/init_sg.sh7
-rw-r--r--src/main/docker/elasticsearch/config/ca-certs.pem32
-rw-r--r--src/main/docker/elasticsearch/config/clamp-key.pem32
-rw-r--r--src/main/docker/elasticsearch/config/clamp.pem32
-rw-r--r--src/main/docker/elasticsearch/config/elasticsearch.yml39
-rw-r--r--src/main/docker/kibana/Dockerfile58
-rw-r--r--src/main/docker/kibana/README.md0
-rwxr-xr-xsrc/main/docker/kibana/backup.py89
-rw-r--r--src/main/docker/kibana/conf/keystore/org.onap.clamp.crt.pem30
-rw-r--r--src/main/docker/kibana/conf/keystore/org.onap.clamp.key.pem32
-rw-r--r--src/main/docker/kibana/conf/kibana.yml18
-rwxr-xr-xsrc/main/docker/kibana/restore.py115
-rw-r--r--src/main/docker/kibana/saved-objects/default/config/config-6.6.2.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/dashboard/dashboard-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-04e06060-50bf-11e9-b3a3-7302725859d5.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/search/search-AWIk8yDIDjJ4k3sPXRbu.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/search/search-AWIk9P-qDjJ4k3sPXRcQ.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/search/search-AWIlAjTaDjJ4k3sPXRe1.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/search/search-AWJsTEvYr1AwiIiFoV6S.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/search/search-AWWh6CC3TSxbbr1lgyay.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/search/search-AWWh7d7sTSxbbr1lgyaz.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/search/search-AWWhVlbFTSxbbr1lgyap.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/search/search-AWXPmsmxr9U94x7rrLgV.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/visualization/visualization-0ef409f0-38f8-11e9-beac-8d2beda26615.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/visualization/visualization-2d36b0e0-38f6-11e9-beac-8d2beda26615.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/visualization/visualization-9a1a6750-38f7-11e9-beac-8d2beda26615.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/visualization/visualization-a9d9d120-38f8-11e9-beac-8d2beda26615.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/visualization/visualization-ae8c22b0-3905-11e9-beac-8d2beda26615.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/visualization/visualization-e1f0fa00-38f5-11e9-beac-8d2beda26615.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/visualization/visualization-f724dfd0-38f6-11e9-beac-8d2beda26615.json1
-rw-r--r--src/main/docker/kibana/saved-objects/default/visualization/visualization-fcc9a8b0-38f8-11e9-beac-8d2beda26615.json1
-rwxr-xr-xsrc/main/docker/kibana/startup.sh106
-rw-r--r--src/main/docker/logstash/Dockerfile36
-rw-r--r--src/main/docker/logstash/certs/aafca.pem26
-rw-r--r--src/main/docker/logstash/pipeline/logstash.conf269
-rw-r--r--version.properties36
58 files changed, 2194 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/bin/
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..caec228
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,43 @@
+/*
+* ============LICENSE_START==========================================
+* ===================================================================
+* Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
+* ===================================================================
+*
+* Unless otherwise specified, all software contained herein is licensed
+* under the Apache License, Version 2.0 (the “License”);
+* you may not use this software except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*
+* Unless otherwise specified, all documentation contained herein is licensed
+* under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+* you may not use this documentation except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* https://creativecommons.org/licenses/by/4.0/
+*
+* Unless required by applicable law or agreed to in writing, documentation
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* ============LICENSE_END============================================
+*
+* For the file
+* /src/main/resources/META-INF/resources/designer/lib/angular-sanitize.js,
+* to the extent that it contains code originating from Erik Arvidsson,
+* that code is used under the Apache-2.0 license,
+* as permitted by http://erik.eae.net/simplehtmlparser/simplehtmlparser.js.
+*
+*/
diff --git a/extra/docker/elk/.env b/extra/docker/elk/.env
new file mode 100644
index 0000000..79d7943
--- /dev/null
+++ b/extra/docker/elk/.env
@@ -0,0 +1,2 @@
+# docker compose related
+COMPOSE_PROJECT_NAME=clamp_elk
diff --git a/extra/docker/elk/README.md b/extra/docker/elk/README.md
new file mode 100644
index 0000000..b2b6fe3
--- /dev/null
+++ b/extra/docker/elk/README.md
@@ -0,0 +1,90 @@
+CLAMP Dashboard
+===============
+
+ELK stack for CLAMP : Logstash is used to retrieve events and notifications from DMaaP and pushes them into Elasticsearch.
+Kibana is then used to extract statistics.
+
+
+Deployment instructions
+-----------------------
+
+Requirements: docker-compose
+
+1. Update configuration in docker-compose file
+2. `docker-compose up -d elasticsearch logstash kibana`
+
+If you encounter connection problems with kibana, first deploy elasticsearch, wait for it to be available, then kibana.
+
+Backup/restore
+--------------
+
+backup.py and restore.py scripts are available inside the kibana docker image for saving and restoring the configuration.
+the default configuration is located in the kibana docker image under the directory "/saved-objects/default/"
+
+### backup.py
+```
+firts create the directory "/saved-objects/mybackup" if it doesn't exist
+docker-compose exec kibana backup.py -C /saved-objects/mybackup
+```
+```
+usage: backup.py [-h] [-v] [-C CONFIGURATION_PATH] [-f] [-H KIBANA_HOST]
+
+Description of the script
+
+optional arguments:
+ -h, --help show this help message and exit
+ -v, --verbose Use verbose logging
+ -C CONFIGURATION_PATH, --configuration_path CONFIGURATION_PATH
+ Path of the configuration to be backed up.
+ -f, --force If the save folder already exists, overwrite files
+ matching a configuration item that should be written.
+ Files already in the folder that do not match are left
+ as-is.
+ -H KIBANA_HOST, --kibana-host KIBANA_HOST
+ Kibana endpoint.
+
+```
+
+### restore.py
+```
+to restore the configuration, you previously backed up, use the command below:
+docker-compose exec kibana restore.py -C /saved-objects/mybackup -f
+to restore the default confgiuration use the command below:
+docker-compose exec kibana restore.py -C /saved-objects/default -f
+```
+```
+usage: restore.py [-h] [-v] [-C CONFIGURATION_PATH] [-H KIBANA_HOST] [-f]
+
+Restores the kibana configuration.
+
+optional arguments:
+ -h, --help show this help message and exit
+ -v, --verbose Use verbose logging
+ -C CONFIGURATION_PATH, --configuration_path CONFIGURATION_PATH
+ Path of the configuration to be restored.Should
+ contain at least one folder named index-
+ pattern,config,search,visualization or dashboard
+ -H KIBANA_HOST, --kibana-host KIBANA_HOST
+ Kibana endpoint.
+ -f, --force Overwrite configuration if needed.
+```
+
+Tools
+-----
+
+The following tools are available in the 'tools/' folder.
+
+
+### EsAutoQuery
+
+Small script ease Elasticsearch /painless/ field development.
+It reads a json file as a query for Elasticsearch, pushes it on the ES server, and display back the answer in a loop, each time the file is modified.
+
+
+### DMaaP Service Mocker
+
+Script that simulates control loop DMaaP services to provide sample data to logstash through DMaaP.
+
+TODO
+----
+* Add a script that verifies that elasticsearch is available before starting loading the default configuration for kibana
diff --git a/extra/docker/elk/docker-compose.yml b/extra/docker/elk/docker-compose.yml
new file mode 100644
index 0000000..fe7fa06
--- /dev/null
+++ b/extra/docker/elk/docker-compose.yml
@@ -0,0 +1,66 @@
+version: '3.1'
+
+services:
+ elasticsearch:
+ image: onap/clamp-dashboard-elasticsearch:latest
+ volumes:
+ - ../../../src/main/docker/elasticsearch/config/ca-certs.pem:/usr/share/elasticsearch/config/root-ca.pem
+ - ../../../src/main/docker/elasticsearch/config/clamp.pem:/usr/share/elasticsearch/config/esnode.pem
+ - ../../../src/main/docker/elasticsearch/config/clamp-key.pem:/usr/share/elasticsearch/config/esnode-key.pem
+ - ../../../src/main/docker/elasticsearch/config/clamp.pem:/usr/share/elasticsearch/config/kirk.pem
+ - ../../../src/main/docker/elasticsearch/config/clamp-key.pem:/usr/share/elasticsearch/config/kirk-key.pem
+ - ../../../src/main/docker/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
+ ports:
+ - 9200:9200
+ networks:
+ es_net:
+ aliases:
+ - elasticsearch
+ environment:
+ - cluster.name=docker-cluster
+ - bootstrap.memory_lock=false
+ - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
+
+ logstash:
+ image: onap/clamp-dashboard-logstash:latest
+ build:
+ context: ../../../src/main/docker/logstash
+ dockerfile: Dockerfile.logstash
+ volumes:
+ - ../../../src/main/docker/logstash/pipeline:/usr/share/logstash/pipeline
+ - ./logstash-input:/log-input
+ depends_on:
+ - elasticsearch
+ networks:
+ es_net:
+ environment:
+ - dmaap_base_url=http://dmaapmocker:3904/
+ - dmaap_user=user
+ - dmaap_password=password
+ - dmaap_consumer_group=clampdashboard
+ - dmaap_consumer_id=clampdashboard
+ - event_topic=DCAE-CL-EVENT
+ - notification_topic=POLICY-CL-MGT
+ - request_topic=APPC-CL
+ - elasticsearch_base_url=elasticsearch
+ - "LOGSTASH_USR=logstash"
+ - "LOGSTASH_PWD=logstash"
+
+ kibana:
+ image: onap/clamp-dashboard-kibana:latest
+ build:
+ context: ../../../src/main/docker/kibana
+ dockerfile: Dockerfile.kibana
+ ports:
+ - 5601:5601
+ depends_on:
+ - elasticsearch
+ volumes:
+ - ../../../src/main/docker/kibana/saved-objects/:/saved-objects/
+ - ../../../src/main/docker/kibana/conf/kibana.yml:/usr/share/kibana/config/kibana.yml
+ - ../../../src/main/docker/kibana/conf/keystore:/usr/share/kibana/config/keystore
+ networks:
+ es_net:
+
+networks:
+ es_net:
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/ds_mocker.py b/extra/docker/elk/tools/DMaaPServiceMocker/ds_mocker.py
new file mode 100755
index 0000000..bd6caec
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/ds_mocker.py
@@ -0,0 +1,257 @@
+#!/usr/bin/env python3
+import os
+import json
+import copy
+import random
+import requests
+import uuid
+import time
+from datetime import datetime
+
+def luck(n=2):
+ """ gives 1 chance out of n (default: 2) to return True """
+ assert n > 1
+ return bool(random.randint(0, n-1))
+def now_dmaap_timestamp():
+ return str(datetime.now().timestamp()).replace(".","")[:13]
+def now_notification_time():
+ return datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f+00:00")
+
+CONTROL_LOOP_NAMES = [
+ 'CL-vCPE-d925ed73',
+ 'CL-vCPE-37b1c91e',
+ 'CL-vCPE-c2597657',
+ 'CL-vCPE-a11318ba',
+ 'CL-vCPE-5321c558',
+]
+
+TEMPLATES = {
+ 'event_abated' :'event_abated.json',
+ 'event_onset' :'event_onset.json',
+ 'notification_active' :'notification_active.json',
+ 'notification_final_failed' :'notification_final_failed.json',
+ 'notification_final_open' :'notification_final_open.json',
+ 'notification_final_success' :'notification_final_success.json',
+ 'notification_operation_failure' :'notification_operation_failure.json',
+ 'notification_operation' :'notification_operation.json',
+ 'notification_operation_success' :'notification_operation_success.json',
+ 'notification_rejected_disabled' :'notification_rejected_disabled.json',
+ 'notification_rejected_missing' :'notification_rejected_missing.json',
+}
+
+ERROR_MESSAGES = [
+ ('APPC', 'APPC1 : timeout on restart','RESTART'),
+ ('APPC', 'APPC2 : cannot restart','RESTART'),
+ ('SO', 'SO1 : scale up failed', 'SCALEUP'),
+ ('SO', 'SO2 : scale down failed', 'SCALEDOWN'),
+]
+
+for key in TEMPLATES:
+ with open(TEMPLATES[key]) as f:
+ content = f.read()
+ TEMPLATES[key] = json.loads(content)
+
+
+class DMaaPMessage(dict):
+
+ dmaap_host_url = "http://dmaap.host.url:9200/"
+ dmaap_username = None
+ dmaap_password = None
+
+ @classmethod
+ def from_template(cls, tmpl, **kwargs):
+ obj = cls()
+ obj.update(copy.deepcopy(TEMPLATES[tmpl]))
+ for keys,value in kwargs.items():
+ current_node = obj
+ keys = keys.split(".")
+ key = keys[0]
+ for i in range(len(keys) - 1):
+ current_node = current_node[keys[i]]
+ key = keys[i]
+ current_node[key] = value
+ return obj
+
+ def publish(self, topic):
+ url = "%s/events/%s" % (self.dmaap_host_url, topic)
+ auth = None
+ if self.dmaap_username and self.dmaap_password:
+ auth = (self.dmaap_username, self.dmaap_password)
+ response = requests.post(url, data=json.dumps(self), auth=auth)
+ return response.status_code
+
+class Event(DMaaPMessage):
+
+ topic = "DCAE-CL-EVENT"
+
+ @staticmethod
+ def abated(**kwargs):
+ return Event.from_template('event_abated', **kwargs)
+
+ @staticmethod
+ def onset(**kwargs):
+ return Event.from_template('event_onset', **kwargs)
+
+ def publish(self):
+ return super().publish(self.topic)
+
+
+class Notification(DMaaPMessage):
+
+ topic = "POLICY-CL-MGT"
+
+ @classmethod
+ def from_template(cls, tmpl, **kwargs):
+ kwargs['notificationTime'] = now_notification_time()
+ return super().from_template(tmpl, **kwargs)
+
+ @staticmethod
+ def active(**kwargs):
+ return Notification.from_template('notification_active', **kwargs)
+
+ @staticmethod
+ def final(**kwargs):
+ class FinalNotification(Notification):
+ @staticmethod
+ def success(**kwargs):
+ return FinalNotification.from_template('notification_final_success', **kwargs)
+ @staticmethod
+ def failed(**kwargs):
+ msg = FinalNotification.from_template('notification_final_failed', **kwargs)
+ error = ERROR_MESSAGES[random.randint(0, len(ERROR_MESSAGES) - 1)]
+ h = msg['history'][-1]
+ h['actor'],h['message'],h['operation'] = error[0],error[1],error[2]
+ return msg
+ @staticmethod
+ def open(**kwargs):
+ return FinalNotification.from_template('notification_final_open', **kwargs)
+ return FinalNotification
+
+ @staticmethod
+ def operation(**kwargs):
+ class OperationNotification(Notification):
+ @staticmethod
+ def success(**kwargs):
+ return OperationNotification.from_template('notification_operation_success', **kwargs)
+ @staticmethod
+ def failure(**kwargs):
+ return OperationNotification.from_template('notification_operation_failure', **kwargs)
+ return OperationNotification.from_template('notification_operation', **kwargs)
+
+ @staticmethod
+ def rejected(**kwargs):
+ class RejectedNotification(Notification):
+ @staticmethod
+ def disabled(**kwargs):
+ return RejectedNotification.from_template('notification_rejected_disabled', **kwargs)
+ @staticmethod
+ def missing_fields(**kwargs):
+ return RejectedNotification.from_template('notification_rejected_missing', **kwargs)
+
+ return RejectedNotification
+
+ def publish(self):
+ return super().publish(self.topic)
+
+
+
+class CLStatus(object):
+
+ def __init__(self, dmaap_url=None,
+ missing=None, disabled=None, op_failure=None):
+ self._stopped = False
+ def maybe(thing, ):
+ if thing is None:
+ thing = not luck(10)
+ return thing
+ self._missing = maybe(missing)
+ self._disabled = maybe(disabled)
+ self._op_failure = maybe(op_failure)
+ self._config = dict(
+ requestID=str(uuid.uuid4()),
+ closedLoopControlName=CONTROL_LOOP_NAMES[random.randint(0, len(CONTROL_LOOP_NAMES) - 1)]
+ )
+
+ def __iter__(self):
+ return next(self)
+
+ def __next__(self):
+ if self._stopped:
+ raise StopIteration()
+ config = self._config
+ config.update(dict(closedLoopAlarmStart=now_dmaap_timestamp()))
+ yield Event.onset(**config)
+ if self._missing:
+ self._stopped = True
+ yield Notification.rejected().missing_fields(**config)
+ raise StopIteration()
+ elif self._disabled:
+ self._stopped = True
+ yield Notification.rejected().disabled(**config)
+ raise StopIteration()
+
+ yield Notification.active(**config)
+ yield Notification.operation(**config)
+
+ config['closedLoopAlarmEnd'] = now_dmaap_timestamp()
+ if self._op_failure:
+ yield Notification.operation().failure(**config)
+ self._stopped = True
+ yield Notification.final().failed(**config)
+ else:
+ yield Notification.operation().success(**config)
+ yield Event.abated(**config)
+ self._stopped = True
+ yield Notification.final().success(**config)
+ raise StopIteration()
+
+def print_usage():
+ print("""
+ ./ds_mocker.py <DMAAP_URL> <EVENT_TOPIC> [NOTIFICATION_TOPIC [REQUEST_TOPIC]]
+ """)
+ exit()
+
+def push(test_datas):
+ for current_i, status in enumerate(test_datas):
+ time.sleep(random.randint(0,3))
+ for s in status:
+ # print(s)
+ status_code = s.publish()
+ if status_code != 200:
+ print("Error when publishing : status_code={}".format(status_code))
+ exit(1)
+ time.sleep(random.randint(0,3))
+ print("%03d,missing:%5s,disabled:%5s,op_failure:%5s - %s" % (current_i, status._missing, status._disabled, status._op_failure, status._config))
+
+
+
+def generate_dataset_1():
+ test_datas = [CLStatus(missing=False, disabled=False, op_failure=False) for i in range(300)] \
+ + [CLStatus(missing=True, disabled=False, op_failure=False) for i in range(5)] \
+ + [CLStatus(missing=False, disabled=True, op_failure=False) for i in range(6)] \
+ + [CLStatus(missing=False, disabled=False, op_failure=True) for i in range(12)]
+ random.shuffle(test_datas)
+ return test_datas
+
+def generate_error_dataset_1():
+ test_datas = [CLStatus(missing=False, disabled=False, op_failure=True) for i in range(60)]
+ random.shuffle(test_datas)
+ return test_datas
+
+
+DATASETS = {
+ 'dataset_1': generate_dataset_1,
+ 'op_failure_1': generate_error_dataset_1,
+}
+
+if __name__ == "__main__":
+ import sys
+ if len(sys.argv) < 3:
+ print_usage()
+
+ DMaaPMessage.dmaap_host_url = sys.argv[1]
+ Event.topic = sys.argv[2]
+ Notification.topic = len(sys.argv) > 3 and sys.argv[3] or sys.argv[2]
+ # Request.topic = len(sys.argv) > 4 or Notification.topic
+ #push(DATASETS['op_failure_1']())
+ push(DATASETS['dataset_1']())
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/event_abated.json b/extra/docker/elk/tools/DMaaPServiceMocker/event_abated.json
new file mode 100644
index 0000000..ae0d4b7
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/event_abated.json
@@ -0,0 +1,27 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "closedLoopAlarmEnd": 1478710227625,
+ "closedLoopAlarmStart": 1478709727496,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "closedLoopEventStatus": "ABATED",
+ "from": "DCAE",
+ "policyName": "vFirewall",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/event_onset.json b/extra/docker/elk/tools/DMaaPServiceMocker/event_onset.json
new file mode 100644
index 0000000..223f096
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/event_onset.json
@@ -0,0 +1,26 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "closedLoopAlarmStart": 1478709385444,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "closedLoopEventStatus": "ONSET",
+ "from": "DCAE",
+ "policyName": "vFirewall",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "88e951ad-a07c-4748-9cef-34f32851a527",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/notification_active.json b/extra/docker/elk/tools/DMaaPServiceMocker/notification_active.json
new file mode 100644
index 0000000..341a249
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/notification_active.json
@@ -0,0 +1,28 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "OPS_CL_timer": 600,
+ "closedLoopAlarmStart": 1478709989621,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "from": "Policy",
+ "notification": "ACTIVE",
+ "notificationTime": "2016-11-09 16:46:29.721000+00:00",
+ "policyName": "ClosedLoop.vUSP",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/notification_final_failed.json b/extra/docker/elk/tools/DMaaPServiceMocker/notification_final_failed.json
new file mode 100644
index 0000000..4891c7e
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/notification_final_failed.json
@@ -0,0 +1,42 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "OPS_CL_timer": 600,
+ "closedLoopAlarmEnd": 1478710489739,
+ "closedLoopAlarmStart": 1478709989621,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "from": "Policy",
+ "history": [
+ {
+ "actor": "APPC",
+ "end": 1478637014434,
+ "message": "<APPC ERROR code/description>",
+ "operation": "RESTART",
+ "outcome": "FAILED",
+ "start": 1478637014430,
+ "subRequestId": "1",
+ "target": "vserver.vserver-name"
+ }
+ ],
+ "message": "actor=APPC,operation=RESTART,target=vserver.vserver-name,subRequestId=1,outcome=FAILED",
+ "notification": "FINAL: FAILURE",
+ "notificationTime": "2016-11-08 15:30:14.434000-05:00",
+ "policyName": "ClosedLoop.vUSP",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/notification_final_open.json b/extra/docker/elk/tools/DMaaPServiceMocker/notification_final_open.json
new file mode 100644
index 0000000..da9e6e1
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/notification_final_open.json
@@ -0,0 +1,28 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "closedLoopAlarmEnd": 1478710489739,
+ "closedLoopAlarmStart": 1478709989621,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "from": "Policy",
+ "notification": "FINAL: OPEN",
+ "notificationTime": "2016-11-08 15:30:14.434000-05:00",
+ "policyName": "ClosedLoop.vUSP",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/notification_final_success.json b/extra/docker/elk/tools/DMaaPServiceMocker/notification_final_success.json
new file mode 100644
index 0000000..3d027eb
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/notification_final_success.json
@@ -0,0 +1,40 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "OPS_CL_timer": 600,
+ "closedLoopAlarmEnd": 1478710489739,
+ "closedLoopAlarmStart": 1478709989621,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "from": "Policy",
+ "history": [
+ {
+ "actor": "APPC",
+ "end": 1478709989738,
+ "operation": "RESTART",
+ "start": 1478709989734,
+ "subRequestId": "1",
+ "target": "vserver.vserver-name"
+ }
+ ],
+ "message": "actor=APPC,operation=RESTART,target=vserver.vserver-name,subRequestId=1",
+ "notification": "FINAL: SUCCESS",
+ "notificationTime": "2016-11-09 11:46:29.738000-05:00",
+ "policyName": "ClosedLoop.vUSP",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/notification_operation.json b/extra/docker/elk/tools/DMaaPServiceMocker/notification_operation.json
new file mode 100644
index 0000000..341a249
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/notification_operation.json
@@ -0,0 +1,28 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "OPS_CL_timer": 600,
+ "closedLoopAlarmStart": 1478709989621,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "from": "Policy",
+ "notification": "ACTIVE",
+ "notificationTime": "2016-11-09 16:46:29.721000+00:00",
+ "policyName": "ClosedLoop.vUSP",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/notification_operation_failure.json b/extra/docker/elk/tools/DMaaPServiceMocker/notification_operation_failure.json
new file mode 100644
index 0000000..5dbe33c
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/notification_operation_failure.json
@@ -0,0 +1,29 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "OPS_CL_timer": 600,
+ "closedLoopAlarmStart": 1478709989621,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "from": "Policy",
+ "message": "<APPC ERROR code and/or message>",
+ "notification": "OPERATION: FAILURE",
+ "notificationTime": "2016-11-08 15:30:14.434000-05:00",
+ "policyName": "ClosedLoop.vUSP",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/notification_operation_success.json b/extra/docker/elk/tools/DMaaPServiceMocker/notification_operation_success.json
new file mode 100644
index 0000000..9e18b97
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/notification_operation_success.json
@@ -0,0 +1,29 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "OPS_CL_timer": 600,
+ "closedLoopAlarmStart": 1478709989621,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "from": "Policy",
+ "message": "actor=APPC,operation=RESTART,target=vserver.vserver-name,subRequestId=1",
+ "notification": "OPERATION: SUCCESS",
+ "notificationTime": "2016-11-09 11:46:29.738000-05:00",
+ "policyName": "ClosedLoop.vUSP",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/notification_rejected_disabled.json b/extra/docker/elk/tools/DMaaPServiceMocker/notification_rejected_disabled.json
new file mode 100644
index 0000000..3d94987
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/notification_rejected_disabled.json
@@ -0,0 +1,29 @@
+{
+ "AAI": {
+ "cloud-region.identity-url": "http://1.2.3.4:5000/v2.0",
+ "complex.physical-location-id": "SNYSCA12",
+ "generic-vnf.service-id": "eb477a13-f380-401e-b2bd-f2d444c63e54",
+ "generic-vnf.vnf-name": "gupi1337p",
+ "tenant.tenant-id": "8f7b9a8a-8607-4a01-a5ef-0b26f569dcbb",
+ "vserver.is-closed-loop-disabled": "true",
+ "vserver.prov-status": "PROV",
+ "vserver.vserver-selflink": "https//2.3.4.5:1234/d5a992de-8a70-4d7d-b382-2bc6eea52317",
+ "vserver.vserver-id": "08f6c1f9-99e7-49f3-a662-c62b9f200d79",
+ "vserver.vserver-name": "gupi1337pm004"
+ },
+ "OPS_CL_timer": 600,
+ "closedLoopAlarmStart": 1478709989621,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "from": "Policy",
+ "message": "Closed Loop Disabled",
+ "notification": "REJECTED",
+ "notificationTime": "2016-05-11 15:09:23.896000+00:00",
+ "policyName": "ClosedLoop.vUSP",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/DMaaPServiceMocker/notification_rejected_missing.json b/extra/docker/elk/tools/DMaaPServiceMocker/notification_rejected_missing.json
new file mode 100644
index 0000000..c901401
--- /dev/null
+++ b/extra/docker/elk/tools/DMaaPServiceMocker/notification_rejected_missing.json
@@ -0,0 +1,18 @@
+{
+ "AAI": {},
+ "OPS_CL_timer": 600,
+ "closedLoopAlarmStart": 1478709989621,
+ "closedLoopControlName": "ClosedLoop-3ffd062d-7589-43b2-865a-139b64e2d402",
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "from": "Policy",
+ "message": "Missing AAI tag",
+ "notification": "REJECTED",
+ "notificationTime": "2016-05-11 14:42:23.629000+00:00",
+ "policyName": "ClosedLoop.vUSP",
+ "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
+ "policyVersion": "v0.0.1",
+ "requestID": "f889f60c-a715-48c0-801e-26428f6176b9",
+ "target": "vserver.vserver-name",
+ "target_type": "VM",
+ "version": "1.0.2"
+}
diff --git a/extra/docker/elk/tools/EsAutoQuery/autoQueryLoop.sh b/extra/docker/elk/tools/EsAutoQuery/autoQueryLoop.sh
new file mode 100755
index 0000000..4929412
--- /dev/null
+++ b/extra/docker/elk/tools/EsAutoQuery/autoQueryLoop.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+QUERY_FILE=${1:-query.json}
+INDEX=${2:-logstash-*}
+HOST_URL=${3:-http://localhost:9200}
+URL=$HOST_URL/$INDEX/_search
+
+function usage() {
+ echo "Usage: $0 [QUERY_FILE [INDEX [HOST_URL]]]"
+ echo
+ echo "This script automatically sends the query file to elasticsearch"
+ echo "each time it's modified."
+}
+
+if [ "${1}" == "--help" ];
+then
+ usage
+ exit 0
+fi
+
+echo "Querying '$URL' with '$QUERY_FILE'"
+while [ 1 ];
+do
+ curl -XGET "$URL" -H 'Content-Type: application/json' -d"@$QUERY_FILE" | js-beautify
+ echo
+ inotifywait -e modify query.json
+done
diff --git a/extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json b/extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json
new file mode 100644
index 0000000..5a29545
--- /dev/null
+++ b/extra/docker/elk/tools/EsAutoQuery/closedLoopAlarmDuration.json
@@ -0,0 +1,34 @@
+{
+ "query" : {
+ "bool": {
+ "must": [
+ { "match": { "closedLoopEventStatus": "ABATED" } }
+ ]
+ }
+ },
+ "script_fields" : {
+ "closedLoopAlarmDuration" : {
+ "script" : {
+ "lang": "painless",
+ "source": "
+if (doc.get('closedLoopEventStatus.keyword').value == 'ABATED') {
+ return doc.get('closedLoopAlarmEnd').value - doc.get('closedLoopAlarmStart').value;
+}
+return null
+"
+ }
+ }
+ , "closedLoopAlarmStart" : {
+ "script" : {
+ "lang": "painless",
+ "source": "doc['closedLoopAlarmStart']"
+ }
+ }
+ , "closedLoopAlarmEnd" : {
+ "script" : {
+ "lang": "painless",
+ "source": "doc['closedLoopAlarmEnd']"
+ }
+ }
+ }
+}
diff --git a/extra/docker/elk/tools/EsAutoQuery/timeSince.json b/extra/docker/elk/tools/EsAutoQuery/timeSince.json
new file mode 100644
index 0000000..6ee1493
--- /dev/null
+++ b/extra/docker/elk/tools/EsAutoQuery/timeSince.json
@@ -0,0 +1,51 @@
+{
+ "query" : {
+ "match_all": {}
+ },
+ "script_fields" : {
+ "timeSince" : {
+ "script" : {
+ "lang": "painless",
+ "source": "
+long now = System.currentTimeMillis();
+if (doc.get('closedLoopEventStatus.keyword').value == 'ABATED') {
+ return now - doc.get('closedLoopAlarmEnd').value;
+}
+if (doc.get('closedLoopEventStatus.keyword').value == 'ONSET') {
+ return now - doc.get('closedLoopAlarmStart').value;
+}
+if (doc.containsKey('notification.keyword')) {
+ return now - doc.get('notificationTime').value;
+}
+
+return null
+"
+ }
+ }
+ , "closedLoopAlarmStart" : {
+ "script" : {
+ "lang": "painless",
+ "source": "doc['closedLoopAlarmStart']"
+ }
+ }
+ , "closedLoopEventStatus" : {
+ "script" : {
+ "lang": "painless",
+ "source": "doc['closedLoopEventStatus.keyword']"
+ }
+ }
+ , "notification" : {
+ "script" : {
+ "lang": "painless",
+ "source": "doc['notification.keyword']"
+ }
+ }
+ , "notificationTime" : {
+ "script" : {
+ "lang": "painless",
+ "source": "doc['notificationTime'].value"
+ }
+ }
+
+ }
+}
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..c4fc2d4
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP CLAMP
+ ================================================================================
+ Copyright (C) 2017-2020 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END============================================
+ ===================================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.onap.clamp</groupId>
+ <artifactId>clds</artifactId>
+ <version>4.2.0-SNAPSHOT</version>
+ <name>clamp</name>
+
+
+ <parent>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>oparent</artifactId>
+ <version>2.1.0</version>
+ </parent>
+
+ <description>
+ This is the MAVEN project that builds the Control Loop dashboard for ONAP CLAMP.
+ Docker engine is normally requires to perfom all possible tasks (including integration tests)
+
+ It can build:
+ - The DOCKER images for:
+ * The dashboard - Elastic search
+ * The dashboard - Logstash
+ * The dashboard - Kibana
+
+ Useful mvn commands:
+ - mvn clean install -DskipTests -P docker: Build Clamp backend JAR + all docker images
+
+ To start CLAMP (Build it before):
+ - Use docker-compose file in ./extra/docker/clamp/docker-compose.yml
+
+ </description>
+
+ <properties>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+ <clamp.project.version>${project.version}</clamp.project.version>
+ <clamp.build.timestamp>${maven.build.timestamp}</clamp.build.timestamp>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+ <docker.push.registry>localhost:5000</docker.push.registry>
+ <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
+ <docker.skip.build>true</docker.skip.build>
+ <docker.skip.push>true</docker.skip.push>
+ <docker.skip.tag>true</docker.skip.tag>
+ <skip.staging.artifacts>false</skip.staging.artifacts>
+ <python.http.proxy.param />
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <properties>
+ <skip.staging.artifacts>true</skip.staging.artifacts>
+ <docker.skip.build>false</docker.skip.build>
+ <docker.skip.tag>false</docker.skip.tag>
+ <docker.skip.push>false</docker.skip.push>
+ <docker.skip>false</docker.skip>
+ </properties>
+ </profile>
+ </profiles>
+
+ <distributionManagement>
+ <repository>
+ <id>ecomp-releases</id>
+ <name>Clamp Release Repository</name>
+ <url>https://nexus.onap.org/content/repositories/releases/</url>
+ </repository>
+ <snapshotRepository>
+ <id>ecomp-snapshots</id>
+ <name>Clamp Snapshot Repository</name>
+ <url>https://nexus.onap.org/content/repositories/snapshots/</url>
+ </snapshotRepository>
+ <site>
+ <id>ecomp-site</id>
+ <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
+ </site>
+ </distributionManagement>
+
+ <repositories>
+ <repository>
+ <id>onap-public</id>
+ <name>onap-public</name>
+ <url>https://nexus.onap.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>ecomp-releases</id>
+ <name>ONAP Release Repository</name>
+ <url>https://nexus.onap.org/content/repositories/releases/</url>
+ </repository>
+ <repository>
+ <id>ecomp-staging</id>
+ <name>ONAP Staging Repository</name>
+ <url>https://nexus.onap.org/content/repositories/staging/</url>
+ </repository>
+ <repository>
+ <id>ecomp-snapshots</id>
+ <name>ONAP Snapshot Repository</name>
+ <url>https://nexus.onap.org/content/repositories/snapshots/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>central</id>
+ <url>http://repo1.maven.org/maven2/</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>onap-public</id>
+ <name>onap-public</name>
+ <url>https://nexus.onap.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>central</id>
+ <url>http://repo1.maven.org/maven2/</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <dependencyManagement>
+
+ </dependencyManagement>
+
+ <dependencies>
+
+ </dependencies>
+
+ <build>
+ <finalName>clamp-cl-dashboard</finalName>
+
+ <resources>
+
+ </resources>
+
+ <plugins>
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.31.0</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.5.5</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <verbose>true</verbose>
+ <apiVersion>1.35</apiVersion>
+ <images>
+
+ <image>
+ <name>onap/clamp-dashboard-logstash</name>
+ <alias>onap-clamp-dashboard-logstash</alias>
+ <run>
+ <skip>true</skip>
+ </run>
+ <build>
+ <cleanup>true</cleanup>
+ <tags>
+ <tag>latest</tag>
+ <tag>${project.docker.latesttagtimestamp.version}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
+ </tags>
+ <!-- A relative path is looked up in ${project.basedir}/src/main/docker
+ by default -->
+ <dockerFile>logstash/Dockerfile</dockerFile>
+ </build>
+ </image>
+ <image>
+ <name>onap/clamp-dashboard-elasticsearch</name>
+ <alias>onap-clamp-dashboard-elasticsearch</alias>
+ <run>
+ <skip>true</skip>
+ </run>
+ <build>
+ <cleanup>true</cleanup>
+ <tags>
+ <tag>latest</tag>
+ <tag>${project.docker.latesttagtimestamp.version}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
+ </tags>
+ <!-- A relative path is looked up in ${project.basedir}/src/main/docker
+ by default -->
+ <dockerFile>elasticsearch/Dockerfile</dockerFile>
+ </build>
+ </image>
+ <image>
+ <name>onap/clamp-dashboard-kibana</name>
+ <alias>onap-clamp-dashboard-kibana</alias>
+ <run>
+ <skip>true</skip>
+ </run>
+ <build>
+ <cleanup>true</cleanup>
+ <tags>
+ <tag>latest</tag>
+ <tag>${project.docker.latesttagtimestamp.version}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
+ </tags>
+ <!-- A relative path is looked up in ${project.basedir}/src/main/docker
+ by default -->
+ <dockerFile>kibana/Dockerfile</dockerFile>
+ </build>
+ </image>
+ </images>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>generate-images</id>
+ <phase>install</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>docker-start-for-it</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>docker-stop-for-it</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ <configuration>
+ <source>11</source>
+ <target>11</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.sonarsource.scanner.maven</groupId>
+ <artifactId>sonar-maven-plugin</artifactId>
+ <version>3.7.0.1746</version>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/src/main/docker/elasticsearch/Dockerfile b/src/main/docker/elasticsearch/Dockerfile
new file mode 100644
index 0000000..bc2dd74
--- /dev/null
+++ b/src/main/docker/elasticsearch/Dockerfile
@@ -0,0 +1,26 @@
+<!--
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+-->
+
+FROM amazon/opendistro-for-elasticsearch:1.3.0
diff --git a/src/main/docker/elasticsearch/bin/init_sg.sh b/src/main/docker/elasticsearch/bin/init_sg.sh
new file mode 100644
index 0000000..1c4e607
--- /dev/null
+++ b/src/main/docker/elasticsearch/bin/init_sg.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+plugins/search-guard-6/tools/sgadmin.sh \
+ -cd config/sg/ \
+ -ts config/sg/truststore.jks \
+ -ks config/sg/kirk-keystore.jks \
+ -nhnv \
+ -icl \ No newline at end of file
diff --git a/src/main/docker/elasticsearch/config/ca-certs.pem b/src/main/docker/elasticsearch/config/ca-certs.pem
new file mode 100644
index 0000000..70bb844
--- /dev/null
+++ b/src/main/docker/elasticsearch/config/ca-certs.pem
@@ -0,0 +1,32 @@
+Bag Attributes
+ friendlyName: CN=intermediateCA_9,OU=OSAAF,O=ONAP,C=US
+subject=C = US, O = ONAP, OU = OSAAF, CN = intermediateCA_9
+
+issuer=OU = OSAAF, O = ONAP, C = US
+
+-----BEGIN CERTIFICATE-----
+MIIEdTCCAl2gAwIBAgIBBzANBgkqhkiG9w0BAQsFADAsMQ4wDAYDVQQLDAVPU0FB
+RjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMwHhcNMTgwODE3MTg1MTM3WhcN
+MjMwODE3MTg1MTM3WjBHMQswCQYDVQQGEwJVUzENMAsGA1UECgwET05BUDEOMAwG
+A1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVkaWF0ZUNBXzkwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCv0HHUkba3uNtNI3jPKimUcd6RNwmhSCJL
+neMWpnjqp5/A+HCKyNsEaT4y177hNLmCm/aMm1u2JIfikc+8wEqLCSBBPz+P0h+d
+o+sZ7U+4oeQizdYYpEdzHJ2SieHHa8vtu80rU3nO2NEIkuYC20HcKSEtl8fFKsk3
+nqlhY+tGfYJPTXcDOQAO40BTcgat3C3uIJHkWJJ4RivunE4LEuRv9QyKgAw7rkJV
+v+f7guqpZlXy6dzAkuU7XULWcgo55MkZlssoiErMvEZJad5aWKvRY3g7qUjaQ6wO
+15wOAUoRBW96eeZZbytgn8kybcBy++Ue49gPtgm1MF/KlAsp0MD5AgMBAAGjgYYw
+gYMwHQYDVR0OBBYEFIH3mVsQuciM3vNSXupOaaBDPqzdMB8GA1UdIwQYMBaAFFNV
+M/JL69BRscF4msEoMXvv6u1JMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/
+BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0B
+AQsFAAOCAgEADxNymiCNr2e37iLReoaxKmZvwox0cTiNAaj7iafRzmwIoY3VXO8Q
+ix5IYcp4FaQ7fV1jyp/AmaSnyHf6Osl0sx8PxsQkO7ALttxKUrjfbvNSVUA2C/vl
+u5m7UVJLIUtFDZBWanzUSmkTsYLHpiANFQKd2c/cU1qXcyzgJVFEFVyyHNkF7Is+
++pjG9M1hwQHOoTnEuU013P7X1mHek+RXEfhJWwe7UsZnBKZaZKbQZu7hEtqKWYp/
+QsHgnjoLYXsh0WD5rz/mBxdTdDLGpFqWDzDqb8rsYnqBzoowvsasV8X8OSkov0Ht
+8Yka0ckFH9yf8j1Cwmbl6ttuonOhky3N/gwLEozuhy7TPcZGVyzevF70kXy7g1CX
+kpFGJyEHXoprlNi8FR4I+NFzbDe6a2cFow1JN19AJ9Z5Rk5m7M0mQPaQ4RcikjB3
+aoLsASCJTm1OpOFHfxEKiBW4Lsp3Uc5/Rb9ZNbfLrwqWZRM7buW1e3ekLqntgbky
+uKKISHqVJuw/vXHl1jNibEo9+JuQ88VNuAcm7WpGUogeCa2iAlPTckPZei+MwZ8w
+tpvxTyYlZEC8DWzY1VC29+W2N5cvh01e2E3Ql08W1zL63dqrgdEZ3VWjzooYi4ep
+BmMXTvouW+Flyvcw/0oTcfN0biDIt0mCkZ5CQVjfGL9DTOYteR5hw+k=
+-----END CERTIFICATE-----
diff --git a/src/main/docker/elasticsearch/config/clamp-key.pem b/src/main/docker/elasticsearch/config/clamp-key.pem
new file mode 100644
index 0000000..af847d5
--- /dev/null
+++ b/src/main/docker/elasticsearch/config/clamp-key.pem
@@ -0,0 +1,32 @@
+Bag Attributes
+ friendlyName: clamp@clamp.onap.org
+ localKeyID: 54 69 6D 65 20 31 35 37 31 30 36 38 34 31 31 38 30 37
+Key Attributes: <No Attributes>
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCsuvJ9pjBqjrxI
++5TG2PTVRUob9Cx1uO3cUMzR01mxNodsSRdI3sq6Q2Nr+PenoT7edo8ujru8G79H
+BfyUWBkNe3hJikCXzDV62cwavWtGjWIsOZHczJfj8ZrtObJ/uRpeGmbosY38zUwN
+cGzT1vm2K67MPe2BazTI4JLxyGcJ0bZEZ0XGBMOup3Hqo2QOy7BaQMOTs20Ww3aB
+64h7KAqaqNnblqUOtkLCUBdp6Lxa9oBXqS4Fg+C1eZqzuixLQgmWZs2ED+wl4FZD
+DaIkN4gw4YTXhpxr82gauW3ro2sAYrJX63FqIzaj0rj/vqxYSy7fjzbsE1VPBxCH
+yUuaHxUTAgMBAAECggEABaPlHy06D4CxrUBpz0RuWjh0/wyuFvn+6l7JEWDxYNQD
+AAoy9HIx9HsW2AO9MoAVaXY9nquSfcX6LPuJD98AkmwhtWUKTuqgJG7QN19QDXG4
+bvFCTg9wNkVBZdWoens03TXHfnmtxT9+6EFvjEtMxCIRByJOixdRFe4fXj3I/40H
+p6KjzscPhRqmapB5U/lWwteONoq1A4VBoqj1Qbe1NjmNGMhhXqj/d9f6B0DPGqIA
+nIDubb1B3YNdbxE8LbY1YiQZEtjjA2uIyW0tRjZyhVVtNwSm814fyjVPp2oRpK43
+2OVBLbHZlxY5sFZwU71lWSyEAHhOL5yY1HORKUyCIQKBgQDwR8POilccu1fczDX7
+7jTHvknrtc5Pm689hOz+iZz8oib5MNHM57YMQJNauAHcUUDc8PEBrU44kJda7zVU
+8jVgeV0kvZcmDM4AGrmbBSGLhcmyqJC4wKF20K3rVFFo5exlpTDU7dwnPkMbHeGQ
+LmPzk+5BKQa81Mq+cObdJs/LpwKBgQC4B9kf+cex77OluKN9mz8D3MOEWycztDpd
+XVeM+RV4cjIMaQl91GovtQDwdy9TbKCsq+sFvqWsmQNkUlDGP2c0y4PFnJt7ahzW
+wqZ8bZgNcTNE+KqHUMEOcDGRVoQf65XRWZhjq0mJyCewPMOrdFgHTzva2QYOrZTK
+jBIWx84otQKBgQCDjidM7D1pw8EFaOGdv/wx6KO8ZFxDBfBadG71pg7H21gPU4Vq
+9OqdprWHE/wgznP/BARQcLzFB5V2+kVu7vX+jjRLK2qYMKaRNBCvKY4GQAgAw34J
+SZ6d2P+AOzgfgNN/i4RC8MB61AIV1LRtJpkfAb2O+5Fuzer7fgFI0DkxPQKBgAdq
+gYxxU2PPRg0KmMQKCosMTXC6/6RsweFbTpjmvL/C0lN/tBs3ASR1Bdmq4+RXv03W
+C72KhkCjVeioDItAqNcO0HuZKQbbKthYtb7T58m64xcHck/LqEv9p3G069QheUMb
+ejGiCG+d+kN232e8Y4O/5KiYEE9tHU7gQCZc3Oj1AoGBAI2QyoAJlM0jREsEft7c
+L+5kcV+VulyMYEFycSy6KziUKxVh+VMk5Eo6UhXo6m4x37tg/D8uK/tkeJdWw00N
+dXLsUcDEacZyF8UfRsrscmiBURu0+9S/5+ncSX6s18HHGL7n2io+PX/ie2neO7q1
+fj50Aj03dg1TrgMTx2g6e85Y
+-----END PRIVATE KEY-----
diff --git a/src/main/docker/elasticsearch/config/clamp.pem b/src/main/docker/elasticsearch/config/clamp.pem
new file mode 100644
index 0000000..22f4541
--- /dev/null
+++ b/src/main/docker/elasticsearch/config/clamp.pem
@@ -0,0 +1,32 @@
+Bag Attributes
+ friendlyName: clamp@clamp.onap.org
+ localKeyID: 54 69 6D 65 20 31 35 37 31 30 36 38 34 31 31 38 30 37
+subject=CN = clamp, emailAddress = mark.d.manager@people.osaaf.com, OU = clamp@clamp.onap.org:DEV, OU = OSAAF, O = ONAP, C = US
+
+issuer=C = US, O = ONAP, OU = OSAAF, CN = intermediateCA_9
+
+-----BEGIN CERTIFICATE-----
+MIIETDCCAzSgAwIBAgIIGF6ukzqwlGIwDQYJKoZIhvcNAQELBQAwRzELMAkGA1UE
+BhMCVVMxDTALBgNVBAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRkwFwYDVQQDDBBp
+bnRlcm1lZGlhdGVDQV85MB4XDTE5MTAxNDE1NTM0MVoXDTIwMTAxNDE1NTM0MVow
+gY8xDjAMBgNVBAMMBWNsYW1wMS4wLAYJKoZIhvcNAQkBFh9tYXJrLmQubWFuYWdl
+ckBwZW9wbGUub3NhYWYuY29tMSEwHwYDVQQLDBhjbGFtcEBjbGFtcC5vbmFwLm9y
+ZzpERVYxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJV
+UzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKy68n2mMGqOvEj7lMbY
+9NVFShv0LHW47dxQzNHTWbE2h2xJF0jeyrpDY2v496ehPt52jy6Ou7wbv0cF/JRY
+GQ17eEmKQJfMNXrZzBq9a0aNYiw5kdzMl+Pxmu05sn+5Gl4aZuixjfzNTA1wbNPW
++bYrrsw97YFrNMjgkvHIZwnRtkRnRcYEw66nceqjZA7LsFpAw5OzbRbDdoHriHso
+Cpqo2duWpQ62QsJQF2novFr2gFepLgWD4LV5mrO6LEtCCZZmzYQP7CXgVkMNoiQ3
+iDDhhNeGnGvzaBq5beujawBislfrcWojNqPSuP++rFhLLt+PNuwTVU8HEIfJS5of
+FRMCAwEAAaOB8jCB7zAJBgNVHRMEAjAAMA4GA1UdDwEB/wQEAwIF4DAgBgNVHSUB
+Af8EFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwVAYDVR0jBE0wS4AUgfeZWxC5yIze
+81Je6k5poEM+rN2hMKQuMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQ
+MQswCQYDVQQGEwJVU4IBBzAdBgNVHQ4EFgQUicMoQoxguo6qFb7YZ2gZn8X0BV4w
+OwYDVR0RBDQwMoIFY2xhbXCCHWNsYW1wLmFwaS5zaW1wbGVkZW1vLm9uYXAub3Jn
+ggpjbGFtcC5vbmFwMA0GCSqGSIb3DQEBCwUAA4IBAQCMDZrqzL/orHH3WoLKj/JJ
++QOt89CTYJqX5rS2TbQgX/JdjXJzJsmY21dTHxg0+AdRmAUATHBFAOg/nLEfDUOh
+NX0+OshoaTYjrI2ZH4j24UsoXzGffpjqPbLMZJ1uzxy4qTTvzeJJM1NsfKD4Er0B
+KDgN66pzywJrxOXkTQZpmkgGeB9FwmBoLFKP2XJjXXT9c9Wol8ttrSqu/sy5e6/Y
+SZLco8lXx0isxGgG5PfF9WSuikFRlC5LCmcSn9EfxQIOeGjzJQpuB8yqN/ojE8wY
+ZBhaUM/+NETQNzsh4dZxq7ErSknND60NYit8rz9lWDDrNNKVF+8iFpoTb17V8e3C
+-----END CERTIFICATE-----
diff --git a/src/main/docker/elasticsearch/config/elasticsearch.yml b/src/main/docker/elasticsearch/config/elasticsearch.yml
new file mode 100644
index 0000000..9380de5
--- /dev/null
+++ b/src/main/docker/elasticsearch/config/elasticsearch.yml
@@ -0,0 +1,39 @@
+---
+## Default Elasticsearch configuration from elasticsearch-docker.
+## from https://opendistro.github.io/for-elasticsearch-docs/docs/elasticsearch/configuration/
+#
+cluster.name: "docker-cluster"
+network.host: 0.0.0.0
+
+# # minimum_master_nodes need to be explicitly set when bound on a public IP
+# # set to 1 to allow single node clusters
+# # Details: https://github.com/elastic/elasticsearch/pull/17288
+# discovery.zen.minimum_master_nodes: 1
+
+# # Breaking change in 7.0
+# # https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#breaking_70_discovery_changes
+# cluster.initial_master_nodes:
+# - elasticsearch1
+# - docker-test-node-1
+######## Start OpenDistro for Elasticsearch Security Demo Configuration ########
+# WARNING: revise all the lines below before you go into production
+opendistro_security.ssl.transport.pemcert_filepath: esnode.pem
+opendistro_security.ssl.transport.pemkey_filepath: esnode-key.pem
+opendistro_security.ssl.transport.pemtrustedcas_filepath: root-ca.pem
+opendistro_security.ssl.transport.enforce_hostname_verification: false
+opendistro_security.ssl.http.enabled: true
+opendistro_security.ssl.http.pemcert_filepath: esnode.pem
+opendistro_security.ssl.http.pemkey_filepath: esnode-key.pem
+opendistro_security.ssl.http.pemtrustedcas_filepath: root-ca.pem
+opendistro_security.allow_unsafe_democertificates: true
+opendistro_security.allow_default_init_securityindex: true
+opendistro_security.authcz.admin_dn:
+ - CN=kirk,OU=client,O=client,L=test, C=de
+
+opendistro_security.audit.type: internal_elasticsearch
+opendistro_security.enable_snapshot_restore_privilege: true
+opendistro_security.check_snapshot_restore_write_privileges: true
+opendistro_security.restapi.roles_enabled: ["all_access", "security_rest_api_access"]
+cluster.routing.allocation.disk.threshold_enabled: false
+node.max_local_storage_nodes: 3
+######## End OpenDistro for Elasticsearch Security Demo Configuration ########
diff --git a/src/main/docker/kibana/Dockerfile b/src/main/docker/kibana/Dockerfile
new file mode 100644
index 0000000..f0abf98
--- /dev/null
+++ b/src/main/docker/kibana/Dockerfile
@@ -0,0 +1,58 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+
+FROM amazon/opendistro-for-elasticsearch-kibana:1.3.0
+
+MAINTAINER "The Onap Team"
+LABEL Description="Kibana opendistro image with saved objects"
+USER root
+RUN yum install -y python-requests && yum clean all
+
+# You can share volume on this folder to restore
+# a default kibana configuration. Each subfolder will
+# be considered as a saved-object folder generated by,
+# the backup.py script bundled with the image.
+# Structure example :
+# saved-objects/
+# └── default
+# ├── config
+# │   └── config-6.1.3.json
+# ├── dashboard
+# │   └── dashboard-e6a82230-c190-11e8-a550-27f2e3138fee.json
+# ├── index-pattern
+# │   └── index-pattern-3ecb1c70-c190-11e8-a550-27f2e3138fee.json
+# ├── search
+# │   └── search-abdd0440-c190-11e8-a550-27f2e3138fee.json
+# └── visualization
+# ├── visualization-cb896270-c190-11e8-a550-27f2e3138fee.json
+# └── visualization-d837b120-c190-11e8-a550-27f2e3138fee.json
+
+RUN mkdir /saved-objects/ && chown kibana:kibana /saved-objects/
+
+USER kibana
+
+ADD saved-objects /saved-objects
+ADD startup.sh /usr/local/bin/startup.sh
+ADD restore.py /usr/local/bin/restore.py
+ADD backup.py /usr/local/bin/backup.py
+CMD /usr/local/bin/startup.sh
diff --git a/src/main/docker/kibana/README.md b/src/main/docker/kibana/README.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/main/docker/kibana/README.md
diff --git a/src/main/docker/kibana/backup.py b/src/main/docker/kibana/backup.py
new file mode 100755
index 0000000..b1e4518
--- /dev/null
+++ b/src/main/docker/kibana/backup.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2018 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+
+import json
+import logging
+import os
+import sys
+
+import requests
+
+PER_PAGE = 1000
+
+def parse_args(args):
+ """ Parse arguments given to this script"""
+ import argparse
+ parser = argparse.ArgumentParser(
+ description=('Description of the script'))
+ parser.add_argument('-v', '--verbose', dest='log_level', action='store_const',
+ const=logging.DEBUG, default=logging.INFO,
+ help='Use verbose logging')
+ parser.add_argument('-C', '--configuration_path',
+ default='./default',
+ help='Path of the configuration to be backed up.')
+ parser.add_argument('-f', '--force', action='store_const',
+ const=True, default=False,
+ help=('If the save folder already exists, overwrite files'
+ ' matching a configuration item that should be written.'
+ ' Files already in the folder that do not match are'
+ ' left as-is.'))
+ parser.add_argument('-H', '--kibana-host', default='https://localhost:5601',
+ help='Kibana endpoint.')
+
+ return parser.parse_args(args)
+
+def get_logger(args):
+ """Creates the logger based on the provided arguments"""
+ logging.basicConfig()
+ logger = logging.getLogger(__name__)
+ logger.setLevel(args.log_level)
+ return logger
+
+def main():
+ """ This script dumps the kibana configuration from Kibana"""
+ args = parse_args(sys.argv[1:])
+
+ base_config_path = args.configuration_path
+
+ # 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,
+ params={'per_page': PER_PAGE,'type':['config','search','dashboard','visualization','index-pattern']})
+
+ saved_objects = saved_objects_req.json()['saved_objects']
+
+ for obj in saved_objects:
+
+ obj_folder = os.path.sep.join((base_config_path, obj['type']))
+
+ if not os.path.exists(obj_folder):
+ os.makedirs(obj_folder)
+
+ filename = "%s/%s-%s.json" % (obj_folder, obj['type'], obj['id'])
+ with open(filename, 'w') as file:
+ json.dump(obj, fp=file)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/src/main/docker/kibana/conf/keystore/org.onap.clamp.crt.pem b/src/main/docker/kibana/conf/keystore/org.onap.clamp.crt.pem
new file mode 100644
index 0000000..ce630d4
--- /dev/null
+++ b/src/main/docker/kibana/conf/keystore/org.onap.clamp.crt.pem
@@ -0,0 +1,30 @@
+Bag Attributes
+ friendlyName: clamp@clamp.onap.org
+ localKeyID: 54 69 6D 65 20 31 35 35 33 37 38 37 35 31 38 33 30 33
+subject=/CN=clamp/emailAddress=/OU=clamp@clamp.onap.org/OU=OSAAF/O=ONAP/C=US
+issuer=/C=US/O=ONAP/OU=OSAAF/CN=intermediateCA_9
+-----BEGIN CERTIFICATE-----
+MIIEKDCCAxCgAwIBAgIIWY+5kgf/UG4wDQYJKoZIhvcNAQELBQAwRzELMAkGA1UE
+BhMCVVMxDTALBgNVBAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRkwFwYDVQQDDBBp
+bnRlcm1lZGlhdGVDQV85MB4XDTE5MDMyMTE2MTY1OFoXDTIwMDMyMTE2MTY1OFow
+bDEOMAwGA1UEAwwFY2xhbXAxDzANBgkqhkiG9w0BCQEWADEdMBsGA1UECwwUY2xh
+bXBAY2xhbXAub25hcC5vcmcxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQ
+MQswCQYDVQQGEwJVUzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALic
+uDccBjOAlOsL1Z1nKnDPRTNxBwIVfARRQDxK3C0zDHQ5qEmIQlF0Vjp+bJ2rgzMW
+BnodC38zt1jSXymEsekZNV2sUyBbzJl6vxvA1xJKI9VHLyPSzyUEd1H4qh8b7IDX
+3GDqUJgNfvzJ94DaNnnYWFVZq/IYdLjCFaXDxPUQZtlmpdkIWBzvMeNRe4bWajau
+immkmSi5/2BYQfZXHXpiKiyBnN+1FbU3consmjNwS1L+PjD+k3JLsc5ANZYZMOTp
+Szhu3xmDiB3UV4gPQWacQQZEo/5exywY3Ax3TowGwIA660eSkW1L5RPdyvzEgp7A
+vu4+rbhfeR5bXjy2iAUCAwEAAaOB8jCB7zAJBgNVHRMEAjAAMA4GA1UdDwEB/wQE
+AwIF4DAgBgNVHSUBAf8EFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwVAYDVR0jBE0w
+S4AUgfeZWxC5yIze81Je6k5poEM+rN2hMKQuMCwxDjAMBgNVBAsMBU9TQUFGMQ0w
+CwYDVQQKDARPTkFQMQswCQYDVQQGEwJVU4IBBzAdBgNVHQ4EFgQU+GZ6wmWDPrmq
+Wd1/NtMYiCQ8Dg4wOwYDVR0RBDQwMoIFY2xhbXCCHWNsYW1wLmFwaS5zaW1wbGVk
+ZW1vLm9uYXAub3JnggpjbGFtcC5vbmFwMA0GCSqGSIb3DQEBCwUAA4IBAQCFZdhB
+U6xm6l0vj4q89onLx4opTPvwGNRc0n402lifkPYXseFtphZSHIf2Sg0mFTH4KHb4
+FdMyBzq1+f5WLU+xRC1nT4eGJ0FvRR6204/fGVrzJTS67phnRnxr2WZzLPW0wPJe
+K8SzN6tkUgE7/a/s0T/htE/blDxWh75+tA2jQlgj1Ri0y9A1J8wx++REKjGlHjFN
+53aiipsB+wC/oEMzYL4qEPiYPI0Lr3Lsay1F7f6cvDT4+EYzBLMFuwCvpcnHgSMS
+4fFj2ROmUG2+CC23B88Q0WNxjLPq/CrmHZZBsqwruPJ0cSuCQxfshTQ6uZhcjtu8
+6TRYkIcL0x9r/AHP
+-----END CERTIFICATE-----
diff --git a/src/main/docker/kibana/conf/keystore/org.onap.clamp.key.pem b/src/main/docker/kibana/conf/keystore/org.onap.clamp.key.pem
new file mode 100644
index 0000000..fcf68bf
--- /dev/null
+++ b/src/main/docker/kibana/conf/keystore/org.onap.clamp.key.pem
@@ -0,0 +1,32 @@
+Bag Attributes
+ friendlyName: clamp@clamp.onap.org
+ localKeyID: 54 69 6D 65 20 31 35 35 33 37 38 37 35 31 38 33 30 33
+Key Attributes: <No Attributes>
+-----BEGIN PRIVATE KEY-----
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4nLg3HAYzgJTr
+C9WdZypwz0UzcQcCFXwEUUA8StwtMwx0OahJiEJRdFY6fmydq4MzFgZ6HQt/M7dY
+0l8phLHpGTVdrFMgW8yZer8bwNcSSiPVRy8j0s8lBHdR+KofG+yA19xg6lCYDX78
+yfeA2jZ52FhVWavyGHS4whWlw8T1EGbZZqXZCFgc7zHjUXuG1mo2ropppJkouf9g
+WEH2Vx16YiosgZzftRW1N3KJ7JozcEtS/j4w/pNyS7HOQDWWGTDk6Us4bt8Zg4gd
+1FeID0FmnEEGRKP+XscsGNwMd06MBsCAOutHkpFtS+UT3cr8xIKewL7uPq24X3ke
+W148togFAgMBAAECggEATncV+R5pKFS7dteV2IvzxvTh1cZxkxoslu0t3zJ2OKPc
+5D1pYK+QeGx5Be2cHru6TOlMoXRc4ZjKke8AUXY74/Y573GB91vtL0KznYkuIHDw
+oALcb153eqVWTbniHMzSjcSxv2N4E9iQo8L39oVI6CrjCIvPgFuSqMCdUNJPkVTI
+4nsarTfLK4fzi7IbWzi9JdE1QRNIxcCMcYJRnLZMdneMLBleR0UL82Xc2KOy5SEt
+zyKYCQ8zS247FKolnOrDkhKxXI5fzdDpRK5AQSsAykUPWlYq7pzKjY/dU9rMRohx
+YSltFjPZ3sQ3UKqqIqhZS+GoVuZoc925WyhViPsqtQKBgQDsL4LFfPWN8nnsusQp
+VR3T7HvvwXuEVAydlaJMwZU0cRYN+L7RHHjDoXZZrNJDIDzNoWnBLKRGx3mtLmgJ
+9Pa6SxN6Oc8oo6jzv2D59g1PVjNOMOYTCTb/2Xum4LMLaeeF57HkWxzeA3Ws47++
+gXwzQpbE90tp1Ys4uXD3JoivvwKBgQDIGZTwLGhLSegdAjG83WEgmdtzT1kjvx0Q
+A8IR2jkgkTJHdKiuslJ8Z3/XufHEwWMWwfs1XLwxYluoo1y9eNvNeHZXjLqjL62c
+I3034F9IvvTUqFcxam2WdoklXbAiSvLUo/9exPgOuVxok6Zv1imRgGb/vYV9vyG7
+86MRuQu5OwKBgQC9E3fcA6JMpY3H3uhEsngzfMDm+fyYvfRvfyezzNFWbyWZv8V6
+gBGJg0vMlFarGDa044BW/hbw9qXI5zqwpeOS1aFdGsRlo0cRAuduk/Spy7c85FZ7
+bMgT4BZmTMHo5DpNb2NxDSO59AkThCuvJde47ZjnS5WavzI6EfKGWNnZ3wKBgQCF
+QiwjCp/mS/DtqLFxAsmVSYGROG231aXILYiIFRloa+ndFn7j4NP4D4FfLHErRFL2
+K/ddIUYfaU57b1fqwts26ht90LXWyYDH9AaHOMCcFLe+C+INgcA7rPNG1C7hl6JC
+JHmEJo7AV4eICZSU9D44rRdrB08oYCpaHjYiLmb1UwKBgQCWCDJ4p2DrNL9hzj3K
+kzvM5saXrfI4aVBXVt9rw9s1d/WG8JOpnmHcnLPb6Tj59rDktrLCLv0sVstMwNVJ
+sOO+qsgn1VoZalcVhhjdONm5YvhJQgz0F7Y2xkr6g/AuMPz2YigGfm7fe/z7rc+L
+q9Ua2HmUS8DDBy7W89MNZJNkDQ==
+-----END PRIVATE KEY-----
diff --git a/src/main/docker/kibana/conf/kibana.yml b/src/main/docker/kibana/conf/kibana.yml
new file mode 100644
index 0000000..6726a74
--- /dev/null
+++ b/src/main/docker/kibana/conf/kibana.yml
@@ -0,0 +1,18 @@
+---
+# Default Kibana configuration from kibana-docker.
+
+server.name: kibana
+server.host: "0"
+elasticsearch.hosts: http://elasticsearch:9200
+server.ssl.enabled: true
+server.ssl.key: /usr/share/kibana/config/keystore/org.onap.clamp.key.pem
+server.ssl.certificate: /usr/share/kibana/config/keystore/org.onap.clamp.crt.pem
+
+elasticsearch.ssl.verificationMode: none
+elasticsearch.username: kibanaserver
+elasticsearch.password: kibanaserver
+elasticsearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
+
+opendistro_security.multitenancy.enabled: true
+opendistro_security.multitenancy.tenants.preferred: ["Private", "Global"]
+opendistro_security.readonly_mode.roles: ["kibana_read_only"] \ No newline at end of file
diff --git a/src/main/docker/kibana/restore.py b/src/main/docker/kibana/restore.py
new file mode 100755
index 0000000..eee2e6b
--- /dev/null
+++ b/src/main/docker/kibana/restore.py
@@ -0,0 +1,115 @@
+#!/usr/bin/env python
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2018 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+import json
+import logging
+import os
+import sys
+
+import requests
+
+if sys.version_info < (3,):
+ # for HTTPStatus.OK only
+ import httplib as HTTPStatus
+else:
+ from http import HTTPStatus
+
+
+
+OBJECT_TYPES = ['index-pattern', 'config', 'search', 'visualization', 'dashboard']
+
+def parse_args(args):
+ """ Parse arguments given to this script"""
+ import argparse
+ parser = argparse.ArgumentParser(
+ description=('Restores the kibana configuration.'))
+ parser.add_argument('-v', '--verbose', dest='log_level', action='store_const',
+ const=logging.DEBUG, default=logging.INFO,
+ help='Use verbose logging')
+ parser.add_argument('-C', '--configuration_path',
+ default='./default',
+ help=('Path of the configuration to be restored.'
+ 'Should contain at least one folder named %s or %s' %
+ (','.join(OBJECT_TYPES[:-1]), OBJECT_TYPES[-1])
+ )
+ )
+ parser.add_argument('-H', '--kibana-host', default='https://localhost:5601',
+ help='Kibana endpoint.')
+ parser.add_argument('-f', '--force', action='store_const',
+ const=True, default=False,
+ help='Overwrite configuration if needed.')
+
+ return parser.parse_args(args)
+
+def get_logger(args):
+ """Creates the logger based on the provided arguments"""
+ logging.basicConfig()
+ logger = logging.getLogger(__name__)
+ logger.setLevel(args.log_level)
+ return logger
+
+def main():
+ ''' Main script function'''
+ args = parse_args(sys.argv[1:])
+ logger = get_logger(args)
+ base_config_path = args.configuration_path
+
+ # order to ensure dependency order is ok
+ for obj_type in OBJECT_TYPES:
+ obj_dir = os.path.sep.join((base_config_path, obj_type))
+
+ if not os.path.exists(obj_dir):
+ logger.info('No %s to restore, skipping.', obj_type)
+ continue
+
+ for obj_filename in os.listdir(obj_dir):
+ with open(os.path.sep.join((obj_dir, obj_filename))) as obj_file:
+ payload = obj_file.read()
+
+ obj = json.loads(payload)
+
+ obj_id = obj['id']
+ for key in ('id', 'version', 'type', 'updated_at'):
+ try:
+ del obj[key]
+ 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)
+ 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,
+ headers={'content-type': 'application/json',
+ 'kbn-xsrf': 'True'},
+ params=params,
+ data=json.dumps(obj))
+ if post_object_req.status_code == HTTPStatus.OK:
+ logger.info('%s id:%s restored.', obj_type, obj_id)
+ else:
+ logger.warning(('Something bad happend while restoring %s id:%s. '
+ ' Received status code: %s'),
+ obj_type, obj_id, post_object_req.status_code)
+ logger.warning('Body: %s', post_object_req.content)
+
+if __name__ == "__main__":
+ main()
diff --git a/src/main/docker/kibana/saved-objects/default/config/config-6.6.2.json b/src/main/docker/kibana/saved-objects/default/config/config-6.6.2.json
new file mode 100644
index 0000000..41aee48
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/config/config-6.6.2.json
@@ -0,0 +1 @@
+{"attributes": {"buildNum": 19548, "defaultIndex": "04e06060-50bf-11e9-b3a3-7302725859d5"}, "version": 2, "type": "config", "id": "6.6.2", "updated_at": "2019-04-03T18:36:56.261Z"} \ No newline at end of file
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
new file mode 100644
index 0000000..76670d2
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/dashboard/dashboard-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json
@@ -0,0 +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
diff --git a/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-04e06060-50bf-11e9-b3a3-7302725859d5.json b/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-04e06060-50bf-11e9-b3a3-7302725859d5.json
new file mode 100644
index 0000000..5f27721
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-04e06060-50bf-11e9-b3a3-7302725859d5.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.generic-vnf.in-maint\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.in-maint.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.ipv4-oam-address\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.ipv4-oam-address.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.is-closed-loop-disabled\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.is-closed-loop-disabled.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.model-customization-id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.model-customization-id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.model-invariant-id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.model-invariant-id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.model-version-id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.model-version-id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.nf-function\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.nf-function.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.nf-naming-code\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.nf-naming-code.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.nf-role\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.nf-role.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.nf-type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.nf-type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.orchestration-status\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.orchestration-status.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.prov-status\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.prov-status.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"AAI.generic-vnf.resource-version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"AAI.generic-vnf.resource-version.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.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\":\"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\":\"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\":\"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\":\"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\":\"targetType\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"targetType.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}]", "timeFieldName": "@timestamp", "title": "events-*"}, "version": 2, "type": "index-pattern", "id": "04e06060-50bf-11e9-b3a3-7302725859d5", "updated_at": "2019-03-27T18:34:58.345Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/search/search-AWIk8yDIDjJ4k3sPXRbu.json b/src/main/docker/kibana/saved-objects/default/search/search-AWIk8yDIDjJ4k3sPXRbu.json
new file mode 100644
index 0000000..0b3d3e9
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/search/search-AWIk8yDIDjJ4k3sPXRbu.json
@@ -0,0 +1 @@
+{"attributes": {"sort": ["closedLoopAlarmStart", "desc"], "hits": 0, "description": "", "title": "ONSET", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"45238b70-b7ae-11e8-8c46-97881a199baf\",\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":{\"match_all\":{}}},\"filter\":[{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":null,\"disabled\":false,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"closedLoopEventStatus.keyword\",\"negate\":false,\"params\":{\"query\":\"ONSET\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"ONSET\"},\"query\":{\"match\":{\"closedLoopEventStatus.keyword\":{\"query\":\"ONSET\",\"type\":\"phrase\"}}}}]}"}, "columns": ["closedLoopAlarmStart", "closedLoopAlarmEnd", "closedLoopControlName", "closedLoopEventStatus", "notification"]}, "version": 1, "type": "search", "id": "AWIk8yDIDjJ4k3sPXRbu", "updated_at": "2019-03-20T07:18:23.921Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/search/search-AWIk9P-qDjJ4k3sPXRcQ.json b/src/main/docker/kibana/saved-objects/default/search/search-AWIk9P-qDjJ4k3sPXRcQ.json
new file mode 100644
index 0000000..9e8916a
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/search/search-AWIk9P-qDjJ4k3sPXRcQ.json
@@ -0,0 +1 @@
+{"attributes": {"sort": ["closedLoopAlarmStart", "desc"], "hits": 0, "description": "", "title": "ABATED", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"45238b70-b7ae-11e8-8c46-97881a199baf\",\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"default_field\":\"*\",\"query\":\"closedLoopEventStatus: \\\"ABATED\\\"\"}}},\"filter\":[{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"ABATED\",\"disabled\":false,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"closedLoopEventStatus.keyword\",\"negate\":false,\"params\":{\"query\":\"ABATED\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"ABATED\"},\"query\":{\"match\":{\"closedLoopEventStatus.keyword\":{\"query\":\"ABATED\",\"type\":\"phrase\"}}}},{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"ONSET\",\"disabled\":true,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"closedLoopEventStatus.keyword\",\"negate\":false,\"params\":{\"query\":\"ONSET\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"ONSET\"},\"query\":{\"match\":{\"closedLoopEventStatus.keyword\":{\"query\":\"ONSET\",\"type\":\"phrase\"}}}}]}"}, "columns": ["closedLoopAlarmStart", "closedLoopAlarmEnd", "closedLoopControlName", "closedLoopEventStatus", "notification"]}, "version": 1, "type": "search", "id": "AWIk9P-qDjJ4k3sPXRcQ", "updated_at": "2019-03-20T07:18:22.812Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/search/search-AWIlAjTaDjJ4k3sPXRe1.json b/src/main/docker/kibana/saved-objects/default/search/search-AWIlAjTaDjJ4k3sPXRe1.json
new file mode 100644
index 0000000..0f569da
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/search/search-AWIlAjTaDjJ4k3sPXRe1.json
@@ -0,0 +1 @@
+{"attributes": {"sort": ["closedLoopAlarmStart", "desc"], "hits": 0, "description": "", "title": "FAILURE NOTIFICATION", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"45238b70-b7ae-11e8-8c46-97881a199baf\",\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":{\"match_all\":{}}},\"filter\":[{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"ABATED\",\"disabled\":true,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"closedLoopEventStatus.keyword\",\"negate\":false,\"params\":{\"query\":\"ABATED\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"ABATED\"},\"query\":{\"match\":{\"closedLoopEventStatus.keyword\":{\"query\":\"ABATED\",\"type\":\"phrase\"}}}},{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"ONSET\",\"disabled\":true,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"closedLoopEventStatus.keyword\",\"negate\":false,\"params\":{\"query\":\"ONSET\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"ONSET\"},\"query\":{\"match\":{\"closedLoopEventStatus.keyword\":{\"query\":\"ONSET\",\"type\":\"phrase\"}}}},{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"FAILURE NOTIFICATION\",\"disabled\":false,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"notification.keyword\",\"negate\":false,\"params\":{\"query\":\"FINAL: FAILURE\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"FINAL: FAILURE\"},\"query\":{\"match\":{\"notification.keyword\":{\"query\":\"FINAL: FAILURE\",\"type\":\"phrase\"}}}}]}"}, "columns": ["closedLoopAlarmStart", "closedLoopAlarmEnd", "closedLoopControlName", "closedLoopEventStatus", "notification"]}, "version": 1, "type": "search", "id": "AWIlAjTaDjJ4k3sPXRe1", "updated_at": "2019-03-20T07:18:26.164Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/search/search-AWJsTEvYr1AwiIiFoV6S.json b/src/main/docker/kibana/saved-objects/default/search/search-AWJsTEvYr1AwiIiFoV6S.json
new file mode 100644
index 0000000..7598932
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/search/search-AWJsTEvYr1AwiIiFoV6S.json
@@ -0,0 +1 @@
+{"attributes": {"sort": ["closedLoopAlarmStart", "desc"], "hits": 0, "description": "", "title": "FINAL: FAILURE", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"45238b70-b7ae-11e8-8c46-97881a199baf\",\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":{\"match_all\":{}}},\"filter\":[{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":null,\"disabled\":false,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"notification\",\"negate\":false,\"params\":{\"query\":\"FINAL: FAILURE\",\"type\":\"phrase\"},\"type\":\"phrase\",\"value\":\"FINAL: FAILURE\"},\"query\":{\"match\":{\"notification\":{\"query\":\"FINAL: FAILURE\",\"type\":\"phrase\"}}}}]}"}, "columns": ["notification"]}, "version": 1, "type": "search", "id": "AWJsTEvYr1AwiIiFoV6S", "updated_at": "2019-03-20T07:18:19.445Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/search/search-AWWh6CC3TSxbbr1lgyay.json b/src/main/docker/kibana/saved-objects/default/search/search-AWWh6CC3TSxbbr1lgyay.json
new file mode 100644
index 0000000..38f58c0
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/search/search-AWWh6CC3TSxbbr1lgyay.json
@@ -0,0 +1 @@
+{"attributes": {"sort": ["closedLoopAlarmStart", "desc"], "hits": 0, "description": "Control Loop which Failed", "title": "List of Control Loops (Summary)", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"54038730-b7ae-11e8-8c46-97881a199baf\",\"highlightAll\":true,\"version\":true,\"query\":{\"language\":\"lucene\",\"query\":{\"match_all\":{}}},\"filter\":[{\"bool\":{\"should\":[{\"exists\":{\"field\":\"flagAbated\"}},{\"exists\":{\"field\":\"flagFinalFailure\"}}]},\"meta\":{\"negate\":false,\"index\":\"54038730-b7ae-11e8-8c46-97881a199baf\",\"disabled\":true,\"alias\":\"abated or failure\",\"type\":\"custom\",\"key\":\"bool\",\"value\":\"{\\\"should\\\":[{\\\"exists\\\":{\\\"field\\\":\\\"flagAbated\\\"}},{\\\"exists\\\":{\\\"field\\\":\\\"flagFinalFailure\\\"}}]}\"},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"54038730-b7ae-11e8-8c46-97881a199baf\",\"negate\":false,\"disabled\":true,\"alias\":\"abated\",\"type\":\"exists\",\"key\":\"flagAbated\",\"value\":\"exists\"},\"exists\":{\"field\":\"flagAbated\"},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"54038730-b7ae-11e8-8c46-97881a199baf\",\"negate\":false,\"disabled\":true,\"alias\":\"failure\",\"type\":\"exists\",\"key\":\"flagFinalFailure\",\"value\":\"exists\"},\"exists\":{\"field\":\"flagFinalFailure\"},\"$state\":{\"store\":\"appState\"}}]}"}, "columns": ["requestID", "closedLoopControlName", "notification", "vnfName", "vmName", "vnfType", "locationCity", "locationState", "flagAbated", "flagFinalFailure", "eventDuration"]}, "version": 1, "type": "search", "id": "AWWh6CC3TSxbbr1lgyay", "updated_at": "2019-03-20T07:18:21.676Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/search/search-AWWh7d7sTSxbbr1lgyaz.json b/src/main/docker/kibana/saved-objects/default/search/search-AWWh7d7sTSxbbr1lgyaz.json
new file mode 100644
index 0000000..5da483d
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/search/search-AWWh7d7sTSxbbr1lgyaz.json
@@ -0,0 +1 @@
+{"attributes": {"sort": ["closedLoopAlarmStart", "desc"], "hits": 0, "description": "Control Loops Abated", "title": "ABATED CL", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"45238b70-b7ae-11e8-8c46-97881a199baf\",\"highlightAll\":true,\"version\":true,\"query\":{\"query\":{\"query_string\":{\"query\":\"closedLoopEventStatus: \\\"ABATED\\\"\",\"analyze_wildcard\":true,\"default_field\":\"*\"}},\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"negate\":false,\"disabled\":false,\"alias\":\"ABATED\",\"type\":\"phrase\",\"key\":\"closedLoopEventStatus.keyword\",\"value\":\"ABATED\",\"params\":{\"query\":\"ABATED\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"closedLoopEventStatus.keyword\":{\"query\":\"ABATED\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}},{\"meta\":{\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"negate\":false,\"disabled\":true,\"alias\":\"ONSET\",\"type\":\"phrase\",\"key\":\"closedLoopEventStatus.keyword\",\"value\":\"ONSET\",\"params\":{\"query\":\"ONSET\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"closedLoopEventStatus.keyword\":{\"query\":\"ONSET\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"}, "columns": ["closedLoopAlarmEnd", "requestID", "closedLoopControlName", "closedLoopEventStatus", "vmName", "vnfName", "vnfType", "locationCity", "locationState", "eventDuration"]}, "version": 1, "type": "search", "id": "AWWh7d7sTSxbbr1lgyaz", "updated_at": "2019-03-20T07:18:25.062Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/search/search-AWWhVlbFTSxbbr1lgyap.json b/src/main/docker/kibana/saved-objects/default/search/search-AWWhVlbFTSxbbr1lgyap.json
new file mode 100644
index 0000000..b4c7814
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/search/search-AWWhVlbFTSxbbr1lgyap.json
@@ -0,0 +1 @@
+{"attributes": {"sort": ["controlLoopIDTime", "asc"], "hits": 0, "description": "", "title": "ControlLoopsGroupByRequestIDandTime", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"45238b70-b7ae-11e8-8c46-97881a199baf\",\"highlightAll\":true,\"version\":true,\"query\":{\"query\":{\"match_all\":{}},\"language\":\"lucene\"},\"filter\":[]}"}, "columns": ["controlLoopIDTime", "from", "closedLoopEventStatus", "notification", "notificationTime", "eventDuration", "vmName", "vnfName", "locationCity", "locationState"]}, "version": 1, "type": "search", "id": "AWWhVlbFTSxbbr1lgyap", "updated_at": "2019-03-20T07:18:20.542Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/search/search-AWXPmsmxr9U94x7rrLgV.json b/src/main/docker/kibana/saved-objects/default/search/search-AWXPmsmxr9U94x7rrLgV.json
new file mode 100644
index 0000000..81fcaf1
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/search/search-AWXPmsmxr9U94x7rrLgV.json
@@ -0,0 +1 @@
+{"attributes": {"sort": ["closedLoopAlarmStart", "desc"], "hits": 0, "description": "", "title": "FAILURE NOTIFICATION CL", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"45238b70-b7ae-11e8-8c46-97881a199baf\",\"highlightAll\":true,\"version\":true,\"query\":{\"query\":{\"match_all\":{}},\"language\":\"lucene\"},\"filter\":[{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"ABATED\",\"disabled\":true,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"closedLoopEventStatus.keyword\",\"negate\":false,\"type\":\"phrase\",\"value\":\"ABATED\",\"params\":{\"query\":\"ABATED\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"closedLoopEventStatus.keyword\":{\"query\":\"ABATED\",\"type\":\"phrase\"}}}},{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"ONSET\",\"disabled\":true,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"closedLoopEventStatus.keyword\",\"negate\":false,\"type\":\"phrase\",\"value\":\"ONSET\",\"params\":{\"query\":\"ONSET\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"closedLoopEventStatus.keyword\":{\"query\":\"ONSET\",\"type\":\"phrase\"}}}},{\"$state\":{\"store\":\"appState\"},\"meta\":{\"alias\":\"FAILURE NOTIFICATION\",\"disabled\":false,\"index\":\"AWIk7j2UDjJ4k3sPXRaY\",\"key\":\"notification.keyword\",\"negate\":false,\"type\":\"phrase\",\"value\":\"FINAL: FAILURE\",\"params\":{\"query\":\"FINAL: FAILURE\",\"type\":\"phrase\"}},\"query\":{\"match\":{\"notification.keyword\":{\"query\":\"FINAL: FAILURE\",\"type\":\"phrase\"}}}}]}"}, "columns": ["requestID", "closedLoopAlarmEnd", "closedLoopControlName", "closedLoopEventStatus", "notification", "vnfName", "vmName", "vnfType", "locationCity", "locationState", "eventDuration"]}, "version": 1, "type": "search", "id": "AWXPmsmxr9U94x7rrLgV", "updated_at": "2019-03-20T07:18:27.319Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/visualization/visualization-0ef409f0-38f8-11e9-beac-8d2beda26615.json b/src/main/docker/kibana/saved-objects/default/visualization/visualization-0ef409f0-38f8-11e9-beac-8d2beda26615.json
new file mode 100644
index 0000000..a9f177a
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/visualization/visualization-0ef409f0-38f8-11e9-beac-8d2beda26615.json
@@ -0,0 +1 @@
+{"attributes": {"visState": "{\"title\":\"Control Loop percentage count per status v2\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"filters\",\"schema\":\"segment\",\"params\":{\"filters\":[{\"input\":{\"query\":\"flagAbated:\\\"1\\\"\"},\"label\":\"\"},{\"input\":{\"query\":\"flagFinalFailure:\\\"1\\\"\"}},{\"input\":{\"query\":\"!(flagAbated:\\\"1\\\") && !(flagFinalFailure:\\\"1\\\")\"}}]}}]}", "description": "", "title": "Control Loop percentage count per status v2", "uiStateJSON": "{}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"04e06060-50bf-11e9-b3a3-7302725859d5\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"}}, "version": 3, "type": "visualization", "id": "0ef409f0-38f8-11e9-beac-8d2beda26615", "updated_at": "2019-03-27T18:37:46.430Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/visualization/visualization-2d36b0e0-38f6-11e9-beac-8d2beda26615.json b/src/main/docker/kibana/saved-objects/default/visualization/visualization-2d36b0e0-38f6-11e9-beac-8d2beda26615.json
new file mode 100644
index 0000000..91a3bcf
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/visualization/visualization-2d36b0e0-38f6-11e9-beac-8d2beda26615.json
@@ -0,0 +1 @@
+{"attributes": {"visState": "{\"title\":\"CL count filtered by status v2\",\"type\":\"histogram\",\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"closedLoopAlarmStart\",\"interval\":\"m\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"Alarm start date\"}}]}", "description": "", "title": "CL count filtered by status v2", "uiStateJSON": "{}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"04e06060-50bf-11e9-b3a3-7302725859d5\",\"filter\":[{\"meta\":{\"index\":\"44f02cf0-38f3-11e9-beac-8d2beda26615\",\"negate\":true,\"disabled\":false,\"alias\":null,\"type\":\"exists\",\"key\":\"flagFinalFailure\",\"value\":\"exists\"},\"exists\":{\"field\":\"flagFinalFailure\"},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"}}, "version": 3, "type": "visualization", "id": "2d36b0e0-38f6-11e9-beac-8d2beda26615", "updated_at": "2019-03-27T18:37:46.417Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/visualization/visualization-9a1a6750-38f7-11e9-beac-8d2beda26615.json b/src/main/docker/kibana/saved-objects/default/visualization/visualization-9a1a6750-38f7-11e9-beac-8d2beda26615.json
new file mode 100644
index 0000000..b2dfa4b
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/visualization/visualization-9a1a6750-38f7-11e9-beac-8d2beda26615.json
@@ -0,0 +1 @@
+{"attributes": {"visState": "{\"title\":\"CL view over Time v2\",\"type\":\"histogram\",\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"closedLoopAlarmStart\",\"interval\":\"d\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"CL start date/time\"}}]}", "description": "", "title": "CL view over Time v2", "uiStateJSON": "{}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"04e06060-50bf-11e9-b3a3-7302725859d5\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"}}, "version": 3, "type": "visualization", "id": "9a1a6750-38f7-11e9-beac-8d2beda26615", "updated_at": "2019-03-27T18:37:46.420Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/visualization/visualization-a9d9d120-38f8-11e9-beac-8d2beda26615.json b/src/main/docker/kibana/saved-objects/default/visualization/visualization-a9d9d120-38f8-11e9-beac-8d2beda26615.json
new file mode 100644
index 0000000..40f3b08
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/visualization/visualization-a9d9d120-38f8-11e9-beac-8d2beda26615.json
@@ -0,0 +1 @@
+{"attributes": {"visState": "{\"title\":\"Top Error Messages v2\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"history.actor.keyword\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"customLabel\":\"Actor\"}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"history.message.keyword\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"customLabel\":\"Message\"}},{\"id\":\"4\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"history.operation.keyword\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"customLabel\":\"Operation\"}}]}", "description": "", "title": "Top Error Messages v2", "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"04e06060-50bf-11e9-b3a3-7302725859d5\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"}}, "version": 3, "type": "visualization", "id": "a9d9d120-38f8-11e9-beac-8d2beda26615", "updated_at": "2019-03-27T18:37:46.426Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/visualization/visualization-ae8c22b0-3905-11e9-beac-8d2beda26615.json b/src/main/docker/kibana/saved-objects/default/visualization/visualization-ae8c22b0-3905-11e9-beac-8d2beda26615.json
new file mode 100644
index 0000000..281fed3
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/visualization/visualization-ae8c22b0-3905-11e9-beac-8d2beda26615.json
@@ -0,0 +1 @@
+{"attributes": {"visState": "{\"title\":\"Hottest closed loops v2\",\"type\":\"pie\",\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":false,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"closedLoopControlName.keyword\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}", "description": "", "title": "Hottest closed loops v2", "uiStateJSON": "{}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"04e06060-50bf-11e9-b3a3-7302725859d5\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"}}, "version": 3, "type": "visualization", "id": "ae8c22b0-3905-11e9-beac-8d2beda26615", "updated_at": "2019-03-27T18:37:46.434Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/visualization/visualization-e1f0fa00-38f5-11e9-beac-8d2beda26615.json b/src/main/docker/kibana/saved-objects/default/visualization/visualization-e1f0fa00-38f5-11e9-beac-8d2beda26615.json
new file mode 100644
index 0000000..86a44d9
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/visualization/visualization-e1f0fa00-38f5-11e9-beac-8d2beda26615.json
@@ -0,0 +1 @@
+{"attributes": {"visState": "{\"title\":\"Amount of CL v2\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":100}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"schema\":\"metric\",\"params\":{\"field\":\"requestId.keyword\",\"customLabel\":\"Amount of Control Loops\"}}]}", "description": "", "title": "Amount of CL v2", "uiStateJSON": "{}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"04e06060-50bf-11e9-b3a3-7302725859d5\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"}}, "version": 3, "type": "visualization", "id": "e1f0fa00-38f5-11e9-beac-8d2beda26615", "updated_at": "2019-03-27T18:37:46.429Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/visualization/visualization-f724dfd0-38f6-11e9-beac-8d2beda26615.json b/src/main/docker/kibana/saved-objects/default/visualization/visualization-f724dfd0-38f6-11e9-beac-8d2beda26615.json
new file mode 100644
index 0000000..189595f
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/visualization/visualization-f724dfd0-38f6-11e9-beac-8d2beda26615.json
@@ -0,0 +1 @@
+{"attributes": {"visState": "{\"title\":\"CL events date histogram v2\",\"type\":\"histogram\",\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"style\":{\"color\":\"#eee\"}},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":\"true\",\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":true},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"d\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"Closed loop alarm start per day\"}}]}", "description": "", "title": "CL events date histogram v2", "uiStateJSON": "{}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"04e06060-50bf-11e9-b3a3-7302725859d5\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"}}, "version": 3, "type": "visualization", "id": "f724dfd0-38f6-11e9-beac-8d2beda26615", "updated_at": "2019-03-27T18:37:46.432Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/saved-objects/default/visualization/visualization-fcc9a8b0-38f8-11e9-beac-8d2beda26615.json b/src/main/docker/kibana/saved-objects/default/visualization/visualization-fcc9a8b0-38f8-11e9-beac-8d2beda26615.json
new file mode 100644
index 0000000..15165b5
--- /dev/null
+++ b/src/main/docker/kibana/saved-objects/default/visualization/visualization-fcc9a8b0-38f8-11e9-beac-8d2beda26615.json
@@ -0,0 +1 @@
+{"attributes": {"visState": "{\"title\":\"Number of Complete CL\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}", "description": "", "title": "Number of Complete CL", "uiStateJSON": "{}", "version": 1, "kibanaSavedObjectMeta": {"searchSourceJSON": "{\"index\":\"04e06060-50bf-11e9-b3a3-7302725859d5\",\"filter\":[{\"bool\":{\"should\":[{\"exists\":{\"field\":\"flagAbated\"}},{\"exists\":{\"field\":\"flagFinalFailure\"}}]},\"meta\":{\"index\":\"44f02cf0-38f3-11e9-beac-8d2beda26615\",\"disabled\":false,\"alias\":null,\"type\":\"custom\",\"key\":\"bool\",\"value\":\"{\\\"should\\\":[{\\\"exists\\\":{\\\"field\\\":\\\"flagAbated\\\"}},{\\\"exists\\\":{\\\"field\\\":\\\"flagFinalFailure\\\"}}]}\",\"negate\":false},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"}}, "version": 3, "type": "visualization", "id": "fcc9a8b0-38f8-11e9-beac-8d2beda26615", "updated_at": "2019-03-27T18:37:46.423Z"} \ No newline at end of file
diff --git a/src/main/docker/kibana/startup.sh b/src/main/docker/kibana/startup.sh
new file mode 100755
index 0000000..a232706
--- /dev/null
+++ b/src/main/docker/kibana/startup.sh
@@ -0,0 +1,106 @@
+#!/bin/bash -x
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2018 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+KIBANA_CONF_FILE="/usr/share/kibana/config/kibana.yml"
+SAVED_OBJECTS_ROOT="/saved-objects/"
+RESTORE_CMD="/usr/local/bin/restore.py -H http://127.0.0.1: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"
+TIMEOUT=60
+WAIT_TIME=2
+LOADED_FLAG=$SAVED_OBJECTS_ROOT/.loaded
+
+if [ -f $LOADED_FLAG ];
+then
+ echo "---- Kibana saved objects already restored. Remove $LOADED_FLAG if you want to restore them again."
+elif [ -n "$(ls -A ${SAVED_OBJECTS_PATH})" ];
+then
+ echo "---- Waiting for elasticsearch to be up..."
+ RES=-1
+ PING_TIMEOUT=60
+ elastic_url=$(grep elasticsearch.url /usr/share/kibana/config/kibana.yml | cut -d\ -f2)
+ while [ ! "$RES" -eq "0" ] && [ "$PING_TIMEOUT" -gt "0" ];
+ do
+ curl $elastic_url
+ RES=$?
+ sleep $WAIT_TIME
+ let PING_TIMEOUT=$PING_TIMEOUT-$WAIT_TIME
+ done
+
+ echo "---- Saved objects found, restoring files."
+
+ $KIBANA_LOAD_CMD &
+ KIB_PID=$!
+
+ # Wait for log file to be avaiable
+ LOG_TIMEOUT=60
+ while [ ! -f $LOG_FILE ] && [ "$LOG_TIMEOUT" -gt "0" ];
+ do
+ echo "Waiting for $LOG_FILE to be available..."
+ sleep $WAIT_TIME
+ let LOG_TIMEOUT=$LOG_TIMEOUT-$WAIT_TIME
+ done
+
+ tail -f $LOG_FILE &
+ LOG_PID=$!
+
+ # Wait for kibana to be listening
+ while [ -z "$(grep "Server running at" $LOG_FILE)" ] && [ "$TIMEOUT" -gt "0" ];
+ do
+ echo "Waiting for kibana to start..."
+ sleep $WAIT_TIME
+ let TIMEOUT=$TIMEOUT-$WAIT_TIME
+ done
+ sleep 1
+
+ # restore files
+ for saved_objects_path in $SAVED_OBJECTS_ROOT/*
+ do
+ # skip files as we only need directories
+ [ -f $saved_objects_path ] && continue
+
+ echo "Restoring content of $saved_objects_path"
+ $RESTORE_CMD -C $saved_objects_path
+ sleep 1
+ done
+
+ touch $LOADED_FLAG
+ if [ "$?" != "0" ];
+ then
+ echo "WARNING: Could not save $LOADED_FLAG, saved objects will be restored on next startup." >&2
+ fi
+
+ # cleanup
+ kill $KIB_PID
+ kill $LOG_PID
+else
+ echo "---- No saved object found"
+ ls -A ${SAVED_OBJECTS_PATH}
+fi
+
+echo "---- Starting kibana"
+
+$KIBANA_START_CMD
+
diff --git a/src/main/docker/logstash/Dockerfile b/src/main/docker/logstash/Dockerfile
new file mode 100644
index 0000000..762479c
--- /dev/null
+++ b/src/main/docker/logstash/Dockerfile
@@ -0,0 +1,36 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+FROM docker.elastic.co/logstash/logstash-oss:6.6.2
+
+MAINTAINER "The Onap Team"
+LABEL Description="Logstash image with some plugins needed for the clamp dashboard"
+
+# Default aaf certificates
+COPY certs /certs.d/
+
+# remove default pipeline first
+COPY pipeline/logstash.conf /usr/share/logstash/pipeline/logstash.conf
+
+# add plugins needed by aggregation part of the pipeline
+RUN /usr/share/logstash/bin/logstash-plugin install logstash-filter-elasticsearch
+RUN /usr/share/logstash/bin/logstash-plugin install logstash-filter-prune
diff --git a/src/main/docker/logstash/certs/aafca.pem b/src/main/docker/logstash/certs/aafca.pem
new file mode 100644
index 0000000..cf12ec4
--- /dev/null
+++ b/src/main/docker/logstash/certs/aafca.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE-----
+MIIEVDCCAjygAwIBAgIBAjANBgkqhkiG9w0BAQsFADAsMQ4wDAYDVQQLDAVPU0FB
+RjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMwHhcNMTgwNjA1MDg1MTQxWhcN
+MjMwNjA1MDg1MTQxWjBHMQswCQYDVQQGEwJVUzENMAsGA1UECgwET05BUDEOMAwG
+A1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVkaWF0ZUNBXzEwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDOXCdZIoWM0EnEEw3qPiVMhAgNolWCTaLt
+eI2TjlTQdGDIcXdBZukHdNeOKYzOXRsLt6bLRtd5yARpn53EbzS/dgAyHuaz1HjE
+5IPWSFRg9SulfHUmcS+GBt1+KiMJTlOsw6wSA73H/PjjXBbWs/uRJTnaNmV3so7W
+DhNW6fHOrbom4p+3FucbB/QAM9b/3l/1LKnRgdXx9tekDnaKN5u3HVBmyOlRhaRp
+tscLUCT3jijoGAPRcYZybgrpa0z3iCWquibTO/eLwuO/Dn7yHWau9ZZAHGPBSn9f
+TiLKRYV55mNjr3zvs8diTPECFPW8w8sRIH3za1aKHgUC1gd87Yr3AgMBAAGjZjBk
+MB0GA1UdDgQWBBQa1FdycErTZ6nr4dxiMbKH0P7vqjAfBgNVHSMEGDAWgBRTVTPy
+S+vQUbHBeJrBKDF77+rtSTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQE
+AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAlA/RTPy5i09fJ4ytSAmAdytMwEwRaU9F
+dshG7LU9q95ODsuM79yJvV9+ISIJZRsBqf5PDv93bUCKKHIYGvR6kNd+n3yx/fce
+txDkC/tMj1T9D8TuDKAclGEO9K5+1roOQQFxr4SE6XKb/wjn8OMrCoJ75S0F3htF
+LKL85T77JeGeNgSk8JEsZvQvj32m0gv9rxi5jM/Zi5E2vxrBR9T1v3kVvlt6+PSF
+BoHXROk5HQmdHxnH+VYQtDHSwj9Xe9aoJMyL0WjYKd//8NUO+VACDOtK4Nia6gy9
+m/n9kMASMw6f9iF4n6t4902RWrRKTYM1CVu5wyVklVbEdE9i6Db4CpL9E8HpBUAP
+t44JiNzuFkDmSE/z5XuQIimDt6nzOaSF8pX2KHY2ICDLwpMNUvxzqXD9ECbdspiy
+JC2RGq8uARGGl6kQQBKDNO8SrO7rSBPANd1+LgqrKbCrHYfvFgkZPgT5MlQi+E1G
+LNT+i6fzZha9ed/L6yjl5Em71flJGFwRZl2pfErZRxp8pLPcznYyIpSjcwnqNCRC
+orhlp8nheiODC3oO3AFHDiFgUqvm8hgpnT2cPk2lpU2VY1TcZ8sW5qUDCxINIPcW
+u1SAsa87IJK3vEzPZfTCs/S6XThoqRfXj0c0Rahj7YFRi/PqIPY0ejwdtmZ9m9pZ
+8Lb0GYmlo44=
+-----END CERTIFICATE-----
diff --git a/src/main/docker/logstash/pipeline/logstash.conf b/src/main/docker/logstash/pipeline/logstash.conf
new file mode 100644
index 0000000..5c1d47d
--- /dev/null
+++ b/src/main/docker/logstash/pipeline/logstash.conf
@@ -0,0 +1,269 @@
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+input {
+ http_poller {
+ urls => {
+ event_queue => {
+ method => get
+ url => "${dmaap_base_url}/events/${event_topic}/${dmaap_consumer_group}/${dmaap_consumer_id}?timeout=15000"
+ headers => {
+ Accept => "application/json"
+ }
+ add_field => { "topic" => "${event_topic}" }
+ type => "dmaap_event"
+ }
+ notification_queue => {
+ method => get
+ url => "${dmaap_base_url}/events/${notification_topic}/${dmaap_consumer_group}/${dmaap_consumer_id}?timeout=15000"
+ headers => {
+ Accept => "application/json"
+ }
+ add_field => { "topic" => "${notification_topic}" }
+ type => "dmaap_notification"
+ }
+ request_queue => {
+ method => get
+ url => "${dmaap_base_url}/events/${request_topic}/${dmaap_consumer_group}/${dmaap_consumer_id}?timeout=15000"
+ headers => {
+ Accept => "application/json"
+ }
+ add_field => { "topic" => "${request_topic}" }
+ type => "dmaap_request"
+ }
+ }
+ socket_timeout => 30
+ request_timeout => 30
+ codec => "plain"
+ schedule => { "every" => "1m" }
+ cacert => "/certs.d/aafca.pem"
+ }
+}
+
+input {
+ file {
+ path => [
+ "/log-input/*"
+ ]
+ type => "dmaap_log"
+ codec => "json"
+ }
+}
+
+filter {
+ if [type] != "dmaap_log" {
+ #only execute this section for dmaap events from http request
+ #it doesn't apply to dmaap events from log file
+
+ # avoid noise if no entry in the list
+ if [message] == "[]" {
+ drop { }
+ }
+
+ if [http_request_failure] or [@metadata][code] != "200" {
+ mutate {
+ add_tag => [ "error" ]
+ }
+ }
+
+ if "dmaap_source" in [tags] {
+ #
+ # Dmaap provides a json list, whose items are Strings containing the event
+ # provided to Dmaap, which itself is an escaped json.
+ #
+ # We first need to parse the json as we have to use the plaintext as it cannot
+ # work with list of events, then split that list into multiple string events,
+ # that we then transform into json.
+ #
+ json {
+ source => "[message]"
+ target => "message"
+ }
+ ruby {
+ code => "
+ for ev in event.get('message', [])
+ ev.set('@metadata', event.get('@metadata'))
+ end
+ "
+ }
+
+ split {
+ field => "message"
+ }
+ json {
+ source => "message"
+ }
+ mutate {
+ remove_field => [ "message" ]
+ }
+ }
+ }
+ #now start the common, to both http request and log file events, processing
+
+ #
+ # Some timestamps are expressed as milliseconds, some are in microseconds
+ #
+ if [closedLoopAlarmStart] {
+ ruby {
+ code => "
+ if event.get('closedLoopAlarmStart').to_s.to_i(10) > 9999999999999
+ event.set('closedLoopAlarmStart', event.get('closedLoopAlarmStart').to_s.to_i(10) / 1000)
+ else
+ event.set('closedLoopAlarmStart', event.get('closedLoopAlarmStart').to_s.to_i(10))
+ end
+ "
+ }
+ date {
+ match => [ "closedLoopAlarmStart", UNIX_MS ]
+ target => "closedLoopAlarmStart"
+ }
+ }
+
+ if [closedLoopAlarmEnd] {
+ ruby {
+ code => "
+ if event.get('closedLoopAlarmEnd').to_s.to_i(10) > 9999999999999
+ event.set('closedLoopAlarmEnd', event.get('closedLoopAlarmEnd').to_s.to_i(10) / 1000)
+ else
+ event.set('closedLoopAlarmEnd', event.get('closedLoopAlarmEnd').to_s.to_i(10))
+ end
+ "
+ }
+ date {
+ match => [ "closedLoopAlarmEnd", UNIX_MS ]
+ target => "closedLoopAlarmEnd"
+ }
+
+ }
+
+
+ #
+ # Notification time are expressed under the form "yyyy-MM-dd HH:mm:ss", which
+ # is close to ISO8601, but lacks of T as spacer: "yyyy-MM-ddTHH:mm:ss"
+ #
+ if [notificationTime] {
+ mutate {
+ gsub => [ "notificationTime", " ", "T" ]
+ }
+ date {
+ match => [ "notificationTime", ISO8601 ]
+ target => "notificationTime"
+ }
+ }
+
+
+ #
+ # Renaming some fields for readability
+ #
+ if [AAI][generic-vnf.vnf-name] {
+ mutate {
+ add_field => { "vnfName" => "%{[AAI][generic-vnf.vnf-name]}" }
+ }
+ }
+ if [AAI][generic-vnf.vnf-type] {
+ mutate {
+ add_field => { "vnfType" => "%{[AAI][generic-vnf.vnf-type]}" }
+ }
+ }
+ if [AAI][vserver.vserver-name] {
+ mutate {
+ add_field => { "vmName" => "%{[AAI][vserver.vserver-name]}" }
+ }
+ }
+ if [AAI][complex.city] {
+ mutate {
+ add_field => { "locationCity" => "%{[AAI][complex.city]}" }
+ }
+ }
+ if [AAI][complex.state] {
+ mutate {
+ add_field => { "locationState" => "%{[AAI][complex.state]}" }
+ }
+ }
+
+
+ #
+ # Adding some flags to ease aggregation
+ #
+ if [closedLoopEventStatus] =~ /(?i)ABATED/ {
+ mutate {
+ add_field => { "flagAbated" => "1" }
+ }
+ }
+ if [notification] =~ /^.*?(?:\b|_)FINAL(?:\b|_).*?(?:\b|_)FAILURE(?:\b|_).*?$/ {
+ mutate {
+ add_field => { "flagFinalFailure" => "1" }
+ }
+ }
+
+
+ if "error" not in [tags] {
+ #
+ # Creating data for a secondary index
+ #
+ clone {
+ clones => [ "event-cl-aggs" ]
+ add_tag => [ "event-cl-aggs" ]
+ }
+
+ if "event-cl-aggs" in [tags] {
+ #
+ # we only need a few fields for aggregations; remove all fields from clone except :
+ # vmName,vnfName,vnfType,requestID,closedLoopAlarmStart, closedLoopControlName,closedLoopAlarmEnd,abated,nbrDmaapevents,finalFailure
+ #
+ prune {
+ whitelist_names => ["^@.*$","^topic$","^type$","^tags$","^flagFinalFailure$","^flagAbated$","^locationState$","^locationCity$","^vmName$","^vnfName$","^vnfType$","^requestID$","^closedLoopAlarmStart$","^closedLoopControlName$","^closedLoopAlarmEnd$","^target$","^target_type$","^triggerSourceName$","^policyScope$","^policyName$","^policyVersion$"]
+ }
+
+ }
+ }
+}
+
+output {
+ stdout {
+ codec => rubydebug { metadata => true }
+ }
+
+ if "error" in [tags] {
+ elasticsearch {
+ codec => "json"
+ hosts => ["${elasticsearch_base_url}"]
+ user => "${LOGSTASH_USR}"
+ password => "${LOGSTASH_PWD}"
+ index => "errors-%{+YYYY.MM.DD}"
+ doc_as_upsert => true
+ }
+
+ } else if "event-cl-aggs" in [tags] {
+ elasticsearch {
+ codec => "json"
+ hosts => ["${elasticsearch_base_url}"]
+ user => "${LOGSTASH_USR}"
+ password => "${LOGSTASH_PWD}"
+ document_id => "%{requestID}"
+ index => "events-cl-%{+YYYY.MM.DD}" # creates daily indexes for control loop
+ doc_as_upsert => true
+ action => "update"
+ }
+
+ } else {
+ elasticsearch {
+ codec => "json"
+ hosts => ["${elasticsearch_base_url}"]
+ user => "${LOGSTASH_USR}"
+ password => "${LOGSTASH_PWD}"
+ index => "events-raw-%{+YYYY.MM.DD}" # creates daily indexes
+ doc_as_upsert => true
+ }
+ }
+}
diff --git a/version.properties b/version.properties
new file mode 100644
index 0000000..67801e5
--- /dev/null
+++ b/version.properties
@@ -0,0 +1,36 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2017-2020 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+#
+###
+
+# Versioning variables
+# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )
+# because they are used in Jenkins, whose plug-in doesn't support
+
+major=4
+minor=2
+patch=0
+
+base_version=${major}.${minor}.${patch}
+
+# Release must be completed with git revision # in Jenkins
+release_version=${base_version}
+snapshot_version=${base_version}-SNAPSHOT \ No newline at end of file