From e06b7efed417389decbf043b5fa7bf7253652583 Mon Sep 17 00:00:00 2001 From: sebdet Date: Mon, 10 Feb 2020 15:51:07 +0100 Subject: Removal of ELK Removal of ELK stack in this repo as now we have clamp-dashboard repo to handle the images construction Issue-ID: CLAMP-483 Change-Id: Icdea709015a973acc6e7884b5444caa1ee3c8cc8 Signed-off-by: sebdet --- src/main/docker/elasticsearch/Dockerfile | 21 -- src/main/docker/elasticsearch/bin/init_sg.sh | 7 - .../docker/elasticsearch/config/elasticsearch.yml | 33 --- .../elasticsearch/config/sg/kirk-keystore.jks | Bin 4525 -> 0 bytes .../elasticsearch/config/sg/node-0-keystore.jks | Bin 4593 -> 0 bytes .../elasticsearch/config/sg/sg_action_groups.yml | 153 ----------- .../docker/elasticsearch/config/sg/sg_config.yml | 148 ---------- .../elasticsearch/config/sg/sg_internal_users.yml | 45 ---- .../docker/elasticsearch/config/sg/sg_roles.yml | 300 --------------------- .../elasticsearch/config/sg/sg_roles_mapping.yml | 34 --- .../docker/elasticsearch/config/sg/truststore.jks | Bin 1096 -> 0 bytes src/main/docker/elasticsearch/my-entrypoint.sh | 8 - src/main/docker/kibana/Dockerfile | 61 ----- src/main/docker/kibana/README.md | 0 src/main/docker/kibana/backup.py | 89 ------ .../kibana/conf/keystore/org.onap.clamp.crt.pem | 30 --- .../kibana/conf/keystore/org.onap.clamp.key.pem | 32 --- src/main/docker/kibana/conf/kibana.yml | 17 -- src/main/docker/kibana/restore.py | 115 -------- .../saved-objects/default/config/config-6.6.2.json | 1 - ...board-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json | 1 - ...ttern-04e06060-50bf-11e9-b3a3-7302725859d5.json | 1 - .../search/search-AWIk8yDIDjJ4k3sPXRbu.json | 1 - .../search/search-AWIk9P-qDjJ4k3sPXRcQ.json | 1 - .../search/search-AWIlAjTaDjJ4k3sPXRe1.json | 1 - .../search/search-AWJsTEvYr1AwiIiFoV6S.json | 1 - .../search/search-AWWh6CC3TSxbbr1lgyay.json | 1 - .../search/search-AWWh7d7sTSxbbr1lgyaz.json | 1 - .../search/search-AWWhVlbFTSxbbr1lgyap.json | 1 - .../search/search-AWXPmsmxr9U94x7rrLgV.json | 1 - ...ation-0ef409f0-38f8-11e9-beac-8d2beda26615.json | 1 - ...ation-2d36b0e0-38f6-11e9-beac-8d2beda26615.json | 1 - ...ation-9a1a6750-38f7-11e9-beac-8d2beda26615.json | 1 - ...ation-a9d9d120-38f8-11e9-beac-8d2beda26615.json | 1 - ...ation-ae8c22b0-3905-11e9-beac-8d2beda26615.json | 1 - ...ation-e1f0fa00-38f5-11e9-beac-8d2beda26615.json | 1 - ...ation-f724dfd0-38f6-11e9-beac-8d2beda26615.json | 1 - ...ation-fcc9a8b0-38f8-11e9-beac-8d2beda26615.json | 1 - src/main/docker/kibana/startup.sh | 106 -------- src/main/docker/logstash/Dockerfile | 36 --- src/main/docker/logstash/certs/aafca.pem | 26 -- src/main/docker/logstash/pipeline/logstash.conf | 269 ------------------ 42 files changed, 1549 deletions(-) delete mode 100644 src/main/docker/elasticsearch/Dockerfile delete mode 100644 src/main/docker/elasticsearch/bin/init_sg.sh delete mode 100644 src/main/docker/elasticsearch/config/elasticsearch.yml delete mode 100644 src/main/docker/elasticsearch/config/sg/kirk-keystore.jks delete mode 100644 src/main/docker/elasticsearch/config/sg/node-0-keystore.jks delete mode 100644 src/main/docker/elasticsearch/config/sg/sg_action_groups.yml delete mode 100644 src/main/docker/elasticsearch/config/sg/sg_config.yml delete mode 100644 src/main/docker/elasticsearch/config/sg/sg_internal_users.yml delete mode 100644 src/main/docker/elasticsearch/config/sg/sg_roles.yml delete mode 100644 src/main/docker/elasticsearch/config/sg/sg_roles_mapping.yml delete mode 100644 src/main/docker/elasticsearch/config/sg/truststore.jks delete mode 100644 src/main/docker/elasticsearch/my-entrypoint.sh delete mode 100644 src/main/docker/kibana/Dockerfile delete mode 100644 src/main/docker/kibana/README.md delete mode 100755 src/main/docker/kibana/backup.py delete mode 100644 src/main/docker/kibana/conf/keystore/org.onap.clamp.crt.pem delete mode 100644 src/main/docker/kibana/conf/keystore/org.onap.clamp.key.pem delete mode 100644 src/main/docker/kibana/conf/kibana.yml delete mode 100755 src/main/docker/kibana/restore.py delete mode 100644 src/main/docker/kibana/saved-objects/default/config/config-6.6.2.json delete mode 100644 src/main/docker/kibana/saved-objects/default/dashboard/dashboard-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json delete mode 100644 src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-04e06060-50bf-11e9-b3a3-7302725859d5.json delete mode 100644 src/main/docker/kibana/saved-objects/default/search/search-AWIk8yDIDjJ4k3sPXRbu.json delete mode 100644 src/main/docker/kibana/saved-objects/default/search/search-AWIk9P-qDjJ4k3sPXRcQ.json delete mode 100644 src/main/docker/kibana/saved-objects/default/search/search-AWIlAjTaDjJ4k3sPXRe1.json delete mode 100644 src/main/docker/kibana/saved-objects/default/search/search-AWJsTEvYr1AwiIiFoV6S.json delete mode 100644 src/main/docker/kibana/saved-objects/default/search/search-AWWh6CC3TSxbbr1lgyay.json delete mode 100644 src/main/docker/kibana/saved-objects/default/search/search-AWWh7d7sTSxbbr1lgyaz.json delete mode 100644 src/main/docker/kibana/saved-objects/default/search/search-AWWhVlbFTSxbbr1lgyap.json delete mode 100644 src/main/docker/kibana/saved-objects/default/search/search-AWXPmsmxr9U94x7rrLgV.json delete mode 100644 src/main/docker/kibana/saved-objects/default/visualization/visualization-0ef409f0-38f8-11e9-beac-8d2beda26615.json delete mode 100644 src/main/docker/kibana/saved-objects/default/visualization/visualization-2d36b0e0-38f6-11e9-beac-8d2beda26615.json delete mode 100644 src/main/docker/kibana/saved-objects/default/visualization/visualization-9a1a6750-38f7-11e9-beac-8d2beda26615.json delete mode 100644 src/main/docker/kibana/saved-objects/default/visualization/visualization-a9d9d120-38f8-11e9-beac-8d2beda26615.json delete mode 100644 src/main/docker/kibana/saved-objects/default/visualization/visualization-ae8c22b0-3905-11e9-beac-8d2beda26615.json delete mode 100644 src/main/docker/kibana/saved-objects/default/visualization/visualization-e1f0fa00-38f5-11e9-beac-8d2beda26615.json delete mode 100644 src/main/docker/kibana/saved-objects/default/visualization/visualization-f724dfd0-38f6-11e9-beac-8d2beda26615.json delete mode 100644 src/main/docker/kibana/saved-objects/default/visualization/visualization-fcc9a8b0-38f8-11e9-beac-8d2beda26615.json delete mode 100755 src/main/docker/kibana/startup.sh delete mode 100644 src/main/docker/logstash/Dockerfile delete mode 100644 src/main/docker/logstash/certs/aafca.pem delete mode 100644 src/main/docker/logstash/pipeline/logstash.conf (limited to 'src/main') diff --git a/src/main/docker/elasticsearch/Dockerfile b/src/main/docker/elasticsearch/Dockerfile deleted file mode 100644 index 24352429..00000000 --- a/src/main/docker/elasticsearch/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# https://github.com/elastic/elasticsearch-docker -FROM docker.elastic.co/elasticsearch/elasticsearch-oss:6.6.2 - -COPY config/sg/ config/sg/ -COPY config/ config/ -COPY bin/ bin/ -#RUN chmod +x bin/init_sg.sh -COPY my-entrypoint.sh /usr/local/bin/my-entrypoint.sh -RUN chmod a+x /usr/local/bin/my-entrypoint.sh -# Search Guard plugin -RUN elasticsearch-plugin install --batch com.floragunn:search-guard-6:6.6.2-25.1 \ - && chmod +x plugins/search-guard-6/tools/*.sh \ - && chown -R elasticsearch config/sg/ \ - && chmod -R go= config/sg/ - -# Add your elasticsearch plugins setup here -# Example: RUN elasticsearch-plugin install analysis-icu - -# This custom entrypoint script is used instead of -# the original's /usr/local/bin/docker-entrypoint.sh -ENTRYPOINT ["bash","-c","my-entrypoint.sh"] \ No newline at end of file diff --git a/src/main/docker/elasticsearch/bin/init_sg.sh b/src/main/docker/elasticsearch/bin/init_sg.sh deleted file mode 100644 index 1c4e607c..00000000 --- a/src/main/docker/elasticsearch/bin/init_sg.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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/elasticsearch.yml b/src/main/docker/elasticsearch/config/elasticsearch.yml deleted file mode 100644 index 4d46ca01..00000000 --- a/src/main/docker/elasticsearch/config/elasticsearch.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -## Default Elasticsearch configuration from elasticsearch-docker. -## from https://github.com/elastic/elasticsearch-docker/blob/master/.tedi/template/elasticsearch.yml -# -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 - -## Use single node discovery in order to disable production mode and avoid bootstrap checks -## see https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html -# -discovery.type: single-node - -## X-Pack settings -## see https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-xpack.html -# -#xpack.license.self_generated.type: basic -#xpack.security.enabled: false - -## Search Guard -# -searchguard.enterprise_modules_enabled: false - -searchguard.ssl.transport.keystore_filepath: sg/node-0-keystore.jks -searchguard.ssl.transport.truststore_filepath: sg/truststore.jks -searchguard.ssl.transport.enforce_hostname_verification: false - -searchguard.authcz.admin_dn: - - "CN=kirk,OU=client,O=client,l=tEst,C=De" diff --git a/src/main/docker/elasticsearch/config/sg/kirk-keystore.jks b/src/main/docker/elasticsearch/config/sg/kirk-keystore.jks deleted file mode 100644 index dd7562ef..00000000 Binary files a/src/main/docker/elasticsearch/config/sg/kirk-keystore.jks and /dev/null differ diff --git a/src/main/docker/elasticsearch/config/sg/node-0-keystore.jks b/src/main/docker/elasticsearch/config/sg/node-0-keystore.jks deleted file mode 100644 index 5693b7bf..00000000 Binary files a/src/main/docker/elasticsearch/config/sg/node-0-keystore.jks and /dev/null differ diff --git a/src/main/docker/elasticsearch/config/sg/sg_action_groups.yml b/src/main/docker/elasticsearch/config/sg/sg_action_groups.yml deleted file mode 100644 index 38ffef02..00000000 --- a/src/main/docker/elasticsearch/config/sg/sg_action_groups.yml +++ /dev/null @@ -1,153 +0,0 @@ -UNLIMITED: - readonly: true - permissions: - - "*" - -###### INDEX LEVEL ###### - -INDICES_ALL: - readonly: true - permissions: - - "indices:*" - -# for backward compatibility -ALL: - readonly: true - permissions: - - INDICES_ALL - -MANAGE: - readonly: true - permissions: - - "indices:monitor/*" - - "indices:admin/*" - -CREATE_INDEX: - readonly: true - permissions: - - "indices:admin/create" - - "indices:admin/mapping/put" - -MANAGE_ALIASES: - readonly: true - permissions: - - "indices:admin/aliases*" - -INDEX_OWNER: - - CREATE_INDEX - - CRUD - -# for backward compatibility -MONITOR: - readonly: true - permissions: - - INDICES_MONITOR - -INDICES_MONITOR: - readonly: true - permissions: - - "indices:monitor/*" - -DATA_ACCESS: - readonly: true - permissions: - - "indices:data/*" - - CRUD - -WRITE: - readonly: true - permissions: - - "indices:data/write*" - - "indices:admin/mapping/put" - -READ: - readonly: true - permissions: - - "indices:data/read*" - - "indices:admin/mappings/fields/get*" - -DELETE: - readonly: true - permissions: - - "indices:data/write/delete*" - -CRUD: - readonly: true - permissions: - - READ - - WRITE - -SEARCH: - readonly: true - permissions: - - "indices:data/read/search*" - - "indices:data/read/msearch*" - - SUGGEST - -SUGGEST: - readonly: true - permissions: - - "indices:data/read/suggest*" - -INDEX: - readonly: true - permissions: - - "indices:data/write/index*" - - "indices:data/write/update*" - - "indices:admin/mapping/put" - - "indices:data/write/bulk*" - -GET: - readonly: true - permissions: - - "indices:data/read/get*" - - "indices:data/read/mget*" - -###### CLUSTER LEVEL ###### - -CLUSTER_ALL: - readonly: true - permissions: - - "cluster:*" - -CLUSTER_MONITOR: - readonly: true - permissions: - - "cluster:monitor/*" - -CLUSTER_COMPOSITE_OPS_RO: - readonly: true - permissions: - - "indices:data/read/mget" - - "indices:data/read/msearch" - - "indices:data/read/mtv" - - "indices:admin/aliases/exists*" - - "indices:admin/aliases/get*" - - "indices:data/read/scroll" - -CLUSTER_COMPOSITE_OPS: - readonly: true - permissions: - - "indices:data/write/bulk" - - "indices:admin/aliases*" - - "indices:data/write/reindex" - - CLUSTER_COMPOSITE_OPS_RO - -MANAGE_SNAPSHOTS: - readonly: true - permissions: - - "cluster:admin/snapshot/*" - - "cluster:admin/repository/*" - -# CLAMPDASHBOARD ELASTICSEARCH ENTRYPOINT -GET_TEMPLATE: - - "indices:admin/template/get" -PUT_TEMPLATE: - - "indices:admin/template/put" -TEMPLATE_OWNER: - - GET_TEMPLATE - - PUT_TEMPLATE -ES_INPUT: - - TEMPLATE_OWNER - - WRITE - - MONITOR diff --git a/src/main/docker/elasticsearch/config/sg/sg_config.yml b/src/main/docker/elasticsearch/config/sg/sg_config.yml deleted file mode 100644 index 9a16a823..00000000 --- a/src/main/docker/elasticsearch/config/sg/sg_config.yml +++ /dev/null @@ -1,148 +0,0 @@ -# This is the main Search Guard configuration file where authentication -# and authorization is defined. -# -# You need to configure at least one authentication domain in the authc of this file. -# An authentication domain is responsible for extracting the user credentials from -# the request and for validating them against an authentication backend like Active Directory for example. -# -# If more than one authentication domain is configured the first one which succeeds wins. -# If all authentication domains fail then the request is unauthenticated. -# In this case an exception is thrown and/or the HTTP status is set to 401. -# -# After authentication authorization (authz) will be applied. There can be zero or more authorizers which collect -# the roles from a given backend for the authenticated user. -# -# Both, authc and auth can be enabled/disabled separately for REST and TRANSPORT layer. Default is true for both. -# http_enabled: true -# transport_enabled: true -# -# 5.x Migration: "enabled: true/false" will also be respected currently but only to provide backward compatibility. -# -# For HTTP it is possible to allow anonymous authentication. If that is the case then the HTTP authenticators try to -# find user credentials in the HTTP request. If credentials are found then the user gets regularly authenticated. -# If none can be found the user will be authenticated as an "anonymous" user. This user has always the username "sg_anonymous" -# and one role named "sg_anonymous_backendrole". -# If you enable anonymous authentication all HTTP authenticators will not challenge. -# -# -# Note: If you define more than one HTTP authenticators make sure to put non-challenging authenticators like "proxy" or "clientcert" -# first and the challenging one last. -# Because it's not possible to challenge a client with two different authentication methods (for example -# Kerberos and Basic) only one can have the challenge flag set to true. You can cope with this situation -# by using pre-authentication, e.g. sending a HTTP Basic authentication header in the request. -# -# Default value of the challenge flag is true. -# -# -# HTTP -# basic (challenging) -# proxy (not challenging, needs xff) -# clientcert (not challenging, needs https) -# host (not challenging) #DEPRECATED, will be removed in a future version. -# host based authentication is configurable in sg_roles_mapping - -# Authc -# internal -# noop - -# Authz -# noop -# -# Some SearchGuard functionality is licensed under Apache-2.0, while other functionality is non-free; -# see https://github.com/floragunncom/search-guard. The functionality enabled in this configuration -# file only include those that are licensed under Apache-2.0. Please use care and review SearchGuard's -# license details before enabling any additional features here. - - -searchguard: - dynamic: - # Set filtered_alias_mode to 'disallow' to forbid more than 2 filtered aliases per index - # Set filtered_alias_mode to 'warn' to allow more than 2 filtered aliases per index but warns about it (default) - # Set filtered_alias_mode to 'nowarn' to allow more than 2 filtered aliases per index silently - #filtered_alias_mode: warn - #kibana: - # see https://github.com/floragunncom/search-guard-docs/blob/master/multitenancy.md - # To make this work you need to install https://github.com/floragunncom/search-guard-module-kibana-multitenancy/wiki - #multitenancy_enabled: true - #server_username: kibanaserver - #index: '.kibana' - #do_not_fail_on_forbidden: false - http: - anonymous_auth_enabled: false - xff: - enabled: false - internalProxies: '192\.168\.0\.10|192\.168\.0\.11' # regex pattern - #internalProxies: '.*' # trust all internal proxies, regex pattern - remoteIpHeader: 'x-forwarded-for' - proxiesHeader: 'x-forwarded-by' - #trustedProxies: '.*' # trust all external proxies, regex pattern - ###### see https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html for regex help - ###### more information about XFF https://en.wikipedia.org/wiki/X-Forwarded-For - ###### and here https://tools.ietf.org/html/rfc7239 - ###### and https://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Remote_IP_Valve - authc: - basic_internal_auth_domain: - http_enabled: true - transport_enabled: true - order: 4 - http_authenticator: - type: basic - challenge: true - authentication_backend: - type: intern - proxy_auth_domain: - http_enabled: false - transport_enabled: false - order: 3 - http_authenticator: - type: proxy - challenge: false - config: - user_header: "x-proxy-user" - roles_header: "x-proxy-roles" - authentication_backend: - type: noop - jwt_auth_domain: - http_enabled: false - transport_enabled: false - order: 0 - http_authenticator: - type: jwt - challenge: false - config: - signing_key: "base64 encoded HMAC key or public RSA/ECDSA pem key" - jwt_header: "Authorization" - jwt_url_parameter: null - roles_key: null - subject_key: null - authentication_backend: - type: noop - clientcert_auth_domain: - http_enabled: false - transport_enabled: false - order: 2 - http_authenticator: - type: clientcert - config: - username_attribute: cn #optional, if omitted DN becomes username - challenge: false - authentication_backend: - type: noop - authz: -# auth_failure_listeners: -# ip_rate_limiting: -# type: ip -# allowed_tries: 10 -# time_window_seconds: 3600 -# block_expiry_seconds: 600 -# max_blocked_clients: 100000 -# max_tracked_clients: 100000 -# internal_authentication_backend_limiting: -# type: username -# authentication_backend: intern -# allowed_tries: 10 -# time_window_seconds: 3600 -# block_expiry_seconds: 600 -# max_blocked_clients: 100000 -# max_tracked_clients: 100000 - \ No newline at end of file diff --git a/src/main/docker/elasticsearch/config/sg/sg_internal_users.yml b/src/main/docker/elasticsearch/config/sg/sg_internal_users.yml deleted file mode 100644 index 1712d379..00000000 --- a/src/main/docker/elasticsearch/config/sg/sg_internal_users.yml +++ /dev/null @@ -1,45 +0,0 @@ -# This is the internal user database -# The hash value is a bcrypt hash and can be generated with plugin/tools/hash.sh - -#password is: admin -admin: - readonly: true - hash: $2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JDymv..TOG - roles: - - admin - attributes: - #no dots allowed in attribute names - attribute1: value1 - attribute2: value2 - attribute3: value3 - -#password is: logstash -logstash: - hash: $2a$12$u1ShR4l4uBS3Uv59Pa2y5.1uQuZBrZtmNfqB3iM/.jL0XoV9sghS2 - roles: - - logstash - -#password is: kibanaserver -kibanaserver: - readonly: true - hash: $2a$12$4AcgAt3xwOWadA5s5blL6ev39OXDNhmOesEoo33eZtrq2N0YrU3H. - -#password is: kibanaro -kibanaro: - hash: $2a$12$JJSXNfTowz7Uu5ttXfeYpeYE0arACvcwlPBStB1F.MI7f0U9Z4DGC - roles: - - kibanauser - - readall - -#password is: readall -readall: - hash: $2a$12$ae4ycwzwvLtZxwZ82RmiEunBbIPiAmGZduBAjKN0TXdwQFtCwARz2 - #password is: readall - roles: - - readall - -#password is: snapshotrestore -snapshotrestore: - hash: $2y$12$DpwmetHKwgYnorbgdvORCenv4NAK8cPUg8AI6pxLCuWf/ALc0.v7W - roles: - - snapshotrestore \ No newline at end of file diff --git a/src/main/docker/elasticsearch/config/sg/sg_roles.yml b/src/main/docker/elasticsearch/config/sg/sg_roles.yml deleted file mode 100644 index 1a3a80ce..00000000 --- a/src/main/docker/elasticsearch/config/sg/sg_roles.yml +++ /dev/null @@ -1,300 +0,0 @@ -#: -# cluster: -# - '' -# indices: -# '': -# '': -# - '' -# _dls_: '' -# _fls_: -# - '' -# - '' - -# When a user make a request to Elasticsearch then the following roles will be evaluated to see if the user has -# permissions for the request. A request is always associated with an action and is executed against and index (or alias) -# and a type. If a request is executed against all indices (or all types) then the asterix ('*') is needed. -# Every role a user has will be examined if it allows the action against an index (or type). At least one role must match -# for the request to be successful. If no role match then the request will be denied. Currently a match must happen within -# one single role - that means that permissions can not span multiple roles. - -# For , and simple wildcards and regular expressions are possible. -# A asterix (*) will match any character sequence (or an empty sequence) -# A question mark (?) will match any single character (but NOT empty character) -# Example: '*my*index' will match 'my_first_index' as well as 'myindex' but not 'myindex1' -# Example: '?kibana' will match '.kibana' but not 'kibana' - -# To use a full blown regex you have to pre- and apend a '/' to use regex instead of simple wildcards -# '//' -# Example: '/\S*/' will match any non whitespace characters - -# Important: -# Index, alias or type names can not contain dots (.) in the or expression. -# Reason is that we currently parse the config file into a elasticsearch settings object which cannot cope with dots in keys. -# Workaround: Just configure something like '?kibana' instead of '.kibana' or 'my?index' instead of 'my.index' -# This limitation will likely removed with Search Guard 6 -# -# Some SearchGuard functionality is licensed under Apache-2.0, while other functionality is non-free; -# see https://github.com/floragunncom/search-guard. The functionality enabled in this configuration -# file only include those that are licensed under Apache-2.0. Please use care and review SearchGuard's -# license details before enabling any additional features here. - -# Allows everything, but no changes to searchguard configuration index -sg_all_access: - readonly: true - cluster: - - UNLIMITED - indices: - '*': - '*': - - UNLIMITED - tenants: - admin_tenant: RW - -# Read all, but no write permissions -sg_readall: - readonly: true - cluster: - - CLUSTER_COMPOSITE_OPS_RO - indices: - '*': - '*': - - READ - -# Read all and monitor, but no write permissions -sg_readall_and_monitor: - cluster: - - CLUSTER_MONITOR - - CLUSTER_COMPOSITE_OPS_RO - indices: - '*': - '*': - - READ - -# For users which use kibana, access to indices must be granted separately -sg_kibana_user: - readonly: true - cluster: - - INDICES_MONITOR - - CLUSTER_COMPOSITE_OPS - indices: - '?kibana': - '*': - - MANAGE - - INDEX - - READ - - DELETE - '?kibana-6': - '*': - - MANAGE - - INDEX - - READ - - DELETE - '?kibana_*': - '*': - - MANAGE - - INDEX - - READ - - DELETE - '?tasks': - '*': - - INDICES_ALL - '?management-beats': - '*': - - INDICES_ALL - '*': - '*': - - indices:data/read/field_caps* - - indices:data/read/xpack/rollup* - - indices:admin/mappings/get* - - indices:admin/get - -# For the kibana server -sg_kibana_server: - readonly: true - cluster: - - CLUSTER_MONITOR - - CLUSTER_COMPOSITE_OPS - - cluster:admin/xpack/monitoring* - - indices:admin/template* - - indices:data/read/scroll* - indices: - '?kibana': - '*': - - INDICES_ALL - '?kibana-6': - '*': - - INDICES_ALL - '?kibana_*': - '*': - - INDICES_ALL - '?reporting*': - '*': - - INDICES_ALL - '?monitoring*': - '*': - - INDICES_ALL - '?tasks': - '*': - - INDICES_ALL - '?management-beats*': - '*': - - INDICES_ALL - '*': - '*': - - "indices:admin/aliases*" - -# For logstash and beats -sg_logstash: - cluster: - - ES_INPUT - - CLUSTER_MONITOR - - CLUSTER_COMPOSITE_OPS - - indices:admin/template/get - - indices:admin/template/put - indices: - 'logstash-*': - '*': - - INDEX_OWNER - '*beat*': - '*': - - INDEX_OWNER - 'dmaap*': - '*': - - INDEX_OWNER - 'events*': - '*': - - INDEX_OWNER - 'errors*': - '*': - - INDEX_OWNER - -# Allows adding and modifying repositories and creating and restoring snapshots -sg_manage_snapshots: - cluster: - - MANAGE_SNAPSHOTS - indices: - '*': - '*': - - "indices:data/write/index" - - "indices:admin/create" - -# Allows each user to access own named index -sg_own_index: - cluster: - - CLUSTER_COMPOSITE_OPS - indices: - '${user_name}': - '*': - - INDICES_ALL - -### X-Pack COMPATIBILITY -sg_xp_monitoring: - readonly: true - cluster: - - cluster:monitor/xpack/info - - cluster:monitor/main - - cluster:admin/xpack/monitoring/bulk - indices: - '?monitor*': - '*': - - INDICES_ALL - -sg_xp_alerting: - readonly: true - cluster: - - indices:data/read/scroll - - cluster:admin/xpack/watcher* - - cluster:monitor/xpack/watcher* - indices: - '?watches*': - '*': - - INDICES_ALL - '?watcher-history-*': - '*': - - INDICES_ALL - '?triggered_watches': - '*': - - INDICES_ALL - '*': - '*': - - READ - - indices:admin/aliases/get - -sg_xp_machine_learning: - readonly: true - cluster: - - cluster:admin/persistent* - - cluster:internal/xpack/ml* - - indices:data/read/scroll* - - cluster:admin/xpack/ml* - - cluster:monitor/xpack/ml* - indices: - '*': - '*': - - READ - - indices:admin/get* - '?ml-*': - '*': - - "*" - - -### LEGACY ROLES, FOR COMPATIBILITY ONLY -### WILL BE REMOVED IN SG7, DO NOT USE ANYMORE - -sg_readonly_and_monitor: - cluster: - - CLUSTER_MONITOR - - CLUSTER_COMPOSITE_OPS_RO - indices: - '*': - '*': - - READ - -# Make xpack monitoring work -sg_monitor: - cluster: - - cluster:admin/xpack/monitoring/* - - cluster:admin/ingest/pipeline/put - - cluster:admin/ingest/pipeline/get - - indices:admin/template/get - - indices:admin/template/put - - CLUSTER_MONITOR - - CLUSTER_COMPOSITE_OPS - indices: - '?monitor*': - '*': - - INDICES_ALL - '?marvel*': - '*': - - INDICES_ALL - '?kibana*': - '*': - - READ - '*': - '*': - - indices:data/read/field_caps - -# Make xpack alerting work -sg_alerting: - cluster: - - indices:data/read/scroll - - cluster:admin/xpack/watcher/watch/put - - cluster:admin/xpack/watcher* - - CLUSTER_MONITOR - - CLUSTER_COMPOSITE_OPS - indices: - '?kibana*': - '*': - - READ - '?watches*': - '*': - - INDICES_ALL - '?watcher-history-*': - '*': - - INDICES_ALL - '?triggered_watches': - '*': - - INDICES_ALL - '*': - '*': - - READ diff --git a/src/main/docker/elasticsearch/config/sg/sg_roles_mapping.yml b/src/main/docker/elasticsearch/config/sg/sg_roles_mapping.yml deleted file mode 100644 index 45bb7755..00000000 --- a/src/main/docker/elasticsearch/config/sg/sg_roles_mapping.yml +++ /dev/null @@ -1,34 +0,0 @@ -# In this file users, backendroles and hosts can be mapped to Search Guard roles. -# Permissions for Search Guard roles are configured in sg_roles.yml - -sg_all_access: - readonly: true - backendroles: - - admin - -sg_logstash: - backendroles: - - logstash - -sg_kibana_server: - readonly: true - users: - - kibanaserver - -sg_kibana_user: - backendroles: - - kibanauser - -sg_readall: - readonly: true - backendroles: - - readall - -sg_manage_snapshots: - readonly: true - backendroles: - - snapshotrestore - -sg_own_index: - users: - - '*' \ No newline at end of file diff --git a/src/main/docker/elasticsearch/config/sg/truststore.jks b/src/main/docker/elasticsearch/config/sg/truststore.jks deleted file mode 100644 index 7a1b59a8..00000000 Binary files a/src/main/docker/elasticsearch/config/sg/truststore.jks and /dev/null differ diff --git a/src/main/docker/elasticsearch/my-entrypoint.sh b/src/main/docker/elasticsearch/my-entrypoint.sh deleted file mode 100644 index 9eee64e0..00000000 --- a/src/main/docker/elasticsearch/my-entrypoint.sh +++ /dev/null @@ -1,8 +0,0 @@ -source init_sg.sh - -while [ $? -ne 0 ]; do - sleep 10 - source init_sg.sh -done & - -/bin/bash -c "source /usr/local/bin/docker-entrypoint.sh;" diff --git a/src/main/docker/kibana/Dockerfile b/src/main/docker/kibana/Dockerfile deleted file mode 100644 index 21e89252..00000000 --- a/src/main/docker/kibana/Dockerfile +++ /dev/null @@ -1,61 +0,0 @@ -### -# ============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============================================ -# =================================================================== -# -### - -FROM docker.elastic.co/kibana/kibana-oss:6.6.2 - -# Search Guard plugin -RUN kibana-plugin install https://repo1.maven.org/maven2/com/floragunn/search-guard-kibana-plugin/6.6.2-18.4/search-guard-kibana-plugin-6.6.2-18.4.zip - -MAINTAINER "The Onap Team" -LABEL Description="Kibana image with saved objects loading and Search Guard support" -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 deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/docker/kibana/backup.py b/src/main/docker/kibana/backup.py deleted file mode 100755 index b1e45181..00000000 --- a/src/main/docker/kibana/backup.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/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 deleted file mode 100644 index ce630d43..00000000 --- a/src/main/docker/kibana/conf/keystore/org.onap.clamp.crt.pem +++ /dev/null @@ -1,30 +0,0 @@ -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 deleted file mode 100644 index fcf68bfa..00000000 --- a/src/main/docker/kibana/conf/keystore/org.onap.clamp.key.pem +++ /dev/null @@ -1,32 +0,0 @@ -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: ------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 deleted file mode 100644 index cfec41e3..00000000 --- a/src/main/docker/kibana/conf/kibana.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# 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 - -## Search Guard -# -#xpack.security.enabled: false -elasticsearch.username: kibanaserver -elasticsearch.password: kibanaserver - -searchguard.cookie.password: 123567818187654rwrwfsfshdhdhtegdhfzftdhncn \ No newline at end of file diff --git a/src/main/docker/kibana/restore.py b/src/main/docker/kibana/restore.py deleted file mode 100755 index eee2e6b7..00000000 --- a/src/main/docker/kibana/restore.py +++ /dev/null @@ -1,115 +0,0 @@ -#!/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 deleted file mode 100644 index 41aee482..00000000 --- a/src/main/docker/kibana/saved-objects/default/config/config-6.6.2.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 76670d24..00000000 --- a/src/main/docker/kibana/saved-objects/default/dashboard/dashboard-e12b9f50-3a83-11e9-ba41-bb0c8f21f2f4.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 5f277210..00000000 --- a/src/main/docker/kibana/saved-objects/default/index-pattern/index-pattern-04e06060-50bf-11e9-b3a3-7302725859d5.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 0b3d3e94..00000000 --- a/src/main/docker/kibana/saved-objects/default/search/search-AWIk8yDIDjJ4k3sPXRbu.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 9e8916a4..00000000 --- a/src/main/docker/kibana/saved-objects/default/search/search-AWIk9P-qDjJ4k3sPXRcQ.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 0f569da8..00000000 --- a/src/main/docker/kibana/saved-objects/default/search/search-AWIlAjTaDjJ4k3sPXRe1.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 75989328..00000000 --- a/src/main/docker/kibana/saved-objects/default/search/search-AWJsTEvYr1AwiIiFoV6S.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 38f58c07..00000000 --- a/src/main/docker/kibana/saved-objects/default/search/search-AWWh6CC3TSxbbr1lgyay.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 5da483d1..00000000 --- a/src/main/docker/kibana/saved-objects/default/search/search-AWWh7d7sTSxbbr1lgyaz.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index b4c78149..00000000 --- a/src/main/docker/kibana/saved-objects/default/search/search-AWWhVlbFTSxbbr1lgyap.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 81fcaf1c..00000000 --- a/src/main/docker/kibana/saved-objects/default/search/search-AWXPmsmxr9U94x7rrLgV.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index a9f177a9..00000000 --- a/src/main/docker/kibana/saved-objects/default/visualization/visualization-0ef409f0-38f8-11e9-beac-8d2beda26615.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 91a3bcfa..00000000 --- a/src/main/docker/kibana/saved-objects/default/visualization/visualization-2d36b0e0-38f6-11e9-beac-8d2beda26615.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index b2dfa4b6..00000000 --- a/src/main/docker/kibana/saved-objects/default/visualization/visualization-9a1a6750-38f7-11e9-beac-8d2beda26615.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 40f3b087..00000000 --- a/src/main/docker/kibana/saved-objects/default/visualization/visualization-a9d9d120-38f8-11e9-beac-8d2beda26615.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 281fed3d..00000000 --- a/src/main/docker/kibana/saved-objects/default/visualization/visualization-ae8c22b0-3905-11e9-beac-8d2beda26615.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 86a44d99..00000000 --- a/src/main/docker/kibana/saved-objects/default/visualization/visualization-e1f0fa00-38f5-11e9-beac-8d2beda26615.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 189595f5..00000000 --- a/src/main/docker/kibana/saved-objects/default/visualization/visualization-f724dfd0-38f6-11e9-beac-8d2beda26615.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 15165b57..00000000 --- a/src/main/docker/kibana/saved-objects/default/visualization/visualization-fcc9a8b0-38f8-11e9-beac-8d2beda26615.json +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100755 index a232706e..00000000 --- a/src/main/docker/kibana/startup.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/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 deleted file mode 100644 index 73988dc7..00000000 --- a/src/main/docker/logstash/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -### -# ============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============================================ -# =================================================================== -# -### -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 deleted file mode 100644 index cf12ec4c..00000000 --- a/src/main/docker/logstash/certs/aafca.pem +++ /dev/null @@ -1,26 +0,0 @@ ------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 deleted file mode 100644 index 5c1d47d1..00000000 --- a/src/main/docker/logstash/pipeline/logstash.conf +++ /dev/null @@ -1,269 +0,0 @@ -# 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 - } - } -} -- cgit 1.2.3-korg