1 .. This work is licensed under a Creative Commons Attribution 4.0 International
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, 2016 Huawei Technologies Co.,Ltd and others.
6 ==============================================
7 Store Other Project's Test Results in InfluxDB
8 ==============================================
13 .. _Framework: https://wiki.opnfv.org/download/attachments/6827660/wiki.png?version=1&modificationDate=1470298075000&api=v2
15 This chapter illustrates how to run plug-in test cases and store test results
16 into community's InfluxDB. The framework is shown in Framework_.
19 .. image:: images/InfluxDB_store.png
21 :alt: Store Other Project's Test Results in InfluxDB
23 Store Storperf Test Results into Community's InfluxDB
24 =====================================================
26 .. _Influxdb: https://git.opnfv.org/cgit/yardstick/tree/yardstick/dispatcher/influxdb.py
27 .. _Mingjiang: mailto:limingjiang@huawei.com
28 .. _Visual: https://wiki.opnfv.org/download/attachments/6827660/tc074.PNG?version=1&modificationDate=1470298075000&api=v2
29 .. _Login: http://testresults.opnfv.org/grafana/login
31 As shown in Framework_, there are two ways to store Storperf test results
32 into community's InfluxDB:
34 1. Yardstick executes Storperf test case (TC074), posting test job to Storperf
35 container via ReST API. After the test job is completed, Yardstick reads
36 test results via ReST API from Storperf and posts test data to the influxDB.
38 2. Additionally, Storperf can run tests by itself and post the test result
39 directly to the InfluxDB. The method for posting data directly to influxDB
40 will be supported in the future.
42 Our plan is to support rest-api in D release so that other testing projects can
43 call the rest-api to use yardstick dispatcher service to push data to
44 Yardstick's InfluxDB database.
46 For now, InfluxDB only supports line protocol, and the json protocol is
49 Take ping test case for example, the ``raw_result`` is json format like this:
53 "timestamp": 1470315409.868095,
65 With the help of "influxdb_line_protocol", the json is transform to like below
68 'ping,deploy_scenario=unknown,host=athena.demo,installer=unknown,pod_name=unknown,
69 runner_id=2625,scenarios=Ping,target=ares.demo,task_id=77755f38-1f6a-4667-a7f3-
70 301c99963656,version=unknown rtt.ares=1.125 1470315409868094976'
72 So, for data output of json format, you just need to transform json into line
73 format and call influxdb api to post the data into the database. All this
74 function has been implemented in Influxdb_. If you need support on this, please
78 curl -i -XPOST 'http://104.197.68.199:8086/write?db=yardstick' --
79 data-binary 'ping,deploy_scenario=unknown,host=athena.demo,installer=unknown, ...'
81 Grafana will be used for visualizing the collected test data, which is shown in
82 Visual_. Grafana can be accessed by Login_.
85 .. image:: images/results_visualization.png
87 :alt: results visualization