Enabling dpdk_telemetry plugin
[barometer.git] / docs / release / userguide / feature.userguide.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. (c) <optionally add copywriters name>
4
5 ===================================
6 OPNFV Barometer User Guide
7 ===================================
8
9 Barometer collectd plugins description
10 ---------------------------------------
11 .. Describe the specific features and how it is realised in the scenario in a brief manner
12 .. to ensure the user understand the context for the user guide instructions to follow.
13
14 Collectd is a daemon which collects system performance statistics periodically
15 and provides a variety of mechanisms to publish the collected metrics. It
16 supports more than 90 different input and output plugins. Input plugins
17 retrieve metrics and publish them to the collectd deamon, while output plugins
18 publish the data they receive to an end point. collectd also has infrastructure
19 to support thresholding and notification.
20
21 Barometer has enabled the following collectd plugins:
22
23 * *dpdkstat plugin*: A read plugin that retrieves stats from the DPDK extended
24   NIC stats API.
25
26 * *dpdkevents plugin*:  A read plugin that retrieves DPDK link status and DPDK
27   forwarding cores liveliness status (DPDK Keep Alive).
28
29 * *dpdk_telemetry plugin*:  A read plugin to collect dpdk interface stats and
30   application or global stats from dpdk telemetry library. Both 'dpdkstat' and
31   'dpdk_telemetry' plugins provides dpdk NIC Stats, but only 'dpdk_telemetry'
32   provides the DPDK Application stats. So in other words, 'dpdk_telemetry' is
33   an advanced version of dpdkstat. This plugin don't deal with dpdk events.
34   So not in related with 'dpdkevents' plugin. The mimimum dpdk version required
35   to use this plugin is 19.08.
36
37 .. note::
38   dpdpkstat and dpdk_telemetry should not be used together. Use dpdk_telemetry
39   if your version of dpdk supports it (i.e. DPDK >= 19.08) and use dpdkstat otherwise.
40   dpdkstat, dpdkevents and dpdk_telemetry plugins should only be used if your dpdk
41   application doesn't already have more relevant metrics available(e.g.ovs_stats).
42
43
44 * `gnocchi plugin`_: A write plugin that pushes the retrieved stats to
45   Gnocchi. It's capable of pushing any stats read through collectd to
46   Gnocchi, not just the DPDK stats.
47
48 * `aodh plugin`_: A notification plugin that pushes events to Aodh, and
49   creates/updates alarms appropriately.
50
51 * *hugepages plugin*:  A read plugin that retrieves the number of available
52   and free hugepages on a platform as well as what is available in terms of
53   hugepages per socket.
54
55 * *Open vSwitch events Plugin*: A read plugin that retrieves events from OVS.
56
57 * *Open vSwitch stats Plugin*: A read plugin that retrieves flow and interface
58   stats from OVS.
59
60 * *mcelog plugin*: A read plugin that uses mcelog client protocol to check for
61   memory Machine Check Exceptions and sends the stats for reported exceptions.
62
63 * *PMU plugin*: A read plugin that provides performance counters data on
64   Intel CPUs using Linux perf interface.
65
66 * *RDT plugin*: A read plugin that provides the last level cache utilization and
67   memory bandwidth utilization.
68
69 * *virt*: A read plugin that uses virtualization API *libvirt* to gather
70   statistics about virtualized guests on a system directly from the hypervisor,
71   without a need to install collectd instance on the guest.
72
73 * *SNMP Agent*: A write plugin that will act as a AgentX subagent that receives
74   and handles queries from SNMP master agent and returns the data collected
75   by read plugins. The SNMP Agent plugin handles requests only for OIDs
76   specified in configuration file. To handle SNMP queries the plugin gets data
77   from collectd and translates requested values from collectd's internal format
78   to SNMP format. Supports SNMP: get, getnext and walk requests.
79
80 All the plugins above are available on the collectd main branch, except for
81 the Gnocchi and Aodh plugins as they are Python-based plugins and only C
82 plugins are accepted by the collectd community. The Gnocchi and Aodh plugins
83 live in the OpenStack repositories.
84
85 .. TODO: Update this to reflect merging of these PRs
86 Other plugins existing as a pull request into collectd main:
87
88 * *Legacy/IPMI*: A read plugin that reports platform thermals, voltages,
89   fanspeed, current, flow, power etc. Also, the plugin monitors Intelligent
90   Platform Management Interface (IPMI) System Event Log (SEL) and sends the
91   appropriate notifications based on monitored SEL events.
92
93 * *PCIe AER*: A read plugin that monitors PCIe standard and advanced errors and
94   sends notifications about those errors.
95
96
97 Third party application in Barometer repository:
98
99 * *Open vSwitch PMD stats*: An aplication that retrieves PMD stats from OVS. It is run
100   through exec plugin.
101
102 **Plugins and application included in the Euphrates release:**
103
104 Write Plugins: aodh plugin, SNMP agent plugin, gnocchi plugin.
105
106 Read Plugins/application: Intel RDT plugin, virt plugin, Open vSwitch stats plugin,
107 Open vSwitch PMD stats application.
108
109 Collectd capabilities and usage
110 ------------------------------------
111 .. Describe the specific capabilities and usage for <XYZ> feature.
112 .. Provide enough information that a user will be able to operate the feature on a deployed scenario.
113
114 .. note:: Plugins included in the OPNFV E release will be built-in for Apex integration
115  and can be configured as shown in the examples below.
116
117  The collectd plugins in OPNFV are configured with reasonable defaults, but can
118  be overridden.
119
120 Building all Barometer upstreamed plugins from scratch
121 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122 The plugins that have been merged to the collectd main branch can all be
123 built and configured through the barometer repository.
124
125 .. note::
126  * sudo permissions are required to install collectd.
127  * These instructions are for Centos 7.
128
129 To build all the upstream plugins, clone the barometer repo:
130
131 .. code:: c
132
133     $ git clone https://gerrit.opnfv.org/gerrit/barometer
134
135 To install collectd as a service and install all it's dependencies:
136
137 .. code:: bash
138
139     $ cd barometer/systems && ./build_base_machine.sh
140
141 This will install collectd as a service and the base install directory
142 will be /opt/collectd.
143
144 Sample configuration files can be found in '/opt/collectd/etc/collectd.conf.d'
145
146 .. note::
147   If you don't want to use one of the Barometer plugins, simply remove the
148   sample config file from '/opt/collectd/etc/collectd.conf.d'
149 .. note::
150   If you plan on using the Exec plugin (for OVS_PMD_STATS or for executing scripts
151   on notification generation), the plugin requires a non-root user to execute scripts.
152   By default, `collectd_exec` user is used in the exec.conf provided in the sample
153   configurations directory under src/collectd in the Barometer repo. These scripts *DO NOT* create this user.
154   You need to create this user or modify the configuration in the sample configurations directory
155   under src/collectd to use another existing non root user before  running build_base_machine.sh.
156
157 .. note::
158   If you are using any Open vSwitch plugins you need to run:
159
160 .. code:: bash
161
162     $ sudo ovs-vsctl set-manager ptcp:6640
163
164 After this, you should be able to start collectd as a service
165
166 .. code:: bash
167
168     $ sudo systemctl status collectd
169
170 If you want to use granfana to display the metrics you collect, please see:
171 `grafana guide`_
172
173 For more information on configuring and installing OpenStack plugins for
174 collectd, check out the `collectd-openstack-plugins GSG`_.
175
176 Below is the per plugin installation and configuration guide, if you only want
177 to install some/particular plugins.
178
179 DPDK plugins
180 ^^^^^^^^^^^^^
181 Repo: https://github.com/collectd/collectd
182
183 Branch: main
184
185 Dependencies: DPDK (http://dpdk.org/)
186
187 .. note:: DPDK statistics plugin requires DPDK version 16.04 or later.
188
189 To build and install DPDK to /usr please see:
190 https://github.com/collectd/collectd/blob/main/docs/BUILD.dpdkstat.md
191
192 Building and installing collectd:
193
194 .. code:: bash
195
196     $ git clone https://github.com/collectd/collectd.git
197     $ cd collectd
198     $ ./build.sh
199     $ ./configure --enable-syslog --enable-logfile --enable-debug
200     $ make
201     $ sudo make install
202
203 .. note:: If DPDK was installed in a non standard location you will need to
204     specify paths to the header files and libraries using *LIBDPDK_CPPFLAGS* and
205     *LIBDPDK_LDFLAGS*. You will also need to add the DPDK library symbols to the
206     shared library path using *ldconfig*. Note that this update to the shared
207     library path is not persistant (i.e. it will not survive a reboot).
208
209 Example of specifying custom paths to DPDK headers and libraries:
210
211 .. code:: bash
212
213     $ ./configure LIBDPDK_CPPFLAGS="path to DPDK header files" LIBDPDK_LDFLAGS="path to DPDK libraries"
214
215 This will install collectd to default folder ``/opt/collectd``. The collectd
216 configuration file (``collectd.conf``) can be found at ``/opt/collectd/etc``.
217 To configure the dpdkstats plugin you need to modify the configuration file to
218 include:
219
220 .. code:: bash
221
222     LoadPlugin dpdkstat
223     <Plugin dpdkstat>
224        Coremask "0xf"
225        ProcessType "secondary"
226        FilePrefix "rte"
227        EnabledPortMask 0xffff
228        PortName "interface1"
229        PortName "interface2"
230     </Plugin>
231
232
233 To configure the dpdkevents plugin you need to modify the configuration file to
234 include:
235
236 .. code:: bash
237
238     <LoadPlugin dpdkevents>
239       Interval 1
240     </LoadPlugin>
241
242     <Plugin "dpdkevents">
243       <EAL>
244         Coremask "0x1"
245         MemoryChannels "4"
246         FilePrefix "rte"
247       </EAL>
248       <Event "link_status">
249         SendEventsOnUpdate false
250         EnabledPortMask 0xffff
251         SendNotification true
252       </Event>
253       <Event "keep_alive">
254         SendEventsOnUpdate false
255         LCoreMask "0xf"
256         KeepAliveShmName "/dpdk_keepalive_shm_name"
257         SendNotification true
258       </Event>
259     </Plugin>
260
261 .. note:: Currently, the DPDK library doesn’t support API to de-initialize
262  the DPDK resources allocated on the initialization. It means, the collectd
263  plugin will not be able to release the allocated DPDK resources
264  (locks/memory/pci bindings etc.) correctly on collectd shutdown or reinitialize
265  the DPDK library if primary DPDK process is restarted. The only way to release
266  those resources is to terminate the process itself. For this reason, the plugin
267  forks off a separate collectd process. This child process becomes a secondary
268  DPDK process which can be run on specific CPU cores configured by user through
269  collectd configuration file (“Coremask” EAL configuration option, the
270  hexadecimal bitmask of the cores to run on).
271
272 For more information on the plugin parameters, please see:
273 https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod
274
275 .. note:: dpdkstat plugin initialization time depends on read interval. It
276  requires 5 read cycles to set up internal buffers and states, during that time
277  no statistics are submitted. Also, if plugin is running and the number of DPDK
278  ports is increased, internal buffers are resized. That requires 3 read cycles
279  and no port statistics are submitted during that time.
280
281 The Address-Space Layout Randomization (ASLR) security feature in Linux should be
282 disabled, in order for the same hugepage memory mappings to be present in all
283 DPDK multi-process applications.
284
285 To disable ASLR:
286
287 .. code:: bash
288
289     $ sudo echo 0 > /proc/sys/kernel/randomize_va_space
290
291 To fully enable ASLR:
292
293 .. code:: bash
294
295     $ sudo echo 2 > /proc/sys/kernel/randomize_va_space
296
297 .. warning:: Disabling Address-Space Layout Randomization (ASLR) may have security
298     implications. It is recommended to be disabled only when absolutely necessary,
299     and only when all implications of this change have been understood.
300
301 For more information on multi-process support, please see:
302 http://dpdk.org/doc/guides/prog_guide/multi_proc_support.html
303
304 **DPDK stats plugin limitations:**
305
306 1. The DPDK primary process application should use the same version of DPDK
307    that collectd DPDK plugin is using;
308
309 2. L2 statistics are only supported;
310
311 3. The plugin has been tested on Intel NIC’s only.
312
313 **DPDK stats known issues:**
314
315 * DPDK port visibility
316
317   When network port controlled by Linux is bound to DPDK driver, the port
318   will not be available in the OS. It affects the SNMP write plugin as those
319   ports will not be present in standard IF-MIB. Thus, additional work is
320   required to be done to support DPDK ports and statistics.
321
322 **DPDK telemetry plugin**
323
324 Please refer https://wiki.opnfv.org/display/fastpath/DPDK+Telemetry+Plugin
325
326 Hugepages Plugin
327 ^^^^^^^^^^^^^^^^^
328 Repo: https://github.com/collectd/collectd
329
330 Branch: main
331
332 Dependencies: None, but assumes hugepages are configured.
333
334 To configure some hugepages:
335
336 .. code:: bash
337
338    $ sudo mkdir -p /mnt/huge
339    $ sudo mount -t hugetlbfs nodev /mnt/huge
340    $ sudo bash -c "echo 14336 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages"
341
342 Building and installing collectd:
343
344 .. code:: bash
345
346     $ git clone https://github.com/collectd/collectd.git
347     $ cd collectd
348     $ ./build.sh
349     $ ./configure --enable-syslog --enable-logfile --enable-hugepages --enable-debug
350     $ make
351     $ sudo make install
352
353 This will install collectd to default folder ``/opt/collectd``. The collectd
354 configuration file (``collectd.conf``) can be found at ``/opt/collectd/etc``.
355 To configure the hugepages plugin you need to modify the configuration file to
356 include:
357
358 .. code:: bash
359
360     LoadPlugin hugepages
361     <Plugin hugepages>
362         ReportPerNodeHP  true
363         ReportRootHP     true
364         ValuesPages      true
365         ValuesBytes      false
366         ValuesPercentage false
367     </Plugin>
368
369 For more information on the plugin parameters, please see:
370 https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod
371
372 Intel PMU Plugin
373 ^^^^^^^^^^^^^^^^
374 Repo: https://github.com/collectd/collectd
375
376 Branch: main
377
378 Dependencies:
379
380   * PMU tools (jevents library) https://github.com/andikleen/pmu-tools
381
382 To be suitable for use in collectd plugin shared library *libjevents* should be
383 compiled as position-independent code. To do this add the following line to
384 *pmu-tools/jevents/Makefile*:
385
386 .. code:: bash
387
388     CFLAGS += -fPIC
389
390 Building and installing *jevents* library:
391
392 .. code:: bash
393
394     $ git clone https://github.com/andikleen/pmu-tools.git
395     $ cd pmu-tools/jevents/
396     $ make
397     $ sudo make install
398
399 Download the Hardware Events that are relevant to your CPU, download the appropriate
400 CPU event list json file:
401
402 .. code:: bash
403
404     $ wget https://raw.githubusercontent.com/andikleen/pmu-tools/main/event_download.py
405     $ python event_download.py
406
407 This will download the json files to the location: $HOME/.cache/pmu-events/. If you don't want to
408 download these files to the aforementioned location, set the environment variable XDG_CACHE_HOME to
409 the location you want the files downloaded to.
410
411 Building and installing collectd:
412
413 .. code:: bash
414
415     $ git clone https://github.com/collectd/collectd.git
416     $ cd collectd
417     $ ./build.sh
418     $ ./configure --enable-syslog --enable-logfile --with-libjevents=/usr/local --enable-debug
419     $ make
420     $ sudo make install
421
422 This will install collectd to default folder ``/opt/collectd``. The collectd
423 configuration file (``collectd.conf``) can be found at ``/opt/collectd/etc``.
424 To configure the PMU plugin you need to modify the configuration file to
425 include:
426
427 .. code:: bash
428
429     <LoadPlugin intel_pmu>
430       Interval 1
431     </LoadPlugin>
432     <Plugin "intel_pmu">
433       ReportHardwareCacheEvents true
434       ReportKernelPMUEvents true
435       ReportSoftwareEvents true
436       Cores ""
437     </Plugin>
438
439 If you want to monitor Intel CPU specific CPU events, make sure to enable the
440 additional two options shown below:
441
442 .. code:: bash
443
444     <Plugin intel_pmu>
445      ReportHardwareCacheEvents true
446      ReportKernelPMUEvents true
447      ReportSoftwareEvents true
448      EventList "$HOME/.cache/pmu-events/GenuineIntel-6-2D-core.json"
449      HardwareEvents "L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS" "L2_RQSTS.ALL_CODE_RD"
450      Cores ""
451     </Plugin>
452
453 .. note::
454     If you set XDG_CACHE_HOME to anything other than the variable above - you will need to modify
455     the path for the EventList configuration.
456
457 Use "Cores" option to monitor metrics only for configured cores. If an empty string is provided
458 as value for this field default cores configuration is applied - that is all available cores
459 are monitored separately. To limit monitoring to cores 0-7 set the option as shown below:
460
461 .. code:: bash
462
463     Cores "[0-7]"
464
465 For more information on the plugin parameters, please see:
466 https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod
467
468 .. note::
469
470     The plugin opens file descriptors whose quantity depends on number of
471     monitored CPUs and number of monitored counters. Depending on configuration,
472     it might be required to increase the limit on the number of open file
473     descriptors allowed. This can be done using 'ulimit -n' command. If collectd
474     is executed as a service 'LimitNOFILE=' directive should be defined in
475     [Service] section of *collectd.service* file.
476
477 Intel RDT Plugin
478 ^^^^^^^^^^^^^^^^
479 Repo: https://github.com/collectd/collectd
480
481 Branch: main
482
483 Dependencies:
484
485   * PQoS/Intel RDT library https://github.com/01org/intel-cmt-cat.git
486   * msr kernel module
487
488 Building and installing PQoS/Intel RDT library:
489
490 .. code:: bash
491
492     $ git clone https://github.com/01org/intel-cmt-cat.git
493     $ cd intel-cmt-cat
494     $ make
495     $ make install PREFIX=/usr
496
497 You will need to insert the msr kernel module:
498
499 .. code:: bash
500
501     $ modprobe msr
502
503 Building and installing collectd:
504
505 .. code:: bash
506
507     $ git clone https://github.com/collectd/collectd.git
508     $ cd collectd
509     $ ./build.sh
510     $ ./configure --enable-syslog --enable-logfile --with-libpqos=/usr/ --enable-debug
511     $ make
512     $ sudo make install
513
514 This will install collectd to default folder ``/opt/collectd``. The collectd
515 configuration file (``collectd.conf``) can be found at ``/opt/collectd/etc``.
516 To configure the RDT plugin you need to modify the configuration file to
517 include:
518
519 .. code:: bash
520
521     <LoadPlugin intel_rdt>
522       Interval 1
523     </LoadPlugin>
524     <Plugin "intel_rdt">
525       Cores ""
526     </Plugin>
527
528 For more information on the plugin parameters, please see:
529 https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod
530
531 IPMI Plugin
532 ^^^^^^^^^^^^
533 Repo: https://github.com/collectd/collectd
534
535 Branch: feat_ipmi_events, feat_ipmi_analog
536
537 Dependencies: OpenIPMI library (http://openipmi.sourceforge.net/)
538
539 The IPMI plugin is already implemented in the latest collectd and sensors
540 like temperature, voltage, fanspeed, current are already supported there.
541 The list of supported IPMI sensors has been extended and sensors like flow,
542 power are supported now. Also, a System Event Log (SEL) notification feature
543 has been introduced.
544
545 * The feat_ipmi_events branch includes new SEL feature support in collectd
546   IPMI plugin. If this feature is enabled, the collectd IPMI plugin will
547   dispatch notifications about new events in System Event Log.
548
549 * The feat_ipmi_analog branch includes the support of extended IPMI sensors in
550   collectd IPMI plugin.
551
552 **Install dependencies**
553
554 On Centos, install OpenIPMI library:
555
556 .. code:: bash
557
558     $ sudo yum install OpenIPMI ipmitool
559
560 Anyway, it's recommended to use the latest version of the OpenIPMI library as
561 it includes fixes of known issues which aren't included in standard OpenIPMI
562 library package. The latest version of the library can be found at
563 https://sourceforge.net/p/openipmi/code/ci/master/tree/. Steps to install the
564 library from sources are described below.
565
566 Remove old version of OpenIPMI library:
567
568 .. code:: bash
569
570     $ sudo yum remove OpenIPMI ipmitool
571
572 Build and install OpenIPMI library:
573
574 .. code:: bash
575
576     $ git clone https://git.code.sf.net/p/openipmi/code openipmi-code
577     $ cd openipmi-code
578     $ autoreconf --install
579     $ ./configure --prefix=/usr
580     $ make
581     $ sudo make install
582
583 Add the directory containing ``OpenIPMI*.pc`` files to the ``PKG_CONFIG_PATH``
584 environment variable:
585
586 .. code:: bash
587
588     export PKG_CONFIG_PATH=/usr/lib/pkgconfig
589
590 Enable IPMI support in the kernel:
591
592 .. code:: bash
593
594     $ sudo modprobe ipmi_devintf
595     $ sudo modprobe ipmi_si
596
597 .. note::
598   If HW supports IPMI, the ``/dev/ipmi0`` character device will be
599   created.
600
601 Clone and install the collectd IPMI plugin:
602
603 .. code:: bash
604
605     $ git clone https://github.com/collectd/collectd
606     $ cd collectd
607     $ ./build.sh
608     $ ./configure --enable-syslog --enable-logfile --enable-debug
609     $ make
610     $ sudo make install
611
612 This will install collectd to default folder ``/opt/collectd``. The collectd
613 configuration file (``collectd.conf``) can be found at ``/opt/collectd/etc``.
614 To configure the IPMI plugin you need to modify the file to include:
615
616 .. code:: bash
617
618     LoadPlugin ipmi
619     <Plugin ipmi>
620        <Instance "local">
621          SELEnabled true # only feat_ipmi_events branch supports this
622        </Instance>
623     </Plugin>
624
625 .. note::
626   By default, IPMI plugin will read all available analog sensor values,
627   dispatch the values to collectd and send SEL notifications.
628
629 For more information on the IPMI plugin parameters and SEL feature configuration,
630 please see: https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod
631
632 Extended analog sensors support doesn't require additional configuration. The usual
633 collectd IPMI documentation can be used:
634
635 - https://collectd.org/wiki/index.php/Plugin:IPMI
636 - https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_ipmi
637
638 IPMI documentation:
639
640 - https://www.kernel.org/doc/Documentation/IPMI.txt
641 - http://www.intel.com/content/www/us/en/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html
642
643 Mcelog Plugin
644 ^^^^^^^^^^^^^^
645 Repo: https://github.com/collectd/collectd
646
647 Branch: main
648
649 Dependencies: mcelog
650
651 Start by installing mcelog.
652
653 .. note::
654   The kernel has to have CONFIG_X86_MCE enabled. For 32bit kernels you
655   need atleast a 2.6,30 kernel.
656
657 On Centos:
658
659 .. code:: bash
660
661     $ sudo yum install mcelog
662
663 Or build from source
664
665 .. code:: bash
666
667     $ git clone https://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git
668     $ cd mcelog
669     $ make
670     ... become root ...
671     $ make install
672     $ cp mcelog.service /etc/systemd/system/
673     $ systemctl enable mcelog.service
674     $ systemctl start mcelog.service
675
676
677 Verify you got a /dev/mcelog. You can verify the daemon is running completely
678 by running:
679
680 .. code:: bash
681
682      $ mcelog --client
683
684 This should query the information in the running daemon. If it prints nothing
685 that is fine (no errors logged yet). More info @
686 http://www.mcelog.org/installation.html
687
688 Modify the mcelog configuration file "/etc/mcelog/mcelog.conf" to include or
689 enable:
690
691 .. code:: bash
692
693     socket-path = /var/run/mcelog-client
694     [dimm]
695     dimm-tracking-enabled = yes
696     dmi-prepopulate = yes
697     uc-error-threshold = 1 / 24h
698     ce-error-threshold = 10 / 24h
699
700     [socket]
701     socket-tracking-enabled = yes
702     mem-uc-error-threshold = 100 / 24h
703     mem-ce-error-threshold = 100 / 24h
704     mem-ce-error-log = yes
705
706     [page]
707     memory-ce-threshold = 10 / 24h
708     memory-ce-log = yes
709     memory-ce-action = soft
710
711     [trigger]
712     children-max = 2
713     directory = /etc/mcelog
714
715
716 Clone and install the collectd mcelog plugin:
717
718 .. code:: bash
719
720     $ git clone https://github.com/collectd/collectd
721     $ cd collectd
722     $ ./build.sh
723     $ ./configure --enable-syslog --enable-logfile --enable-debug
724     $ make
725     $ sudo make install
726
727 This will install collectd to default folder ``/opt/collectd``. The collectd
728 configuration file (``collectd.conf``) can be found at ``/opt/collectd/etc``.
729 To configure the mcelog plugin you need to modify the configuration file to
730 include:
731
732 .. code:: bash
733
734     <LoadPlugin mcelog>
735       Interval 1
736     </LoadPlugin>
737     <Plugin mcelog>
738       <Memory>
739         McelogClientSocket "/var/run/mcelog-client"
740         PersistentNotification false
741       </Memory>
742       #McelogLogfile "/var/log/mcelog"
743     </Plugin>
744
745 For more information on the plugin parameters, please see:
746 https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod
747
748 Simulating a Machine Check Exception can be done in one of 3 ways:
749
750 * Running $make test in the mcelog cloned directory - mcelog test suite
751 * using mce-inject
752 * using mce-test
753
754 **mcelog test suite:**
755
756 It is always a good idea to test an error handling mechanism before it is
757 really needed. mcelog includes a test suite. The test suite relies on
758 mce-inject which needs to be installed and in $PATH.
759
760 You also need the mce-inject kernel module configured (with
761 CONFIG_X86_MCE_INJECT=y), compiled, installed and loaded:
762
763 .. code:: bash
764
765     $ modprobe mce-inject
766
767 Then you can run the mcelog test suite with
768
769 .. code:: bash
770
771     $ make test
772
773 This will inject different classes of errors and check that the mcelog triggers
774 runs. There will be some kernel messages about page offlining attempts. The
775 test will also lose a few pages of memory in your system (not significant).
776
777 .. note::
778   This test will kill any running mcelog, which needs to be restarted
779   manually afterwards.
780
781 **mce-inject:**
782
783 A utility to inject corrected, uncorrected and fatal machine check exceptions
784
785 .. code:: bash
786
787     $ git clone https://git.kernel.org/pub/scm/utils/cpu/mce/mce-inject.git
788     $ cd mce-inject
789     $ make
790     $ modprobe mce-inject
791
792 Modify the test/corrected script to include the following:
793
794 .. code:: bash
795
796     CPU 0 BANK 0
797     STATUS 0xcc00008000010090
798     ADDR 0x0010FFFFFFF
799
800 Inject the error:
801 .. code:: bash
802
803     $ ./mce-inject < test/corrected
804
805 .. note::
806   The uncorrected and fatal scripts under test will cause a platform reset.
807   Only the fatal script generates the memory errors**. In order to  quickly
808   emulate uncorrected memory errors and avoid host reboot following test errors
809   from mce-test suite can be injected:
810
811 .. code:: bash
812
813        $ mce-inject  mce-test/cases/coverage/soft-inj/recoverable_ucr/data/srao_mem_scrub
814
815 **mce-test:**
816
817 In addition a more in-depth test of the Linux kernel machine check facilities
818 can be done with the mce-test test suite. mce-test supports testing uncorrected
819 error handling, real error injection, handling of different soft offlining
820 cases, and other tests.
821
822 **Corrected memory error injection:**
823
824 To inject corrected memory errors:
825
826 * Remove sb_edac and edac_core kernel modules: rmmod sb_edac rmmod edac_core
827 * Insert einj module: modprobe einj param_extension=1
828 * Inject an error by specifying details (last command should be repeated at least two times):
829
830 .. code:: bash
831
832     $ APEI_IF=/sys/kernel/debug/apei/einj
833     $ echo 0x8 > $APEI_IF/error_type
834     $ echo 0x01f5591000 > $APEI_IF/param1
835     $ echo 0xfffffffffffff000 > $APEI_IF/param2
836     $ echo 1 > $APEI_IF/notrigger
837     $ echo 1 > $APEI_IF/error_inject
838
839 * Check the MCE statistic: mcelog --client. Check the mcelog log for injected error details: less /var/log/mcelog.
840
841 Open vSwitch Plugins
842 ^^^^^^^^^^^^^^^^^^^^^
843 OvS Plugins Repo: https://github.com/collectd/collectd
844
845 OvS Plugins Branch: main
846
847 OvS Events MIBs: The SNMP OVS interface link status is provided by standard
848 IF-MIB (http://www.net-snmp.org/docs/mibs/IF-MIB.txt)
849
850 Dependencies: Open vSwitch, Yet Another JSON Library (https://github.com/lloyd/yajl)
851
852 On Centos, install the dependencies and Open vSwitch:
853
854 .. code:: bash
855
856     $ sudo yum install yajl-devel
857
858 Steps to install Open vSwtich can be found at
859 http://docs.openvswitch.org/en/latest/intro/install/fedora/
860
861 Start the Open vSwitch service:
862
863 .. code:: bash
864
865     $ sudo service openvswitch-switch start
866
867 Configure the ovsdb-server manager:
868
869 .. code:: bash
870
871     $ sudo ovs-vsctl set-manager ptcp:6640
872
873 Clone and install the collectd ovs plugin:
874
875 .. code:: bash
876
877     $ git clone $REPO
878     $ cd collectd
879     $ git checkout main
880     $ ./build.sh
881     $ ./configure --enable-syslog --enable-logfile --enable-debug
882     $ make
883     $ sudo make install
884
885 This will install collectd to default folder ``/opt/collectd``. The collectd
886 configuration file (``collectd.conf``) can be found at ``/opt/collectd/etc``.
887 To configure the OVS events plugin you need to modify the configuration file to include:
888
889 .. code:: bash
890
891     <LoadPlugin ovs_events>
892        Interval 1
893     </LoadPlugin>
894     <Plugin ovs_events>
895        Port "6640"
896        Address "127.0.0.1"
897        Socket "/var/run/openvswitch/db.sock"
898        Interfaces "br0" "veth0"
899        SendNotification true
900     </Plugin>
901
902 To configure the OVS stats plugin you need to modify the configuration file
903 to include:
904
905 .. code:: bash
906
907     <LoadPlugin ovs_stats>
908        Interval 1
909     </LoadPlugin>
910     <Plugin ovs_stats>
911        Port "6640"
912        Address "127.0.0.1"
913        Socket "/var/run/openvswitch/db.sock"
914        Bridges "br0"
915     </Plugin>
916
917 For more information on the plugin parameters, please see:
918 https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod
919
920 OVS PMD stats
921 ^^^^^^^^^^^^^^
922 Repo: https://gerrit.opnfv.org/gerrit/barometer
923
924 Prequistes:
925 1. Open vSwitch dependencies are installed.
926 2. Open vSwitch service is running.
927 3. Ovsdb-server manager is configured.
928 You can refer `Open vSwitch Plugins`_ section above for each one of them.
929
930 OVS PMD stats application is run through the exec plugin.
931
932 To configure the OVS PMD stats application you need to modify the exec plugin configuration
933 to include:
934
935 .. code:: bash
936
937     <LoadPlugin exec>
938        Interval 1
939     </LoadPlugin
940     <Plugin exec>
941         Exec "user:group" "<path to ovs_pmd_stat.sh>"
942     </Plugin>
943
944 .. note:: Exec plugin configuration has to be changed to use appropriate user before starting collectd service.
945
946 ovs_pmd_stat.sh calls the script for OVS PMD stats application with its argument:
947
948 .. code:: bash
949
950      sudo python /usr/local/src/ovs_pmd_stats.py" "--socket-pid-file"
951      "/var/run/openvswitch/ovs-vswitchd.pid"
952
953 SNMP Agent Plugin
954 ^^^^^^^^^^^^^^^^^
955 Repo: https://github.com/collectd/collectd
956
957 Branch: main
958
959 Dependencies: NET-SNMP library
960
961 Start by installing net-snmp and dependencies.
962
963 On Centos 7:
964
965 .. code:: bash
966
967     $ sudo yum install net-snmp net-snmp-libs net-snmp-utils net-snmp-devel
968     $ sudo systemctl start snmpd.service
969
970 go to the `snmp configuration`_ steps.
971
972 From source:
973
974 Clone and build net-snmp:
975
976 .. code:: bash
977
978     $ git clone https://github.com/haad/net-snmp.git
979     $ cd net-snmp
980     $ ./configure --with-persistent-directory="/var/net-snmp" --with-systemd --enable-shared --prefix=/usr
981     $ make
982
983 Become root
984
985 .. code:: bash
986
987     $ make install
988
989 Copy default configuration to persistent folder:
990
991 .. code:: bash
992
993     $ cp EXAMPLE.conf /usr/share/snmp/snmpd.conf
994
995 Set library path and default MIB configuration:
996
997 .. code:: bash
998
999     $ cd ~/
1000     $ echo export LD_LIBRARY_PATH=/usr/lib >> .bashrc
1001     $ net-snmp-config --default-mibdirs
1002     $ net-snmp-config --snmpconfpath
1003
1004 Configure snmpd as a service:
1005
1006 .. code:: bash
1007
1008     $ cd net-snmp
1009     $ cp ./dist/snmpd.service /etc/systemd/system/
1010     $ systemctl enable snmpd.service
1011     $ systemctl start snmpd.service
1012
1013 .. _`snmp configuration`:
1014
1015 Add the following line to snmpd.conf configuration file
1016 ``/etc/snmp/snmpd.conf`` to make all OID tree visible for SNMP clients:
1017
1018 .. code:: bash
1019
1020     view    systemview    included   .1
1021
1022 To verify that SNMP is working you can get IF-MIB table using SNMP client
1023 to view the list of Linux interfaces:
1024
1025 .. code:: bash
1026
1027     $ snmpwalk -v 2c -c public localhost IF-MIB::interfaces
1028
1029 Get the default MIB location:
1030
1031 .. code:: bash
1032
1033     $ net-snmp-config --default-mibdirs
1034     /opt/stack/.snmp/mibs:/usr/share/snmp/mibs
1035
1036 Install Intel specific MIBs (if needed) into location received by
1037 ``net-snmp-config`` command (e.g. ``/usr/share/snmp/mibs``).
1038
1039 .. code:: bash
1040
1041     $ git clone https://gerrit.opnfv.org/gerrit/barometer.git
1042     $ sudo cp -f barometer/mibs/*.txt /usr/share/snmp/mibs/
1043     $ sudo systemctl restart snmpd.service
1044
1045 Clone and install the collectd snmp_agent plugin:
1046
1047 .. code:: bash
1048
1049     $ cd ~
1050     $ git clone https://github.com/collectd/collectd
1051     $ cd collectd
1052     $ ./build.sh
1053     $ ./configure --enable-syslog --enable-logfile --enable-debug --enable-snmp --with-libnetsnmp
1054     $ make
1055     $ sudo make install
1056
1057 This will install collectd to default folder ``/opt/collectd``. The collectd
1058 configuration file (``collectd.conf``) can be found at ``/opt/collectd/etc``.
1059
1060 **SNMP Agent plugin is a generic plugin and cannot work without configuration**.
1061 To configure the snmp_agent plugin you need to modify the configuration file to
1062 include OIDs mapped to collectd types. The following example maps scalar
1063 memAvailReal OID to value represented as free memory type of memory plugin:
1064
1065 .. code:: bash
1066
1067     LoadPlugin snmp_agent
1068     <Plugin "snmp_agent">
1069       <Data "memAvailReal">
1070         Plugin "memory"
1071         Type "memory"
1072         TypeInstance "free"
1073         OIDs "1.3.6.1.4.1.2021.4.6.0"
1074       </Data>
1075     </Plugin>
1076
1077
1078 The ``snmpwalk`` command can be used to validate the collectd configuration:
1079
1080 .. code:: bash
1081
1082     $ snmpwalk -v 2c -c public localhost 1.3.6.1.4.1.2021.4.6.0
1083     UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 135237632 kB
1084
1085
1086 **Limitations**
1087
1088 * Object instance with Counter64 type is not supported in SNMPv1. When GetNext
1089   request is received, Counter64 type objects will be skipped. When Get
1090   request is received for Counter64 type object, the error will be returned.
1091 * Interfaces that are not visible to Linux like DPDK interfaces cannot be
1092   retreived using standard IF-MIB tables.
1093
1094 For more information on the plugin parameters, please see:
1095 https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod
1096
1097 For more details on AgentX subagent, please see:
1098 http://www.net-snmp.org/tutorial/tutorial-5/toolkit/demon/
1099
1100 .. _virt-plugin:
1101
1102 virt plugin
1103 ^^^^^^^^^^^^
1104 Repo: https://github.com/collectd/collectd
1105
1106 Branch: main
1107
1108 Dependencies: libvirt (https://libvirt.org/), libxml2
1109
1110 On Centos, install the dependencies:
1111
1112 .. code:: bash
1113
1114     $ sudo yum install libxml2-devel libpciaccess-devel yajl-devel device-mapper-devel
1115
1116 Install libvirt:
1117
1118 .. note:: libvirt version in package manager might be quite old and offer only
1119     limited functionality. Hence, building and installing libvirt from sources
1120     is recommended. Detailed instructions can bet found at:
1121     https://libvirt.org/compiling.html
1122
1123 .. code:: bash
1124
1125     $ sudo yum install libvirt-devel
1126
1127 Certain metrics provided by the plugin have a requirement on a minimal version of
1128 the libvirt API. *File system information* statistics require a *Guest Agent (GA)*
1129 to be installed and configured in a VM. User must make sure that installed GA
1130 version supports retrieving file system information. Number of *Performance monitoring events*
1131 metrics depends on running libvirt daemon version.
1132
1133 .. note:: Please keep in mind that RDT metrics (part of *Performance monitoring
1134     events*) have to be supported by hardware. For more details on hardware support,
1135     please see:
1136     https://github.com/01org/intel-cmt-cat
1137
1138     Additionally perf metrics **cannot** be collected if *Intel RDT* plugin is enabled.
1139
1140 libvirt version can be checked with following commands:
1141
1142 .. code:: bash
1143
1144     $ virsh --version
1145     $ libvirtd --version
1146
1147 .. table:: Extended statistics requirements
1148
1149     +-------------------------------+--------------------------+-------------+
1150     | Statistic                     | Min. libvirt API version | Requires GA |
1151     +===============================+==========================+=============+
1152     | Domain reason                 | 0.9.2                    | No          |
1153     +-------------------------------+--------------------------+-------------+
1154     | Disk errors                   | 0.9.10                   | No          |
1155     +-------------------------------+--------------------------+-------------+
1156     | Job statistics                | 1.2.9                    | No          |
1157     +-------------------------------+--------------------------+-------------+
1158     | File system information       | 1.2.11                   | Yes         |
1159     +-------------------------------+--------------------------+-------------+
1160     | Performance monitoring events | 1.3.3                    | No          |
1161     +-------------------------------+--------------------------+-------------+
1162
1163 Start libvirt daemon:
1164
1165 .. code:: bash
1166
1167     $ systemctl start libvirtd
1168
1169 Create domain (VM) XML configuration file. For more information on domain XML
1170 format and examples, please see:
1171 https://libvirt.org/formatdomain.html
1172
1173 .. note:: Installing additional hypervisor dependencies might be required before
1174     deploying virtual machine.
1175
1176 Create domain, based on created XML file:
1177
1178 .. code:: bash
1179
1180     $ virsh define DOMAIN_CFG_FILE.xml
1181
1182 Start domain:
1183
1184 .. code:: bash
1185
1186     $ virsh start DOMAIN_NAME
1187
1188 Check if domain is running:
1189
1190 .. code:: bash
1191
1192     $ virsh list
1193
1194 Check list of available *Performance monitoring events* and their settings:
1195
1196 .. code:: bash
1197
1198     $ virsh perf DOMAIN_NAME
1199
1200 Enable or disable *Performance monitoring events* for domain:
1201
1202 .. code:: bash
1203
1204     $ virsh perf DOMAIN_NAME [--enable | --disable] EVENT_NAME --live
1205
1206 Clone and install the collectd virt plugin:
1207
1208 .. code:: bash
1209
1210     $ git clone $REPO
1211     $ cd collectd
1212     $ ./build.sh
1213     $ ./configure --enable-syslog --enable-logfile --enable-debug
1214     $ make
1215     $ sudo make install
1216
1217 Where ``$REPO`` is equal to information provided above.
1218
1219 This will install collectd to ``/opt/collectd``. The collectd configuration file
1220 ``collectd.conf`` can be found at ``/opt/collectd/etc``.
1221 To load the virt plugin user needs to modify the configuration file to include:
1222
1223 .. code:: bash
1224
1225     LoadPlugin virt
1226
1227 Additionally, user can specify plugin configuration parameters in this file,
1228 such as connection URL, domain name and much more. By default extended virt plugin
1229 statistics are disabled. They can be enabled with ``ExtraStats`` option.
1230
1231 .. code:: bash
1232
1233     <Plugin virt>
1234        RefreshInterval 60
1235        ExtraStats "cpu_util disk disk_err domain_state fs_info job_stats_background pcpu perf vcpupin"
1236     </Plugin>
1237
1238 For more information on the plugin parameters, please see:
1239 https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod
1240
1241 .. _install-collectd-as-a-service:
1242
1243 Installing collectd as a service
1244 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1245 **NOTE**: In an OPNFV installation, collectd is installed and configured as a
1246 service.
1247
1248 Collectd service scripts are available in the collectd/contrib directory.
1249 To install collectd as a service:
1250
1251 .. code:: bash
1252
1253     $ sudo cp contrib/systemd.collectd.service /etc/systemd/system/
1254     $ cd /etc/systemd/system/
1255     $ sudo mv systemd.collectd.service collectd.service
1256     $ sudo chmod +x collectd.service
1257
1258 Modify collectd.service
1259
1260 .. code:: bash
1261
1262     [Service]
1263     ExecStart=/opt/collectd/sbin/collectd
1264     EnvironmentFile=-/opt/collectd/etc/
1265     EnvironmentFile=-/opt/collectd/etc/
1266     CapabilityBoundingSet=CAP_SETUID CAP_SETGID
1267
1268 Reload
1269
1270 .. code:: bash
1271
1272     $ sudo systemctl daemon-reload
1273     $ sudo systemctl start collectd.service
1274     $ sudo systemctl status collectd.service should show success
1275
1276 Additional useful plugins
1277 ^^^^^^^^^^^^^^^^^^^^^^^^^^
1278
1279 **Exec Plugin** : Can be used to show you when notifications are being
1280 generated by calling a bash script that dumps notifications to file. (handy
1281 for debug). Modify /opt/collectd/etc/collectd.conf:
1282
1283 .. code:: bash
1284
1285    LoadPlugin exec
1286    <Plugin exec>
1287    #   Exec "user:group" "/path/to/exec"
1288       NotificationExec "user" "<path to barometer>/barometer/src/collectd/collectd_sample_configs/write_notification.sh"
1289    </Plugin>
1290
1291 write_notification.sh (just writes the notification passed from exec through
1292 STDIN to a file (/tmp/notifications)):
1293
1294 .. code:: bash
1295
1296    #!/bin/bash
1297    rm -f /tmp/notifications
1298    while read x y
1299    do
1300      echo $x$y >> /tmp/notifications
1301    done
1302
1303 output to /tmp/notifications should look like:
1304
1305 .. code:: bash
1306
1307     Severity:WARNING
1308     Time:1479991318.806
1309     Host:localhost
1310     Plugin:ovs_events
1311     PluginInstance:br-ex
1312     Type:gauge
1313     TypeInstance:link_status
1314     uuid:f2aafeec-fa98-4e76-aec5-18ae9fc74589
1315
1316     linkstate of "br-ex" interface has been changed to "DOWN"
1317
1318 * **logfile plugin**: Can be used to log collectd activity. Modify
1319   /opt/collectd/etc/collectd.conf to include:
1320
1321 .. code:: bash
1322
1323     LoadPlugin logfile
1324     <Plugin logfile>
1325         LogLevel info
1326         File "/var/log/collectd.log"
1327         Timestamp true
1328         PrintSeverity false
1329     </Plugin>
1330
1331
1332 Monitoring Interfaces and Openstack Support
1333 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1334 .. Figure:: monitoring_interfaces.png
1335
1336    Monitoring Interfaces and Openstack Support
1337
1338 The figure above shows the DPDK L2 forwarding application running on a compute
1339 node, sending and receiving traffic. Collectd is also running on this compute
1340 node retrieving the stats periodically from DPDK through the dpdkstat plugin
1341 and publishing the retrieved stats to OpenStack through the
1342 collectd-openstack-plugins.
1343
1344 To see this demo in action please checkout: `Barometer OPNFV Summit demo`_
1345
1346 For more information on configuring and installing OpenStack plugins for
1347 collectd, check out the `collectd-openstack-plugins GSG`_.
1348
1349 Security
1350 ^^^^^^^^^
1351 * AAA – on top of collectd there secure agents like SNMP V3, Openstack agents
1352   etc. with their own AAA methods.
1353
1354 * Collectd runs as a daemon with root permissions.
1355
1356 * The `Exec plugin`_ allows the execution of external programs but counters the security
1357   concerns by:
1358
1359   * Ensuring that only one instance of the program is executed by collectd at any time
1360   * Forcing the plugin to check that custom programs are never executed with superuser
1361   privileges.
1362
1363 * Protection of Data in flight:
1364
1365   * It's recommend to use a minimum version of 4.7 of the Network plugin which provides
1366     the possibility to cryptographically sign or encrypt the network traffic.
1367   * Write Redis plugin or the Write MongoDB plugin are recommended to store the data.
1368   * For more information, please see: https://collectd.org/wiki/index.php?title=Networking_introduction
1369
1370 * Known vulnerabilities include:
1371
1372   * https://www.cvedetails.com/vulnerability-list/vendor_id-11242/Collectd.html
1373
1374     * `CVE-2017-7401`_ fixed https://github.com/collectd/collectd/issues/2174 in Version 5.7.2.
1375     * `CVE-2016-6254`_ fixed https://mailman.verplant.org/pipermail/collectd/2016-July/006838.html
1376         in Version  5.4.3.
1377     * `CVE-2010-4336`_ fixed https://mailman.verplant.org/pipermail/collectd/2010-November/004277.html
1378         in Version 4.10.2.
1379
1380   * http://www.cvedetails.com/product/20310/Collectd-Collectd.html?vendor_id=11242
1381
1382 * It's recommended to only use collectd plugins from signed packages.
1383
1384 References
1385 ^^^^^^^^^^^
1386 .. [1] https://collectd.org/wiki/index.php/Naming_schema
1387 .. [2] https://github.com/collectd/collectd/blob/main/src/daemon/plugin.h
1388 .. [3] https://collectd.org/wiki/index.php/Value_list_t
1389 .. [4] https://collectd.org/wiki/index.php/Data_set
1390 .. [5] https://collectd.org/documentation/manpages/types.db.5.shtml
1391 .. [6] https://collectd.org/wiki/index.php/Data_source
1392 .. [7] https://collectd.org/wiki/index.php/Meta_Data_Interface
1393
1394 .. _Barometer OPNFV Summit demo: https://prezi.com/kjv6o8ixs6se/software-fastpath-service-quality-metrics-demo/
1395 .. _gnocchi plugin: https://github.com/openstack/collectd-openstack-plugins/tree/stable/ocata/
1396 .. _aodh plugin: https://github.com/openstack/collectd-openstack-plugins/tree/stable/ocata/
1397 .. _collectd-openstack-plugins GSG: https://github.com/openstack/collectd-openstack-plugins/blob/master/doc/source/GSG.rst
1398 .. _grafana guide: https://wiki.opnfv.org/display/fastpath/Installing+and+configuring+InfluxDB+and+Grafana+to+display+metrics+with+collectd
1399 .. _CVE-2017-7401: https://www.cvedetails.com/cve/CVE-2017-7401/
1400 .. _CVE-2016-6254: https://www.cvedetails.com/cve/CVE-2016-6254/
1401 .. _CVE-2010-4336: https://www.cvedetails.com/cve/CVE-2010-4336/
1402 .. _Exec plugin: https://collectd.org/wiki/index.php/Plugin:Exec