viz_config = yaml.safe_load(f)
-for _, i in dash_config['dashboard']['viz'].items():
- intermediate_format, visState = vis_gen.generate(
- i, viz_config[i['viz-template']])
-
- searchSourceJSON = searchSourceJSON_gen.generate(
- i, viz_config[i['viz-template']], intermediate_format['index_pattern'])
-
- uiStateJSON = uiStateJSON_gen.generate(
- i, viz_config[i['viz-template']])
-
- # p(intermediate_format)
- # p(visState)
-
- VIZ_BODY = {
- 'type': 'visualization',
- 'visualization': {
- "title": None,
- "visState": None,
- "uiStateJSON": "{}",
- "description": None,
- "version": 1,
- "kibanaSavedObjectMeta": {
- "searchSourceJSON": None
+for dashboard_id, dashboard_content in dash_config.items():
+
+ for _, i in dash_config[dashboard_id]['viz'].items():
+ intermediate_format, visState = vis_gen.generate(
+ i, viz_config[i['viz-template']])
+
+ searchSourceJSON = searchSourceJSON_gen.generate(
+ i, viz_config[i['viz-template']],
+ intermediate_format['index_pattern'])
+
+ uiStateJSON = uiStateJSON_gen.generate(
+ i, viz_config[i['viz-template']])
+
+ # p(intermediate_format)
+ # p(visState)
+
+ VIZ_BODY = {
+ 'type': 'visualization',
+ 'visualization': {
+ "title": None,
+ "visState": None,
+ "uiStateJSON": "{}",
+ "description": None,
+ "version": 1,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": None
+ }
}
}
- }
-
- VIZ_BODY['visualization']['title'] = intermediate_format['title']
- VIZ_BODY['visualization']['visState'] = JSONToString(visState)
- VIZ_BODY['visualization']['uiStateJSON'] = JSONToString(uiStateJSON)
- VIZ_BODY['visualization']['description'] = intermediate_format['desc']
- VIZ_BODY['visualization']['kibanaSavedObjectMeta']['searchSourceJSON'] \
- = JSONToString(
- searchSourceJSON)
-
- p(VIZ_BODY)
- index = '.kibana'
- ES_ID = 'visualization:{}'.format(i['id'])
- res = es.index(index=index, doc_type='doc', id=ES_ID, body=VIZ_BODY)
- print(json.dumps(res, indent=4))
+ VIZ_BODY['visualization']['title'] = intermediate_format['title']
+ VIZ_BODY['visualization']['visState'] = JSONToString(visState)
+ VIZ_BODY['visualization']['uiStateJSON'] = JSONToString(uiStateJSON)
+ VIZ_BODY['visualization']['description'] = intermediate_format['desc']
+ VIZ_BODY['visualization']['kibanaSavedObjectMeta']['searchSourceJSON']\
+ = JSONToString(
+ searchSourceJSON)
-# Create and push dashboards
+ p(VIZ_BODY)
+ index = '.kibana'
+ ES_ID = 'visualization:{}'.format(i['id'])
+ res = es.index(index=index, doc_type='doc', id=ES_ID, body=VIZ_BODY)
+ print(json.dumps(res, indent=4))
+ # Create and push dashboards
-for _, i in dash_config.items():
DASH_BODY = {
'type': 'dashboard',
'dashboard': {
}
}
- DASH_BODY['dashboard']['title'] = i['title']
- DASH_BODY['dashboard']['description'] = i['desc']
+ DASH_BODY['dashboard']['title'] = dashboard_content['title']
+ DASH_BODY['dashboard']['description'] = dashboard_content['desc']
DASH_BODY['dashboard']['panelsJSON'] = JSONToString(
- dash_gen.generate(i['viz']))
+ dash_gen.generate(dashboard_content['viz']))
p(DASH_BODY)
index = '.kibana'
- ES_ID = 'dashboard:{}'.format(i['id'])
+ ES_ID = 'dashboard:{}'.format(dashboard_content['id'])
res = es.index(index=index, doc_type='doc', id=ES_ID, body=DASH_BODY)
print(json.dumps(res, indent=4))
-dashboard:
+bgpcep:
id: bgpcep
title: BGP and PCEP
desc: Dashboard for bgpcep project
id: bgpcep-features-oxygen
title: BGPCEP Features Oxygen
viz-template: opendaylight-test-feature
- job-name: bgpcep-csit-1node-userfeatures-all-oxygen
y-axis:
value_axes:
1:
id: bgpcep-features-fluorine
title: BGPCEP Features Fluorine
viz-template: opendaylight-test-feature
- job-name: bgpcep-csit-1node-userfeatures-all-fluorine
y-axis:
value_axes:
1:
title: BGP Update Rate Oxygen
desc: Test to measure controller BGP update rate
viz-template: opendaylight-test-performance
- job-name: bgpcep-csit-1node-bgp-ingest-mixed-all-oxygen
y-axis:
value_axes:
1:
title: BGP Update Rate Fluorine
desc: Test to measure controller BGP update rate
viz-template: opendaylight-test-performance
- job-name: bgpcep-csit-1node-bgp-ingest-mixed-all-fluorine
y-axis:
value_axes:
1:
w: 6
x: 6
y: 3
-dashboard:
+
+openflowplugin:
id: openflowplugin
title: OpenFlow
desc: Dashboard for openflowplugin project
id: openflowplugin-features-oxygen
title: OpenFlow Features Oxygen
viz-template: opendaylight-test-feature
- job-name: openflowplugin-csit-1node-flow-services-only-oxygen
y-axis:
value_axes:
1:
id: openflowplugin-features-fluorine
title: OpenFlow Features Fluorine
viz-template: opendaylight-test-feature
- job-name: openflowplugin-csit-1node-flow-services-only-fluorine
y-axis:
value_axes:
1:
id: openflowplugin-clustering-oxygen
title: OpenFlow Clustering Oxygen
viz-template: opendaylight-test-feature
- job-name: openflowplugin-csit-3node-clustering-only-oxygen
y-axis:
value_axes:
1:
id: openflowplugin-clustering-fluorine
title: OpenFlow Clustering Fluorine
viz-template: opendaylight-test-feature
- job-name: openflowplugin-csit-3node-clustering-only-fluorine
y-axis:
value_axes:
1:
title: OpenFlow Flow Add Rate Oxygen
desc: Test to measure controller flow add rate
viz-template: opendaylight-test-performance
- job-name: openflowplugin-csit-1node-perf-bulkomatic-only-oxygen
y-axis:
value_axes:
1:
title: OpenFlow Flow Add Rate Fluorine
desc: Test to measure controller flow add rate
viz-template: opendaylight-test-performance
- job-name: openflowplugin-csit-1node-perf-bulkomatic-only-fluorine
y-axis:
value_axes:
1:
title: OpenFlow Cluster Flow Add Rate Oxygen
desc: Test to measure controller flow add rate
viz-template: opendaylight-test-performance
- job-name: openflowplugin-csit-3node-clustering-perf-bulkomatic-only-oxygen
y-axis:
value_axes:
1:
title: OpenFlow Cluster Flow Add Rate Fluorine
desc: Test to measure controller flow add rate
viz-template: opendaylight-test-performance
- job-name: openflowplugin-csit-3node-clustering-perf-bulkomatic-only-fluorine
y-axis:
value_axes:
1: