aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/docker/kibana/restore.py
diff options
context:
space:
mode:
authorac2550 <ac2550@intl.att.com>2018-10-09 16:43:55 +0200
committerac2550 <ac2550@intl.att.com>2018-10-09 16:45:29 +0200
commit97705c8390a93a745a84e5a80d1f7f146d979099 (patch)
treebc295907e081d0c324e468195022fc2fcec36fa0 /src/main/docker/kibana/restore.py
parent50fbbca6bd81cd03ea54b29ac948522dc1f71bb1 (diff)
Restore ELK5.x configuration on ELK6.x
Issue-ID: CLAMP-226 Change-Id: Ibc45fb78aae271d275c89c8a6723fa9f0a95fcb0 Signed-off-by: ac2550 <ac2550@intl.att.com>
Diffstat (limited to 'src/main/docker/kibana/restore.py')
-rwxr-xr-xsrc/main/docker/kibana/restore.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/docker/kibana/restore.py b/src/main/docker/kibana/restore.py
index f58701bba..70f430c57 100755
--- a/src/main/docker/kibana/restore.py
+++ b/src/main/docker/kibana/restore.py
@@ -90,7 +90,10 @@ def main():
obj_id = obj['id']
for key in ('id', 'version', 'type', 'updated_at'):
- del obj[key]
+ 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)