Updated documentation for stanalone context
[yardstick.git] / docs / testing / user / userguide / 08-grafana.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International
2 .. License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) 2016 Huawei Technologies Co.,Ltd and others
5
6 =================
7 Grafana dashboard
8 =================
9
10
11 Abstract
12 ========
13
14 This chapter describes the Yardstick grafana dashboard. The Yardstick grafana
15 dashboard can be found here: http://testresults.opnfv.org/grafana/
16
17
18 .. image:: images/login.png
19    :width: 800px
20    :alt: Yardstick grafana dashboard
21
22
23 Public access
24 =============
25
26 Yardstick provids a public account for accessing to the dashboard. The username
27 and password are both set to ‘opnfv’.
28
29
30 Testcase dashboard
31 ==================
32
33 For each test case, there is a dedicated dashboard. Shown here is the dashboard
34 of TC002.
35
36
37 .. image:: images/TC002.png
38    :width: 800px
39    :alt:TC002 dashboard
40
41 For each test case dashboard. On the top left, we have a dashboard selection,
42 you can switch to different test cases using this pull-down menu.
43
44 Underneath, we have a pod and scenario selection.
45 All the pods and scenarios that have ever published test data to the InfluxDB
46 will be shown here.
47
48 You can check multiple pods or scenarios.
49
50 For each test case, we have a short description and a link to detailed test
51 case information in Yardstick user guide.
52
53 Underneath, it is the result presentation section.
54 You can use the time period selection on the top right corner to zoom in or
55 zoom out the chart.
56
57
58 Administration access
59 =====================
60
61 For a user with administration rights it is easy to update and save any
62 dashboard configuration. Saved updates immediately take effect and become live.
63 This may cause issues like:
64
65 - Changes and updates made to the live configuration in Grafana can compromise
66   existing Grafana content in an unwanted, unpredicted or incompatible way.
67   Grafana as such is not version controlled, there exists one single Grafana
68   configuration per dashboard.
69 - There is a risk several people can disturb each other when doing updates to
70   the same Grafana dashboard at the same time.
71
72 Any change made by administrator should be careful.
73
74
75 Add a dashboard into yardstick grafana
76 ======================================
77
78 Due to security concern, users that using the public opnfv account are not able
79 to edit the yardstick grafana directly.It takes a few more steps for a
80 non-yardstick user to add a custom dashboard into yardstick grafana.
81
82 There are 6 steps to go.
83
84
85 .. image:: images/add.png
86    :width: 800px
87    :alt: Add a dashboard into yardstick grafana
88
89
90 1. You need to build a local influxdb and grafana, so you can do the work
91    locally. You can refer to How to deploy InfluxDB and Grafana locally wiki
92    page about how to do this.
93
94 2. Once step one is done, you can fetch the existing grafana dashboard
95    configuration file from the yardstick repository and import it to your local
96    grafana. After import is done, you grafana dashboard will be ready to use
97    just like the community’s dashboard.
98
99 3. The third step is running some test cases to generate test results and
100    publishing it to your local influxdb.
101
102 4. Now you have some data to visualize in your dashboard. In the fourth step,
103    it is time to create your own dashboard. You can either modify an existing
104    dashboard or try to create a new one from scratch. If you choose to modify
105    an existing dashboard then in the curtain menu of the existing dashboard do
106    a "Save As..." into a new dashboard copy instance, and then continue doing
107    all updates and saves within the dashboard copy.
108
109 5. When finished with all Grafana configuration changes in this temporary
110    dashboard then chose "export" of the updated dashboard copy into a JSON file
111    and put it up for review in Gerrit, in file
112    ``/yardstick/dashboard/Yardstick-TCxxx-yyyyyyyyyyyyy``.
113    For instance a typical default name of the file would be
114    ``Yardstick-TC001 Copy-1234567891234``.
115
116 6. Once you finish your dashboard, the next step is exporting the configuration
117    file and propose a patch into Yardstick. Yardstick team will review and
118    merge it into Yardstick repository. After approved review Yardstick team
119    will do an "import" of the JSON file and also a "save dashboard" as soon as
120    possible to replace the old live dashboard configuration.
121