lines = file.readlines()
props = lines[0].strip().split(',')
vals = lines[1].strip().split(',')
- BODY['plots'][key][props[0]] = float(vals[0])
- BODY['plots'][key][props[1]] = float(vals[1])
- BODY['plots'][key][props[2]] = float(vals[2])
+ for i in range(len(props)):
+ BODY['plots'][key][props[i]] = float(vals[i])
# Fill the required parameters whose values are obtained from environment.
- datetime.strptime(starttime, '%Y%m%d %H:%M:%S.%f')
BODY['duration'] = str(elap_time)
- BODY = {
- 'type': BODY['test-type'],
- BODY['test-type']: BODY
- }
-
return BODY
# Try to send request to ELK DB.
try:
- index = '{}-{}'.format(BODY[BODY['type']]['project'],
- BODY[BODY['type']]['subject'])
- ES_ID = '{}:{}-{}'.format(BODY['type'], BODY[BODY['type']]
- ['test-name'], BODY[BODY['type']]['test-run'])
+ index = '{}-{}'.format(BODY['project'],
+ BODY['subject'])
+ ES_ID = '{}:{}-{}'.format(BODY['test-type'], BODY['test-name'],
+ BODY['test-run'])
res = es.index(index=index, doc_type='doc', id=ES_ID, body=BODY)
print(json.dumps(res, indent=4))
except Exception as e:
INDEX_PATTERN_BODY = {
"type": "index-pattern",
"index-pattern": {
- "timeFieldName": "performance.@timestamp",
- "title": '{}-{}'.format(BODY[BODY['type']]['project'],
- BODY[BODY['type']]['subject'])
+ "timeFieldName": "@timestamp",
+ "title": '{}-{}'.format(BODY['project'],
+ BODY['subject'])
}
}
KIBANA_CONFIG = {'config': {
- 'defaultIndex': 'pattern-for-{}-{}'.format(BODY[BODY['type']]['project'],
- BODY[BODY['type']]['subject']),
+ 'defaultIndex': 'pattern-for-{}-{}'.format(BODY['project'],
+ BODY['subject']),
'timepicker:timeDefaults': '{\n "from": "now-5y",\n \
"to": "now",\n "mode": "quick"\n}',
'xPackMonitoring:showBanner': False},
try:
index = '.kibana'
ES_ID = 'index-pattern:pattern-for-{}-{}'.format(
- BODY[BODY['type']]['project'], BODY[BODY['type']]['subject'])
+ BODY['project'], BODY['subject'])
res = es.index(index=index, doc_type='doc',
id=ES_ID, body=INDEX_PATTERN_BODY)
p(json.dumps(INDEX_PATTERN_BODY, indent=4))
values: from default
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: bgpcep-csit-1node-userfeatures-all-oxygen
co_ords:
h: 3
values: from default
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: bgpcep-csit-1node-userfeatures-all-fluorine
co_ords:
h: 3
title: BGP updates/sec
series:
1:
- field: performance.plots.totals-bgp.+10/-9 routes per UPDATE
- label: Config DS
+ field: plots.performance-bgp.+10/-9 routes per UPDATE
+ label: +10/-9 routes per UPDATE
color: red
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: bgpcep-csit-1node-bgp-ingest-mixed-all-oxygen
co_ords:
h: 3
title: BGP updates/sec
series:
1:
- field: performance.plots.totals-bgp.+10/-9 routes per UPDATE
- label: Config DS
+ field: plots.performance-bgp.+10/-9 routes per UPDATE
+ label: +10/-9 routes per UPDATE
color: red
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: bgpcep-csit-1node-bgp-ingest-mixed-all-fluorine
co_ords:
h: 3
values: from default
filter:
1:
- field: performance.test-name
- match-with: openflowplugin-csit-1node-flow-services-only-oxygen
+ field: test-name
+ match-with: openflowplugin-csit-1node-flow-services-all-oxygen
co_ords:
h: 3
w: 6
values: from default
filter:
1:
- field: performance.test-name
- match-with: openflowplugin-csit-1node-flow-services-only-fluorine
+ field: test-name
+ match-with: openflowplugin-csit-1node-flow-services-all-fluorine
co_ords:
h: 3
w: 6
values: from default
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: openflowplugin-csit-3node-clustering-only-oxygen
co_ords:
h: 3
values: from default
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: openflowplugin-csit-3node-clustering-only-fluorine
co_ords:
h: 3
title: flowmods/sec
series:
1:
- field: performance.plots.rate.Config DS
+ field: plots.rate.Config DS
label: Config DS
color: red
2:
- field: performance.plots.rate.OVS Switch
+ field: plots.rate.OVS Switch
label: OVS Switch
color: green
3:
- field: performance.plots.rate.Operational DS
+ field: plots.rate.Operational DS
label: Operational DS
color: blue
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: openflowplugin-csit-1node-perf-bulkomatic-only-oxygen
co_ords:
h: 3
title: flowmods/sec
series:
1:
- field: performance.plots.rate.Config DS
+ field: plots.rate.Config DS
label: Config DS
color: red
2:
- field: performance.plots.rate.OVS Switch
+ field: plots.rate.OVS Switch
label: OVS Switch
color: green
3:
- field: performance.plots.rate.Operational DS
+ field: plots.rate.Operational DS
label: Operational DS
color: blue
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: openflowplugin-csit-1node-perf-bulkomatic-only-fluorine
co_ords:
h: 3
title: flowmods/sec
series:
1:
- field: performance.plots.rate.Config DS
+ field: plots.rate.Config DS
label: Config DS
color: red
2:
- field: performance.plots.rate.OVS Switch
+ field: plots.rate.OVS Switch
label: OVS Switch
color: green
3:
- field: performance.plots.rate.Operational DS
+ field: plots.rate.Operational DS
label: Operational DS
color: blue
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: openflowplugin-csit-3node-clustering-perf-bulkomatic-only-oxygen
co_ords:
h: 3
title: flowmods/sec
series:
1:
- field: performance.plots.rate.Config DS
+ field: plots.rate.Config DS
label: Config DS
color: red
2:
- field: performance.plots.rate.OVS Switch
+ field: plots.rate.OVS Switch
label: OVS Switch
color: green
3:
- field: performance.plots.rate.Operational DS
+ field: plots.rate.Operational DS
label: Operational DS
color: blue
filter:
1:
- field: performance.test-name
+ field: test-name
match-with: openflowplugin-csit-3node-clustering-perf-bulkomatic-only-fluorine
co_ords:
h: 3