command parser: Add a vector-based interface.
[collectd.git] / README
1  collectd - System information collection daemon
2 =================================================
3 https://collectd.org/
4
5 About
6 -----
7
8   collectd is a small daemon which collects system information periodically
9   and provides mechanisms to store and monitor the values in a variety of
10   ways.
11
12
13 Features
14 --------
15
16   * collectd is able to collect the following data:
17
18     - apache
19       Apache server utilization: Number of bytes transferred, number of
20       requests handled and detailed scoreboard statistics
21
22     - apcups
23       APC UPS Daemon: UPS charge, load, input/output/battery voltage, etc.
24
25     - apple_sensors
26       Sensors in Macs running Mac OS X / Darwin: Temperature, fan speed and
27       voltage sensors.
28
29     - aquaero
30       Various sensors in the Aquaero 5 water cooling board made by Aquacomputer.
31
32     - ascent
33       Statistics about Ascent, a free server for the game `World of Warcraft'.
34
35     - barometer
36       Reads absolute barometric pressure, air pressure reduced to sea level and
37       temperature.  Supported sensors are MPL115A2 and MPL3115 from Freescale
38       and BMP085 from Bosch.
39
40     - battery
41       Batterycharge, -current and voltage of ACPI and PMU based laptop
42       batteries.
43
44     - bind
45       Name server and resolver statistics from the `statistics-channel'
46       interface of BIND 9.5, 9,6 and later.
47
48     - ceph
49       Statistics from the Ceph distributed storage system.
50
51     - cgroups
52       CPU accounting information for process groups under Linux.
53
54     - chrony
55       Chrony daemon statistics: Local clock drift, offset to peers, etc.
56
57     - conntrack
58       Number of nf_conntrack entries.
59
60     - contextswitch
61       Number of context switches done by the operating system.
62
63     - cpu
64       CPU utilization: Time spent in the system, user, nice, idle, and related
65       states.
66
67     - cpufreq
68       CPU frequency (For laptops with speed step or a similar technology)
69
70     - cpusleep
71       CPU sleep: Time spent in suspend (For mobile devices which enter suspend automatically)
72
73     - curl
74       Parse statistics from websites using regular expressions.
75
76     - curl_json
77       Retrieves JSON data via cURL and parses it according to user
78       configuration.
79
80     - curl_xml
81       Retrieves XML data via cURL and parses it according to user
82       configuration.
83
84     - dbi
85       Executes SQL statements on various databases and interprets the returned
86       data.
87
88     - df
89       Mountpoint usage (Basically the values `df(1)' delivers)
90
91     - disk
92       Disk utilization: Sectors read/written, number of read/write actions,
93       average time an IO-operation took to complete.
94
95     - dns
96       DNS traffic: Query types, response codes, opcodes and traffic/octets
97       transferred.
98
99     - dpdk
100       Collect DPDK interface statistics.
101
102     - drbd
103       Collect individual drbd resource statistics.
104
105     - email
106       Email statistics: Count, traffic, spam scores and checks.
107       See collectd-email(5).
108
109     - entropy
110       Amount of entropy available to the system.
111
112     - ethstat
113       Network interface card statistics.
114
115     - exec
116       Values gathered by a custom program or script.
117       See collectd-exec(5).
118
119     - fhcount
120       File handles statistics.
121
122     - filecount
123       Count the number of files in directories.
124
125     - fscache
126       Linux file-system based caching framework statistics.
127
128     - gmond
129       Receive multicast traffic from Ganglia instances.
130
131     - gps
132       Monitor gps related data through gpsd.
133
134     - grpc
135       Send and receive values over the network using the gRPC framework.
136
137     - hddtemp
138       Hard disk temperatures using hddtempd.
139
140     - hugepages
141       Report the number of used and free hugepages. More info on
142       hugepages can be found here:
143       https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt.
144
145     - interface
146       Interface traffic: Number of octets, packets and errors for each
147       interface.
148
149     - ipc
150       IPC counters: semaphores used, number of allocated segments in shared
151       memory and more.
152
153     - ipmi
154       IPMI (Intelligent Platform Management Interface) sensors information.
155
156     - iptables
157       Iptables' counters: Number of bytes that were matched by a certain
158       iptables rule.
159
160     - ipvs
161       IPVS connection statistics (number of connections, octets and packets
162       for each service and destination).
163       See http://www.linuxvirtualserver.org/software/index.html.
164
165     - irq
166       IRQ counters: Frequency in which certain interrupts occur.
167
168     - java
169       Integrates a `Java Virtual Machine' (JVM) to execute plugins in Java
170       bytecode. See “Configuring with libjvm” below.
171
172     - load
173       System load average over the last 1, 5 and 15 minutes.
174
175     - lpar
176       Detailed CPU statistics of the “Logical Partitions” virtualization
177       technique built into IBM's POWER processors.
178
179     - lua
180       The Lua plugin implements a Lua interpreter into collectd. This
181       makes it possible to write plugins in Lua which are executed by
182       collectd without the need to start a heavy interpreter every interval.
183       See collectd-lua(5) for details.
184
185     - lvm
186       Size of “Logical Volumes” (LV) and “Volume Groups” (VG) of Linux'
187       “Logical Volume Manager” (LVM).
188
189     - madwifi
190       Queries very detailed usage statistics from wireless LAN adapters and
191       interfaces that use the Atheros chipset and the MadWifi driver.
192
193     - mbmon
194       Motherboard sensors: temperature, fan speed and voltage information,
195       using mbmon(1).
196
197     - md
198       Linux software-RAID device information (number of active, failed, spare
199       and missing disks).
200
201     - memcachec
202       Query and parse data from a memcache daemon (memcached).
203
204     - memcached
205       Statistics of the memcached distributed caching system.
206       <http://www.danga.com/memcached/>
207
208     - memory
209       Memory utilization: Memory occupied by running processes, page cache,
210       buffer cache and free.
211
212     - mic
213       Collects CPU usage, memory usage, temperatures and power consumption from
214       Intel Many Integrated Core (MIC) CPUs.
215
216     - modbus
217       Reads values from Modbus/TCP enabled devices. Supports reading values
218       from multiple "slaves" so gateway devices can be used.
219
220     - mqtt
221       Publishes and subscribes to MQTT topics.
222
223     - multimeter
224       Information provided by serial multimeters, such as the `Metex
225       M-4650CR'.
226
227     - mysql
228       MySQL server statistics: Commands issued, handlers triggered, thread
229       usage, query cache utilization and traffic/octets sent and received.
230
231     - netapp
232       Plugin to query performance values from a NetApp storage system using the
233       “Manage ONTAP” SDK provided by NetApp.
234
235     - netlink
236       Very detailed Linux network interface and routing statistics. You can get
237       (detailed) information on interfaces, qdiscs, classes, and, if you can
238       make use of it, filters.
239
240     - network
241       Receive values that were collected by other hosts. Large setups will
242       want to collect the data on one dedicated machine, and this is the
243       plugin of choice for that.
244
245     - nfs
246       NFS Procedures: Which NFS command were called how often. Only NFSv2 and
247       NFSv3 right now.
248
249     - nginx
250       Collects statistics from `nginx' (speak: engine X), a HTTP and mail
251       server/proxy.
252
253     - ntpd
254       NTP daemon statistics: Local clock drift, offset to peers, etc.
255
256     - numa
257       Information about Non-Uniform Memory Access (NUMA).
258
259     - nut
260       Network UPS tools: UPS current, voltage, power, charge, utilisation,
261       temperature, etc. See upsd(8).
262
263     - olsrd
264       Queries routing information from the “Optimized Link State Routing”
265       daemon.
266
267     - onewire (EXPERIMENTAL!)
268       Read onewire sensors using the owcapu library of the owfs project.
269       Please read in collectd.conf(5) why this plugin is experimental.
270
271     - openldap
272       Read monitoring information from OpenLDAP's cn=Monitor subtree.
273
274     - openvpn
275       RX and TX of each client in openvpn-status.log (status-version 2).
276       <http://openvpn.net/index.php/documentation/howto.html>
277
278     - oracle
279       Query data from an Oracle database.
280
281     - perl
282       The perl plugin implements a Perl-interpreter into collectd. You can
283       write your own plugins in Perl and return arbitrary values using this
284       API. See collectd-perl(5).
285
286     - pf
287       Query statistics from BSD's packet filter "pf".
288
289     - pinba
290       Receive and dispatch timing values from Pinba, a profiling extension for
291       PHP.
292
293     - ping
294       Network latency: Time to reach the default gateway or another given
295       host.
296
297     - postgresql
298       PostgreSQL database statistics: active server connections, transaction
299       numbers, block IO, table row manipulations.
300
301     - powerdns
302       PowerDNS name server statistics.
303
304     - processes
305       Process counts: Number of running, sleeping, zombie, ... processes.
306
307     - protocols
308       Counts various aspects of network protocols such as IP, TCP, UDP, etc.
309
310     - python
311       The python plugin implements a Python interpreter into collectd. This
312       makes it possible to write plugins in Python which are executed by
313       collectd without the need to start a heavy interpreter every interval.
314       See collectd-python(5) for details.
315
316     - redis
317       The redis plugin gathers information from a Redis server, including:
318       uptime, used memory, total connections etc.
319
320     - routeros
321       Query interface and wireless registration statistics from RouterOS.
322
323     - rrdcached
324       RRDtool caching daemon (RRDcacheD) statistics.
325
326     - sensors
327       System sensors, accessed using lm_sensors: Voltages, temperatures and
328       fan rotation speeds.
329
330     - serial
331       RX and TX of serial interfaces. Linux only; needs root privileges.
332
333     - sigrok
334       Uses libsigrok as a backend, allowing any sigrok-supported device
335       to have its measurements fed to collectd. This includes multimeters,
336       sound level meters, thermometers, and much more.
337
338     - smart
339       Collect SMART statistics, notably load cycle count, temperature
340       and bad sectors.
341
342     - snmp
343       Read values from SNMP (Simple Network Management Protocol) enabled
344       network devices such as switches, routers, thermometers, rack monitoring
345       servers, etc. See collectd-snmp(5).
346
347     - statsd
348       Acts as a StatsD server, reading values sent over the network from StatsD
349       clients and calculating rates and other aggregates out of these values.
350
351     - swap
352       Pages swapped out onto hard disk or whatever is called `swap' by the OS..
353
354     - table
355       Parse table-like structured files.
356
357     - tail
358       Follows (tails) log files, parses them by lines and submits matched
359       values.
360
361     - tail_csv
362       Follows (tails) files in CSV format, parses each line and submits
363       extracted values.
364
365     - tape
366       Bytes and operations read and written on tape devices. Solaris only.
367
368     - tcpconns
369       Number of TCP connections to specific local and remote ports.
370
371     - teamspeak2
372       TeamSpeak2 server statistics.
373
374     - ted
375       Plugin to read values from `The Energy Detective' (TED).
376
377     - thermal
378       Linux ACPI thermal zone information.
379
380     - tokyotyrant
381       Reads the number of records and file size from a running Tokyo Tyrant
382       server.
383
384     - turbostat
385       Reads CPU frequency and C-state residency on modern Intel
386       turbo-capable processors.
387
388     - uptime
389       System uptime statistics.
390
391     - users
392       Users currently logged in.
393
394     - varnish
395       Various statistics from Varnish, an HTTP accelerator.
396
397     - virt
398       CPU, memory, disk and network I/O statistics from virtual machines.
399
400     - vmem
401       Virtual memory statistics, e. g. the number of page-ins/-outs or the
402       number of pagefaults.
403
404     - vserver
405       System resources used by Linux VServers.
406       See <http://linux-vserver.org/>.
407
408     - wireless
409       Link quality of wireless cards. Linux only.
410
411     - xencpu
412       XEN Hypervisor CPU stats.
413
414     - xmms
415       Bitrate and frequency of music played with XMMS.
416
417     - zfs_arc
418       Statistics for ZFS' “Adaptive Replacement Cache” (ARC).
419
420     - zone
421       Measures the percentage of cpu load per container (zone) under Solaris 10
422       and higher
423
424     - zookeeper
425       Read data from Zookeeper's MNTR command.
426
427   * Output can be written or sent to various destinations by the following
428     plugins:
429
430     - amqp
431       Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
432       server, such as RabbitMQ.
433
434     - csv
435       Write to comma separated values (CSV) files. This needs lots of
436       diskspace but is extremely portable and can be analysed with almost
437       every program that can analyse anything. Even Microsoft's Excel..
438
439     - lua
440       It's possible to implement write plugins in Lua using the Lua
441       plugin. See collectd-lua(5) for details.
442
443     - network
444       Send the data to a remote host to save the data somehow. This is useful
445       for large setups where the data should be saved by a dedicated machine.
446
447     - perl
448       Of course the values are propagated to plugins written in Perl, too, so
449       you can easily do weird stuff with the plugins we didn't dare think of
450       ;) See collectd-perl(5).
451
452     - python
453       It's possible to implement write plugins in Python using the python
454       plugin. See collectd-python(5) for details.
455
456     - rrdcached
457       Output to round-robin-database (RRD) files using the RRDtool caching
458       daemon (RRDcacheD) - see rrdcached(1). That daemon provides a general
459       implementation of the caching done by the `rrdtool' plugin.
460
461     - rrdtool
462       Output to round-robin-database (RRD) files using librrd. See rrdtool(1).
463       This is likely the most popular destination for such values. Since
464       updates to RRD-files are somewhat expensive this plugin can cache
465       updates to the files and write a bunch of updates at once, which lessens
466       system load a lot.
467
468     - unixsock
469       One can query the values from the unixsock plugin whenever they're
470       needed. Please read collectd-unixsock(5) for a description on how that's
471       done.
472
473     - write_graphite
474       Sends data to Carbon, the storage layer of Graphite using TCP or UDP. It
475       can be configured to avoid logging send errors (especially useful when
476       using UDP).
477
478     - write_http
479       Sends the values collected by collectd to a web-server using HTTP POST
480       requests. The transmitted data is either in a form understood by the
481       Exec plugin or formatted in JSON.
482
483     - write_kafka
484       Sends data to Apache Kafka, a distributed queue.
485
486     - write_log
487       Writes data to the log
488
489     - write_mongodb
490       Sends data to MongoDB, a NoSQL database.
491
492     - write_redis
493       Sends the values to a Redis key-value database server.
494
495     - write_riemann
496       Sends data to Riemann, a stream processing and monitoring system.
497
498     - write_sensu
499       Sends data to Sensu, a stream processing and monitoring system, via the
500       Sensu client local TCP socket.
501
502     - write_tsdb
503       Sends data OpenTSDB, a scalable no master, no shared state time series
504       database.
505
506   * Logging is, as everything in collectd, provided by plugins. The following
507     plugins keep us informed about what's going on:
508
509     - logfile
510       Writes log messages to a file or STDOUT/STDERR.
511
512     - perl
513       Log messages are propagated to plugins written in Perl as well.
514       See collectd-perl(5).
515
516     - python
517       It's possible to implement log plugins in Python using the python plugin.
518       See collectd-python(5) for details.
519
520     - syslog
521       Logs to the standard UNIX logging mechanism, syslog.
522
523     - log_logstash
524       Writes log messages formatted as logstash JSON events.
525
526   * Notifications can be handled by the following plugins:
527
528     - notify_desktop
529       Send a desktop notification to a notification daemon, as defined in
530       the Desktop Notification Specification. To actually display the
531       notifications, notification-daemon is required.
532       See http://www.galago-project.org/specs/notification/.
533
534     - notify_email
535       Send an E-mail with the notification message to the configured
536       recipients.
537
538     - notify_nagios
539       Submit notifications as passive check results to a local nagios instance.
540
541     - exec
542       Execute a program or script to handle the notification.
543       See collectd-exec(5).
544
545     - logfile
546       Writes the notification message to a file or STDOUT/STDERR.
547
548     - network
549       Send the notification to a remote host to handle it somehow.
550
551     - perl
552       Notifications are propagated to plugins written in Perl as well.
553       See collectd-perl(5).
554
555     - python
556       It's possible to implement notification plugins in Python using the
557       python plugin. See collectd-python(5) for details.
558
559   * Value processing can be controlled using the "filter chain" infrastructure
560     and "matches" and "targets". The following plugins are available:
561
562     - match_empty_counter
563       Match counter values which are currently zero.
564
565     - match_hashed
566       Match values using a hash function of the hostname.
567
568     - match_regex
569       Match values by their identifier based on regular expressions.
570
571     - match_timediff
572       Match values with an invalid timestamp.
573
574     - match_value
575       Select values by their data sources' values.
576
577     - target_notification
578       Create and dispatch a notification.
579
580     - target_replace
581       Replace parts of an identifier using regular expressions.
582
583     - target_scale
584       Scale (multiply) values by an arbitrary value.
585
586     - target_set
587       Set (overwrite) entire parts of an identifier.
588
589   * Miscellaneous plugins:
590
591     - aggregation
592       Selects multiple value lists based on patterns or regular expressions
593       and creates new aggregated values lists from those.
594
595     - threshold
596       Checks values against configured thresholds and creates notifications if
597       values are out of bounds. See collectd-threshold(5) for details.
598
599     - uuid
600       Sets the hostname to a unique identifier. This is meant for setups
601       where each client may migrate to another physical host, possibly going
602       through one or more name changes in the process.
603
604   * Performance: Since collectd is running as a daemon it doesn't spend much
605     time starting up again and again. With the exception of the exec plugin no
606     processes are forked. Caching in output plugins, such as the rrdtool and
607     network plugins, makes sure your resources are used efficiently. Also,
608     since collectd is programmed multithreaded it benefits from hyper-threading
609     and multicore processors and makes sure that the daemon isn't idle if only
610     one plugin waits for an IO-operation to complete.
611
612   * Once set up, hardly any maintenance is necessary. Setup is kept as easy
613     as possible and the default values should be okay for most users.
614
615
616 Operation
617 ---------
618
619   * collectd's configuration file can be found at `sysconfdir'/collectd.conf.
620     Run `collectd -h' for a list of built-in defaults. See `collectd.conf(5)'
621     for a list of options and a syntax description.
622
623   * When the `csv' or `rrdtool' plugins are loaded they'll write the values to
624     files. The usual place for these files is beneath `/var/lib/collectd'.
625
626   * When using some of the plugins, collectd needs to run as user root, since
627     only root can do certain things, such as craft ICMP packages needed to ping
628     other hosts. collectd should NOT be installed setuid root since it can be
629     used to overwrite valuable files!
630
631   * Sample scripts to generate graphs reside in `contrib/' in the source
632     package or somewhere near `/usr/share/doc/collectd' in most distributions.
633     Please be aware that those script are meant as a starting point for your
634     own experiments.. Some of them require the `RRDs' Perl module.
635     (`librrds-perl' on Debian) If you have written a more sophisticated
636     solution please share it with us.
637
638   * The RRAs of the automatically created RRD files depend on the `step'
639     and `heartbeat' settings given. If change these settings you may need to
640     re-create the files, losing all data. Please be aware of that when changing
641     the values and read the rrdtool(1) manpage thoroughly.
642
643
644 collectd and chkrootkit
645 -----------------------
646
647   If you are using the `dns' plugin chkrootkit(1) will report collectd as a
648   packet sniffer ("<iface>: PACKET SNIFFER(/usr/sbin/collectd[<pid>])"). The
649   plugin captures all UDP packets on port 53 to analyze the DNS traffic. In
650   this case, collectd is a legitimate sniffer and the report should be
651   considered to be a false positive. However, you might want to check that
652   this really is collectd and not some other, illegitimate sniffer.
653
654
655 Prerequisites
656 -------------
657
658   To compile collectd from source you will need:
659
660   * Usual suspects: C compiler, linker, preprocessor, make, ...
661
662   * A POSIX-threads (pthread) implementation.
663     Since gathering some statistics is slow (network connections, slow devices,
664     etc) collectd is parallelized. The POSIX threads interface is being
665     used and should be found in various implementations for hopefully all
666     platforms.
667
668   * aerotools-ng (optional)
669     Used by the `aquaero' plugin. Currently, the `libaquaero5' library, which
670     is used by the `aerotools-ng' toolkit, is not compiled as a shared object
671     nor does it feature an installation routine. Therefore, you need to point
672     collectd's configure script at the source directory of the `aerotools-ng'
673     project.
674     <https://github.com/lynix/aerotools-ng>
675
676   * CoreFoundation.framework and IOKit.framework (optional)
677     For compiling on Darwin in general and the `apple_sensors' plugin in
678     particular.
679     <http://developer.apple.com/corefoundation/>
680
681   * libatasmart (optional)
682     Used by the `smart' plugin.
683     <http://git.0pointer.de/?p=libatasmart.git>
684
685   * libcap (optional)
686     The `turbostat' plugin can optionally build Linux Capabilities support,
687     which avoids full privileges requirement (aka. running as root) to read
688     values.
689     <http://sites.google.com/site/fullycapable/>
690
691   * libclntsh (optional)
692     Used by the `oracle' plugin.
693
694   * libhiredis (optional)
695     Used by the redis plugin. Please note that you require a 0.10.0 version
696     or higher. <https://github.com/redis/hiredis>
697
698   * libcurl (optional)
699     If you want to use the `apache', `ascent', `bind', `curl', `curl_json',
700     `curl_xml', `nginx', or `write_http' plugin.
701     <http://curl.haxx.se/>
702
703   * libdbi (optional)
704     Used by the `dbi' plugin to connect to various databases.
705     <http://libdbi.sourceforge.net/>
706
707   * libesmtp (optional)
708     For the `notify_email' plugin.
709     <http://www.stafford.uklinux.net/libesmtp/>
710
711   * libganglia (optional)
712     Used by the `gmond' plugin to process data received from Ganglia.
713     <http://ganglia.info/>
714
715   * libgrpc (optional)
716     Used by the `grpc' plugin. gRPC requires a C++ compiler supporting the
717     C++11 standard.
718     <https://grpc.io/>
719
720   * libgcrypt (optional)
721     Used by the `network' plugin for encryption and authentication.
722     <http://www.gnupg.org/>
723
724   * libgps (optional)
725     Used by the `gps' plugin.
726     <http://developer.berlios.de/projects/gpsd/>
727
728   * libhal (optional)
729     If present, the `uuid' plugin will check for UUID from HAL.
730     <http://hal.freedesktop.org/>
731
732   * libi2c-dev (optional)
733     Used for the plugin `barometer', provides just the i2c-dev.h header file
734     for user space i2c development.
735
736   * libiptc (optional)
737     For querying iptables counters.
738     <http://netfilter.org/>
739
740   * libjvm (optional)
741     Library that encapsulates the `Java Virtual Machine' (JVM). This library is
742     used by the `java' plugin to execute Java bytecode. See “Configuring with
743     libjvm” below.
744     <http://openjdk.java.net/> (and others)
745
746   * libldap (optional)
747     Used by the `openldap' plugin.
748     <http://www.openldap.org/>
749
750   * liblua (optional)
751     Used by the `lua' plugin. Currently, Lua 5.1 and later are supported.
752     <https://www.lua.org/>
753
754   * liblvm2 (optional)
755     Used by the `lvm' plugin.
756     <ftp://sources.redhat.com/pub/lvm2/>
757
758   * libmemcached (optional)
759     Used by the `memcachec' plugin to connect to a memcache daemon.
760     <http://tangent.org/552/libmemcached.html>
761
762   * libmnl (optional)
763     Used by the `netlink' plugin.
764     <http://www.netfilter.org/projects/libmnl/>
765
766   * libmodbus (optional)
767     Used by the `modbus' plugin to communicate with Modbus/TCP devices. The
768     `modbus' plugin works with version 2.0.3 of the library – due to frequent
769     API changes other versions may or may not compile cleanly.
770     <http://www.libmodbus.org/>
771
772   * libmysqlclient (optional)
773     Unsurprisingly used by the `mysql' plugin.
774     <http://dev.mysql.com/>
775
776   * libnetapp (optional)
777     Required for the `netapp' plugin.
778     This library is part of the “Manage ONTAP SDK” published by NetApp.
779
780   * libnetsnmp (optional)
781     For the `snmp' plugin.
782     <http://www.net-snmp.org/>
783
784   * libnotify (optional)
785     For the `notify_desktop' plugin.
786     <http://www.galago-project.org/>
787
788   * libopenipmi (optional)
789     Used by the `ipmi' plugin to prove IPMI devices.
790     <http://openipmi.sourceforge.net/>
791
792   * liboping (optional)
793     Used by the `ping' plugin to send and receive ICMP packets.
794     <http://octo.it/liboping/>
795
796   * libowcapi (optional)
797     Used by the `onewire' plugin to read values from onewire sensors (or the
798     owserver(1) daemon).
799     <http://www.owfs.org/>
800
801   * libpcap (optional)
802     Used to capture packets by the `dns' plugin.
803     <http://www.tcpdump.org/>
804
805   * libperfstat (optional)
806     Used by various plugins to gather statistics under AIX.
807
808   * libperl (optional)
809     Obviously used by the `perl' plugin. The library has to be compiled with
810     ithread support (introduced in Perl 5.6.0).
811     <http://www.perl.org/>
812
813   * libpq (optional)
814     The PostgreSQL C client library used by the `postgresql' plugin.
815     <http://www.postgresql.org/>
816
817   * libprotobuf, protoc 3.0+ (optional)
818     Used by the `grpc' plugin to generate service stubs and code to handle
819     network packets of collectd's protobuf-based network protocol.
820     <https://developers.google.com/protocol-buffers/>
821
822   * libprotobuf-c, protoc-c (optional)
823     Used by the `pinba' plugin to generate a parser for the network packets
824     sent by the Pinba PHP extension.
825     <http://code.google.com/p/protobuf-c/>
826
827   * libpython (optional)
828     Used by the `python' plugin. Currently, Python 2.6 and later and Python 3
829     are supported.
830     <http://www.python.org/>
831
832   * librabbitmq (optional; also called “rabbitmq-c”)
833     Used by the `amqp' plugin for AMQP connections, for example to RabbitMQ.
834     <http://hg.rabbitmq.com/rabbitmq-c/>
835
836   * librdkafka (optional; also called “rdkafka”)
837     Used by the `write_kafka' plugin for producing messages and sending them
838     to a Kafka broker.
839     <https://github.com/edenhill/librdkafka>
840
841   * librouteros (optional)
842     Used by the `routeros' plugin to connect to a device running `RouterOS'.
843     <http://octo.it/librouteros/>
844
845   * librrd (optional)
846     Used by the `rrdtool' and `rrdcached' plugins. The latter requires RRDtool
847     client support which was added after version 1.3 of RRDtool. Versions 1.0,
848     1.2 and 1.3 are known to work with the `rrdtool' plugin.
849     <http://oss.oetiker.ch/rrdtool/>
850
851   * librt, libsocket, libkstat, libdevinfo (optional)
852     Various standard Solaris libraries which provide system functions.
853     <http://developers.sun.com/solaris/>
854
855   * libsensors (optional)
856     To read from `lm_sensors', see the `sensors' plugin.
857     <http://www.lm-sensors.org/>
858
859   * libsigrok (optional)
860     Used by the `sigrok' plugin. In addition, libsigrok depends on glib,
861     libzip, and optionally (depending on which drivers are enabled) on
862     libusb, libftdi and libudev.
863
864   * libstatgrab (optional)
865     Used by various plugins to collect statistics on systems other than Linux
866     and/or Solaris.
867     <http://www.i-scream.org/libstatgrab/>
868
869   * libtokyotyrant (optional)
870     Used by the `tokyotyrant' plugin.
871     <http://1978th.net/tokyotyrant/>
872
873   * libupsclient/nut (optional)
874     For the `nut' plugin which queries nut's `upsd'.
875     <http://networkupstools.org/>
876
877   * libvirt (optional)
878     Collect statistics from virtual machines.
879     <http://libvirt.org/>
880
881   * libxml2 (optional)
882     Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
883     `virt' plugins.
884     <http://xmlsoft.org/>
885
886   * libxen (optional)
887     Used by the `xencpu' plugin.
888     <http://xenbits.xensource.com/>
889
890   * libxmms (optional)
891     <http://www.xmms.org/>
892
893   * libyajl (optional)
894     Parse JSON data. This is needed for the `ceph', `curl_json' and
895     `log_logstash' plugins.
896     <http://github.com/lloyd/yajl>
897
898   * libvarnish (optional)
899      Fetches statistics from a Varnish instance. This is needed for the
900      `varnish' plugin.
901      <http://varnish-cache.org>
902
903   * riemann-c-client (optional)
904      For the `write_riemann' plugin.
905      <https://github.com/algernon/riemann-c-client>
906
907 Configuring / Compiling / Installing
908 ------------------------------------
909
910   To configure, build and install collectd with the default settings, run
911   `./configure && make && make install'.  For detailed, generic instructions
912   see INSTALL. For a complete list of configure options and their description,
913   run `./configure --help'.
914
915   By default, the configure script will check for all build dependencies and
916   disable all plugins whose requirements cannot be fulfilled (any other plugin
917   will be enabled). To enable a plugin, install missing dependencies (see
918   section `Prerequisites' above) and rerun `configure'. If you specify the
919   `--enable-<plugin>' configure option, the script will fail if the depen-
920   dencies for the specified plugin are not met. In that case you can force the
921   plugin to be built using the `--enable-<plugin>=force' configure option.
922   This will most likely fail though unless you're working in a very unusual
923   setup and you really know what you're doing. If you specify the
924   `--disable-<plugin>' configure option, the plugin will not be built. If you
925   specify the `--enable-all-plugins' or `--disable-all-plugins' configure
926   options, all plugins will be enabled or disabled respectively by default.
927   Explicitly enabling or disabling a plugin overwrites the default for the
928   specified plugin. These options are meant for package maintainers and should
929   not be used in everyday situations.
930
931   By default, collectd will be installed into `/opt/collectd'. You can adjust
932   this setting by specifying the `--prefix' configure option - see INSTALL for
933   details. If you pass DESTDIR=<path> to `make install', <path> will be
934   prefixed to all installation directories. This might be useful when creating
935   packages for collectd.
936
937 Configuring with libjvm
938 -----------------------
939
940   To determine the location of the required files of a Java installation is not
941   an easy task, because the locations vary with your kernel (Linux, SunOS, …)
942   and with your architecture (x86, SPARC, …) and there is no ‘java-config’
943   script we could use. Configuration of the JVM library is therefore a bit
944   tricky.
945
946   The easiest way to use the `--with-java=$JAVA_HOME' option, where
947   `$JAVA_HOME' is usually something like:
948     /usr/lib/jvm/java-1.5.0-sun-1.5.0.14
949
950   The configure script will then use find(1) to look for the following files:
951
952     - jni.h
953     - jni_md.h
954     - libjvm.so
955
956   If found, appropriate CPP-flags and LD-flags are set and the following
957   library checks succeed.
958
959   If this doesn't work for you, you have the possibility to specify CPP-flags,
960   C-flags, LD-flags and LIBS for the ‘Java’ plugin by hand, using the
961   following environment variables:
962
963     - JAVA_CPPFLAGS
964     - JAVA_CFLAGS
965     - JAVA_LDFLAGS
966     - JAVA_LIBS
967
968   For example (shortened for demonstration purposes):
969
970     ./configure JAVA_CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
971
972   Adding "-ljvm" to JAVA_LIBS is done automatically, you don't have to
973   do that.
974
975 Generating the configure script
976 -------------------------------
977
978 Collectd ships with a `build.sh' script to generate the `configure'
979 script shipped with releases.
980
981 To generate the `configure` script, you'll need the following dependencies:
982
983 - autoconf
984 - automake
985 - flex
986 - bison
987 - libtool
988 - libtool-ltdl
989 - pkg-config
990
991 The `build.sh' script takes no arguments.
992
993 Crosscompiling
994 --------------
995
996   To compile correctly collectd needs to be able to initialize static
997   variables to NAN (Not A Number). Some C libraries, especially the GNU
998   libc, have a problem with that.
999
1000   Luckily, with GCC it's possible to work around that problem: One can define
1001   NAN as being (0.0 / 0.0) and `isnan' as `f != f'. However, to test this
1002   ``implementation'' the configure script needs to compile and run a short
1003   test program. Obviously running a test program when doing a cross-
1004   compilation is, well, challenging.
1005
1006   If you run into this problem, you can use the `--with-nan-emulation'
1007   configure option to force the use of this implementation. We can't promise
1008   that the compiled binary actually behaves as it should, but since NANs
1009   are likely never passed to the libm you have a good chance to be lucky.
1010
1011   Likewise, collectd needs to know the layout of doubles in memory, in order
1012   to craft uniform network packets over different architectures. For this, it
1013   needs to know how to convert doubles into the memory layout used by x86. The
1014   configure script tries to figure this out by compiling and running a few
1015   small test programs. This is of course not possible when cross-compiling.
1016   You can use the `--with-fp-layout' option to tell the configure script which
1017   conversion method to assume. Valid arguments are:
1018
1019     * `nothing'    (12345678 -> 12345678)
1020     * `endianflip' (12345678 -> 87654321)
1021     * `intswap'    (12345678 -> 56781234)
1022
1023 Configuring with DPDK
1024 ---------------------
1025
1026 Note: DPDK 16.04 is the minimum version and currently supported version of DPDK
1027 required for the dpdkstat plugin. This is to allow the plugin to take advantage
1028 of functions added to detect if the DPDK primary process is alive.
1029
1030 Note: For Ubuntu, GCC 4.9 is the minimum version required to build collectd
1031 with DPDK. Ubuntu 14.04, for example, has GCC 4.8 by default and will require
1032 an upgrade:
1033   $ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
1034   $ sudo apt-get update
1035   $ sudo apt-get install gcc-4.9
1036 Alternatively, if you know that the platform that you wish to run collectd
1037 on supports the SSSE3 instruction set, you can run make as follows:
1038   $ make -j CFLAGS+='-mssse3'
1039
1040 Build DPDK for use with collectd:
1041   To compile DPDK for use with collectd dpdkstat start by:
1042     - Clone DPDK:
1043       $ git clone git://dpdk.org/dpdk
1044     - Checkout the system requirements at
1045       http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html and make sure you have
1046       the required tools and hugepage setup as specified there.
1047       NOTE: It's recommended to use the 1GB hugepage setup for best performance,
1048             please follow the instruction for "Reserving Hugepages for DPDK Use"
1049             in the link above.
1050       However if you plan on configuring 2MB hugepages on the fly please ensure
1051       to add appropriate commands to reserve hugepages in a system startup script
1052       if collectd is booted at system startup time. These commands include:
1053           mkdir -p /mnt/huge
1054           mount -t hugetlbfs nodev /mnt/huge
1055           echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
1056     - To configure the DPDK build for the combined shared library modify
1057       config/common_base in your DPDK as follows
1058         #
1059         # Compile to share library
1060         #
1061         -CONFIG_RTE_BUILD_SHARED_LIB=n
1062         +CONFIG_RTE_BUILD_SHARED_LIB=y
1063     - Prepare the configuration for the appropriate target as specified at:
1064       http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html.
1065       For example:
1066           $ make config T=x86_64-native-linuxapp-gcc
1067     - Build the target:
1068           $ make
1069     - Install DPDK to /usr
1070           $ sudo make install prefix=/usr
1071       NOTE 1: You must run make install as the configuration of collectd with
1072             DPDK expects DPDK to be installed somewhere.
1073       NOTE 2: If you don't specify a prefix then DPDK will be installed in /usr/local/
1074       NOTE 3: If you are not root then use sudo to make install DPDK to the appropriate
1075             location.
1076     - Check that the DPDK library has been installed in /usr/lib or /lib
1077           $ ls /usr/lib | grep dpdk
1078     - Bind the interfaces to use with dpdkstat to DPDK:
1079       DPDK devices can be setup with either the VFIO (for DPDK 1.7+) or UIO modules.
1080       Note: UIO requires inserting an out of tree driver igb_uio.ko that is available
1081       in DPDK.
1082       UIO Setup:
1083       - Insert uio.ko:
1084            $ sudo modprobe uio
1085       - Insert igb_uio.ko:
1086            $ sudo insmod $DPDK_BUILD/kmod/igb_uio.ko
1087       - Bind network device to igb_uio:
1088            $ sudo $DPDK_DIR/tools/dpdk_nic_bind.py --bind=igb_uio eth1
1089       VFIO Setup:
1090       - VFIO needs to be supported in the kernel and the BIOS. More information can be found
1091         @ http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html.
1092       - Insert the `vfio-pci.ko' module: modprobe vfio-pci
1093       - Set the correct permissions for the vfio device:
1094            $ sudo /usr/bin/chmod a+x /dev/vfio
1095            $ sudo /usr/bin/chmod 0666 /dev/vfio/*
1096      - Bind the network device to vfio-pci:
1097            $ sudo $DPDK_DIR/tools/dpdk_nic_bind.py --bind=vfio-pci eth1
1098        NOTE: Please ensure to add appropriate commands to bind the network
1099              interfaces to DPDK in a system startup script if collectd is
1100              booted at system startup time.
1101      - Run ldconfig to update the shared library cache.
1102
1103   Build static DPDK library for use with collectd:
1104      - To configure DPDK to build the combined static library libdpdk.a
1105        ensure that CONFIG_RTE_BUILD_SHARED_LIB is set to n in
1106        config/common_base in your DPDK as follows:
1107        #
1108        # Compile to share library
1109        #
1110        CONFIG_RTE_BUILD_SHARED_LIB=n
1111      - Prepare the configuration for the appropriate target as specified at:
1112        http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html.
1113        For example:
1114           $ make config T=x86_64-native-linuxapp-gcc
1115      - Build the target using -fPIC:
1116           $ make EXTRA_CFLAGS=-fPIC -j
1117      - Install DPDK to /usr
1118           $ sudo make install prefix=/usr
1119
1120 Configure collectd with DPDK:
1121 NOTE: The Address-Space Layout Randomization (ASLR) security feature in Linux should
1122         be disabled, in order for the same hugepage memory mappings to be present in all
1123         DPDK multi-process applications. Note that this has security implications.
1124         To disable ASLR:
1125                 $ echo 0 > /proc/sys/kernel/randomize_va_space
1126         To fully enable ASLR:
1127                 $ echo 2 > /proc/sys/kernel/randomize_va_space
1128         See http://dpdk.org/doc/guides/prog_guide/multi_proc_support.html
1129
1130     - Generate the build script as specified below. (i.e. run `build.sh').
1131     - Configure collectd with the DPDK shared library:
1132        ./configure --with-libdpdk=/usr
1133       NOTE: To configure collectd with the DPDK static library:
1134        ./configure --with-libdpdk=/usr CFLAGS=" -lpthread -Wl,--whole-archive
1135         -Wl,-ldpdk -Wl,-lm -Wl,-lrt -Wl,-lpcap -Wl,-ldl -Wl,--no-whole-archive"
1136
1137        Libraries:
1138        ...
1139        libdpdk  . . . . . . . . yes
1140
1141        Modules:
1142        ...
1143        dpdkstat . . . . . . .yes
1144
1145
1146     - Make sure that dpdk and dpdkstat are enabled in the configuration log:
1147
1148     - Build collectd:
1149           $ make -j && make -j install.
1150       NOTE: As mentioned above, if you are building on Ubuntu 14.04 with GCC <= 4.8.X,
1151         you need to use:
1152           $  make -j CFLAGS+='-mssse3' && make -j install
1153
1154 Usage of dpdkstat:
1155     - The same PCI device configuration should be passed to the primary process
1156       as the secondary process uses the same port indexes as the primary.
1157       NOTE: A blacklist/whitelist of NICs isn't supported yet.
1158
1159 Contact
1160 -------
1161
1162   For questions, bug reports, development information and basically all other
1163   concerns please send an email to collectd's mailing list at
1164   <list at collectd.org>.
1165
1166   For live discussion and more personal contact visit us in IRC, we're in
1167   channel #collectd on freenode.
1168
1169
1170 Author
1171 ------
1172
1173   Florian octo Forster <octo at collectd.org>,
1174   Sebastian tokkee Harl <sh at tokkee.org>,
1175   and many contributors (see `AUTHORS').
1176
1177   Please use GitHub reporting bugs and submitting pull requests.
1178   See CONTRIBUTING.md for details.