]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
tools: Add dashboard transformation script wip-prometheus 151/head
authorBoris Ranto <branto@redhat.com>
Wed, 6 Dec 2017 21:10:20 +0000 (22:10 +0100)
committerBoris Ranto <branto@redhat.com>
Mon, 11 Dec 2017 16:59:51 +0000 (17:59 +0100)
Signed-off-by: Boris Ranto <branto@redhat.com>
tools/trans.py [new file with mode: 0755]

diff --git a/tools/trans.py b/tools/trans.py
new file mode 100755 (executable)
index 0000000..5d5c31d
--- /dev/null
@@ -0,0 +1,17 @@
+#! /usr/bin/env python
+
+import sys
+import json
+
+fin = open(sys.argv[1])
+a = json.loads(fin.read())
+fin.close()
+
+b = {
+    'meta': {},
+    'dashboard': a,
+}
+
+fout = open(sys.argv[1], "w")
+fout.write(json.dumps(b, indent=3))
+fout.close()