1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. (c) OPNFV, Intel Corporation and others.
7 Barometer has enabled the following collectd plugins:
9 * dpdkstat plugin: A read plugin that retrieve stats from the DPDK extended
12 * `ceilometer plugin`_: A write plugin that pushes the retrieved stats to
13 Ceilometer. It's capable of pushing any stats read through collectd to
14 Ceilometer, not just the DPDK stats.
16 * hugepages plugin: A read plugin that retrieves the number of available
17 and free hugepages on a platform as well as what is available in terms of
20 * RDT plugin: A read plugin that provides the last level cache utilitzation and
21 memory bandwidth utilization
23 * Open vSwitch events Plugin: A read plugin that retrieves events from OVS.
25 All the plugins above are available on the collectd master, except for the
26 ceilometer plugin as it's a python based plugin and only C plugins are accepted
27 by the collectd community. The ceilometer plugin lives in the OpenStack
30 Other plugins under development or existing as a pull request into collectd master:
32 * dpdkevents: A read plugin that retrieves DPDK link status and DPDK
33 forwarding cores liveliness status (DPDK Keep Alive).
35 * Open vSwitch stats Plugin: A read plugin that retrieve flow and interface
38 * mcelog plugin: A read plugin that uses mcelog client protocol to check for
39 memory Machine Check Exceptions and sends the stats for reported exceptions.
41 * SNMP write: A write plugin that will act as a SNMP subagent and will map
42 collectd metrics to relavent OIDs. Will only support SNMP: get, getnext and
45 * Legacy/IPMI: A read plugin that will report platform thermals, voltages,
48 Building collectd with the Barometer plugins and installing the dependencies
49 =============================================================================
53 The plugins that have been merged to the baromter master branch can all be
54 built and configured through the barometer repository.
56 **Note**: sudo permissions are required to install collectd.
58 **Note**: These are instructions for Ubuntu 16.04.
60 To build and install these dependencies, clone the barometer repo:
64 $ git clone https://gerrit.opnfv.org/gerrit/barometer
66 Install the build dependencies
70 $ ./src/install_build_deps.sh
72 To install collectd as a service and install all it's dependencies:
76 $ cd barometer/src && sudo make && sudo make install
78 This will install collectd as a service and the base install directory
81 Sample configuration files can be found in '/opt/collectd/etc/collectd.conf.d'
83 Please note if you are using any Open vSwitch plugins you need to run:
87 $ sudo ovs-vsctl set-manager ptcp:6640
89 DPDK statistics plugin
90 -----------------------
91 Repo: https://github.com/collectd/collectd
93 Dependencies: DPDK (http://dpdk.org/)
95 To build and install DPDK to /usr please see:
96 https://github.com/collectd/collectd/blob/master/docs/BUILD.dpdkstat.md
98 Building and installing collectd:
102 $ git clone https://github.com/collectd/collectd.git
105 $ ./configure --enable-syslog --enable-logfile --enable-debug
110 This will install collectd to /opt/collectd
111 The collectd configuration file can be found at /opt/collectd/etc
112 To configure the hugepages plugin you need to modify the configuration file to
120 ProcessType "secondary"
122 EnabledPortMask 0xffff
125 For more information on the plugin parameters, please see:
126 https://github.com/collectd/collectd/blob/master/src/collectd.conf.pod
128 Please note if you are configuring collectd with the **static DPDK library**
129 you must compile the DPDK library with the -fPIC flag:
133 $ make EXTRA_CFLAGS=-fPIC
135 You must also modify the configuration step when building collectd:
139 $ ./configure CFLAGS=" -lpthread -Wl,--whole-archive -Wl,-ldpdk -Wl,-lm -Wl,-lrt -Wl,-lpcap -Wl,-ldl -Wl,--no-whole-archive"
141 Please also note that if you are not building and installing DPDK system-wide
142 you will need to specify the specific paths to the header files and libraries
143 using LIBDPDK_CPPFLAGS and LIBDPDK_LDFLAGS. You will also need to add the DPDK
144 library symbols to the shared library path using ldconfig. Note that this
145 update to the shared library path is not persistant (i.e. it will not survive a
146 reboot). Pending a merge of https://github.com/collectd/collectd/pull/2073.
150 $ ./configure LIBDPDK_CPPFLAGS="path to DPDK header files" LIBDPDK_LDFLAGS="path to DPDK libraries"
155 Repo: https://github.com/collectd/collectd
157 Dependencies: None, but assumes hugepages are configured.
159 To configure some hugepages:
163 sudo mkdir -p /mnt/huge
164 sudo mount -t hugetlbfs nodev /mnt/huge
165 sudo echo 14336 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
167 Building and installing collectd:
171 $ git clone https://github.com/collectd/collectd.git
174 $ ./configure --enable-syslog --enable-logfile --enable-hugepages --enable-debug
178 This will install collectd to /opt/collectd
179 The collectd configuration file can be found at /opt/collectd/etc
180 To configure the hugepages plugin you need to modify the configuration file to
191 ValuesPercentage false
194 For more information on the plugin parameters, please see:
195 https://github.com/collectd/collectd/blob/master/src/collectd.conf.pod
199 Repo: https://github.com/collectd/collectd
203 * PQoS/Intel RDT library https://github.com/01org/intel-cmt-cat.git
206 Building and installing PQoS/Intel RDT library:
210 $ git clone https://github.com/01org/intel-cmt-cat.git
211 $ cd intel-cmt-cat.git
213 $ make install PREFIX=/usr
215 Building and installing collectd:
219 $ git clone https://github.com/collectd/collectd.git
222 $ ./configure --enable-syslog --enable-logfile --with-libpqos=/usr/ --enable-debug
226 This will install collectd to /opt/collectd
227 The collectd configuration file can be found at /opt/collectd/etc
228 To configure the RDT plugin you need to modify the configuration file to
233 <LoadPlugin intel_rdt>
240 For more information on the plugin parameters, please see:
241 https://github.com/collectd/collectd/blob/master/src/collectd.conf.pod
243 Installing collectd as a service
244 --------------------------------
245 Collectd service scripts are available in the collectd/contrib directory.
246 To install collectd as a service:
250 $ sudo cp contrib/systemd.collectd.service /etc/systemd/system/
251 $ cd /etc/systemd/system/
252 $ sudo mv systemd.collectd.service collectd.service
253 $ sudo chmod +x collectd.service
255 Modify collectd.service
260 ExecStart=/opt/collectd/sbin/collectd
261 EnvironmentFile=-/opt/collectd/etc/
262 EnvironmentFile=-/opt/collectd/etc/
263 CapabilityBoundingSet=CAP_SETUID CAP_SETGID
269 $ sudo systemctl daemon-reload
270 $ sudo systemctl start collectd.service
271 $ sudo systemctl status collectd.service should show success
273 Additional useful plugins
274 --------------------------
277 Can be used to show you when notifications are being generated by calling a
278 bash script that dumps notifications to file. (handy for debug). Modify
279 /opt/collectd/etc/collectd.conf:
285 # Exec "user:group" "/path/to/exec"
286 NotificationExec "user" "<path to barometer>/barometer/src/collectd/collectd_sample_configs/write_notification.sh"
289 write_notification.sh (just writes the notification passed from exec through
290 STDIN to a file (/tmp/notifications)):
295 rm -f /tmp/notifications
298 echo $x$y >> /tmp/notifications
301 output to /tmp/notifications should look like:
311 TypeInstance:link_status
312 uuid:f2aafeec-fa98-4e76-aec5-18ae9fc74589
314 linkstate of "br-ex" interface has been changed to "DOWN"
318 Can be used to log collectd activity. Modify /opt/collectd/etc/collectd.conf to
326 File "/var/log/collectd.log"
331 Monitoring Interfaces and Openstack Support
332 -------------------------------------------
333 .. Figure:: monitoring_interfaces.png
335 Monitoring Interfaces and Openstack Support
337 The figure above shows the DPDK L2 forwarding application running on a compute
338 node, sending and receiving traffic. collectd is also running on this compute
339 node retrieving the stats periodically from DPDK through the dpdkstat plugin
340 and publishing the retrieved stats to Ceilometer through the ceilometer plugin.
342 To see this demo in action please checkout: `Barometer OPNFV Summit demo`_
346 [1] https://collectd.org/wiki/index.php/Naming_schema
347 [2] https://github.com/collectd/collectd/blob/master/src/daemon/plugin.h
348 [3] https://collectd.org/wiki/index.php/Value_list_t
349 [4] https://collectd.org/wiki/index.php/Data_set
350 [5] https://collectd.org/documentation/manpages/types.db.5.shtml
351 [6] https://collectd.org/wiki/index.php/Data_source
352 [7] https://collectd.org/wiki/index.php/Meta_Data_Interface
354 .. _Barometer OPNFV Summit demo: https://prezi.com/kjv6o8ixs6se/software-fastpath-service-quality-metrics-demo/
355 .. _ceilometer plugin: https://github.com/openstack/collectd-ceilometer-plugin/tree/stable/mitaka