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