Merge "[functest] Skip RDT tests if on a virtual node"
[barometer.git] / docs / release / configguide / postinstall.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 ======================================
5 Barometer post installation procedures
6 ======================================
7 This document describes briefly the methods of validating the Barometer installation.
8
9 Automated post installation activities
10 --------------------------------------
11 The Barometer test-suite in Functest is called ``barometercollectd`` and is part of the ``Features``
12 tier.  Running these tests is done automatically by the OPNFV deployment pipeline on the supported
13 scenarios.  The testing consists of basic verifications that each plugin is functional per their
14 default configurations.  Inside the Functest container, the detailed results can be found in the
15 ``/home/opnfv/functest/results/barometercollectd.log``.
16
17 Barometer post configuration procedures
18 ---------------------------------------
19 The functionality for each plugin (such as enabling/disabling and configuring its capabilities)
20 is controlled as described in the User Guide through their individual ``.conf`` file located in
21 the ``/etc/collectd/collectd.conf.d/`` folder on the compute node(s).  In order for any changes to
22 take effect, the collectd service must be stopped and then started again.
23
24 Platform components validation - Apex
25 -------------------------------------
26 The following steps describe how to perform a simple "manual" testing of the Barometer components:
27
28 On the controller:
29
30 1. Get a list of the available metrics:
31
32    .. code::
33
34       $ openstack metric list
35
36 2. Take note of the ID of the metric of interest, and show the measures of this metric:
37
38    .. code::
39
40       $ openstack metric measures show <metric_id>
41
42 3. Watch the measure list for updates to verify that metrics are being added:
43
44    .. code:: bash
45
46       $ watch –n2 –d openstack metric measures show <metric_id>
47
48 More on testing and displaying metrics is shown below.
49
50 On the compute:
51
52 1. Connect to any compute node and ensure that the collectd service is running.  The log file
53    ``collectd.log`` should contain no errors and should indicate that each plugin was successfully
54    loaded.  For example, from the Jump Host:
55
56    .. code:: bash
57
58        $ opnfv-util overcloud compute0
59        $ ls /etc/collectd/collectd.conf.d/
60        $ systemctl status collectd
61        $ vi /opt/stack/collectd.log
62
63    The following plugings should be found loaded:
64    aodh, gnocchi, hugepages, intel_rdt, mcelog, ovs_events, ovs_stats, snmp, virt
65
66 2. On the compute node, induce an event monitored by the plugins; e.g. a corrected memory error:
67
68    .. code:: bash
69
70       $ git clone https://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git
71       $ cd mce-inject
72       $ make
73       $ modprobe mce-inject
74
75    Modify the test/corrected script to include the following:
76
77    .. code:: bash
78
79       CPU 0 BANK 0
80       STATUS 0xcc00008000010090
81       ADDR 0x0010FFFFFFF
82
83    Inject the error:
84
85    .. code:: bash
86
87       $ ./mce-inject < test/corrected
88
89 3. Connect to the controller and query the monitoring services.  Make sure the overcloudrc.v3
90    file has been copied to the controller (from the undercloud VM or from the Jump Host) in order
91    to be able to authenticate for OpenStack services.
92
93    .. code:: bash
94
95       $ opnfv-util overcloud controller0
96       $ su
97       $ source overcloudrc.v3
98       $ gnocchi metric list
99       $ aodh alarm list
100
101    The output for the gnocchi and aodh queries should be similar to the excerpts below:
102
103    .. code:: bash
104
105       +--------------------------------------+---------------------+------------------------------------------------------------------------------------------------------------+-----------+-------------+
106       | id                                   | archive_policy/name | name                                                                                                       | unit      | resource_id |
107       +--------------------------------------+---------------------+------------------------------------------------------------------------------------------------------------+-----------+-------------+
108         [...]
109       | 0550d7c1-384f-4129-83bc-03321b6ba157 | high                | overcloud-novacompute-0.jf.intel.com-hugepages-mm-2048Kb@vmpage_number.free                                | Pages     | None        |
110       | 0cf9f871-0473-4059-9497-1fea96e5d83a | high                | overcloud-novacompute-0.jf.intel.com-hugepages-node0-2048Kb@vmpage_number.free                             | Pages     | None        |
111       | 0d56472e-99d2-4a64-8652-81b990cd177a | high                | overcloud-novacompute-0.jf.intel.com-hugepages-node1-1048576Kb@vmpage_number.used                          | Pages     | None        |
112       | 0ed71a49-6913-4e57-a475-d30ca2e8c3d2 | high                | overcloud-novacompute-0.jf.intel.com-hugepages-mm-1048576Kb@vmpage_number.used                             | Pages     | None        |
113       | 11c7be53-b2c1-4c0e-bad7-3152d82c6503 | high                | overcloud-novacompute-0.jf.intel.com-mcelog-                                                               | None      | None        |
114       |                                      |                     | SOCKET_0_CHANNEL_any_DIMM_any@errors.uncorrected_memory_errors_in_24h                                      |           |             |
115       | 120752d4-385e-4153-aed8-458598a2a0e0 | high                | overcloud-novacompute-0.jf.intel.com-cpu-24@cpu.interrupt                                                  | jiffies   | None        |
116       | 1213161e-472e-4e1b-9e56-5c6ad1647c69 | high                | overcloud-novacompute-0.jf.intel.com-cpu-6@cpu.softirq                                                     | jiffies   | None        |
117         [...]
118
119       +--------------------------------------+-------+------------------------------------------------------------------+-------+----------+---------+
120       | alarm_id                             | type  | name                                                             | state | severity | enabled |
121       +--------------------------------------+-------+------------------------------------------------------------------+-------+----------+---------+
122       | fbd06539-45dd-42c5-a991-5c5dbf679730 | event | gauge.memory_erros(overcloud-novacompute-0.jf.intel.com-mcelog)  | ok    | moderate | True    |
123       | d73251a5-1c4e-4f16-bd3d-377dd1e8cdbe | event | gauge.mcelog_status(overcloud-novacompute-0.jf.intel.com-mcelog) | ok    | moderate | True    |
124         [...]
125
126
127 Platform components validation - Compass4nfv
128 --------------------------------------------
129
130 The procedure is similar to the above.
131
132 The following steps describe how to perform a simple "manual" testing of the Barometer components:
133
134 On the compute:
135
136 1. Connect to any compute node and ensure that the collectd service is running. The log file
137    ``collectd.log`` should contain no errors and should indicate that each plugin was successfully
138    loaded. For example, ssh into a compute node and test:
139
140    .. code:: bash
141
142        $ ls /etc/collectd/collectd.conf.d/
143        $ systemctl status collectd
144        $ vi /var/log/collectd.log
145
146    The following plugings should be found loaded:
147    aodh, gnocchi, hugepages, mcelog, ovs_events, ovs_stats, cpu, interface, memory, disk, numa, virt, rrdtool
148
149 2. Testing using mce-inject is similar to #2 shown above.
150
151 On the controller:
152
153 3. Connect to the controller and query the monitoring services. Make sure to log in to the lxc-utility
154 container before using the OpenStack CLI. Please refer to this wiki for details:
155 https://wiki.opnfv.org/display/compass4nfv/Containerized+Compass#ContainerizedCompass-HowtouseOpenStackCLI
156
157    .. code:: bash
158
159       $ source ~/openrc
160       $ gnocchi metric list
161       $ aodh alarm list
162
163    The output for the gnocchi and aodh queries should be similar to the excerpts shown in #3 above.