1 collectd - System information collection daemon
2 =================================================
3 https://collectd.org/
5 About
6 -----
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.
13 Features
14 --------
16 * collectd is able to collect the following data:
18 - apache
19 Apache server utilization: Number of bytes transferred, number of
20 requests handled and detailed scoreboard statistics
22 - apcups
23 APC UPS Daemon: UPS charge, load, input/output/battery voltage, etc.
25 - apple_sensors
26 Sensors in Macs running Mac OS X / Darwin: Temperature, fan speed and
27 voltage sensors.
29 - aquaero
30 Various sensors in the Aquaero 5 water cooling board made by Aquacomputer.
32 - ascent
33 Statistics about Ascent, a free server for the game `World of Warcraft'.
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.
40 - battery
41 Batterycharge, -current and voltage of ACPI and PMU based laptop
42 batteries.
44 - bind
45 Name server and resolver statistics from the `statistics-channel'
46 interface of BIND 9.5, 9,6 and later.
48 - ceph
49 Statistics from the Ceph distributed storage system.
51 - cgroups
52 CPU accounting information for process groups under Linux.
54 - chrony
55 Chrony daemon statistics: Local clock drift, offset to peers, etc.
57 - conntrack
58 Number of nf_conntrack entries.
60 - contextswitch
61 Number of context switches done by the operating system.
63 - cpu
64 CPU utilization: Time spent in the system, user, nice, idle, and related
65 states.
67 - cpufreq
68 CPU frequency (For laptops with speed step or a similar technology)
70 - cpusleep
71 CPU sleep: Time spent in suspend (For mobile devices which enter suspend automatically)
73 - curl
74 Parse statistics from websites using regular expressions.
76 - curl_json
77 Retrieves JSON data via cURL and parses it according to user
78 configuration.
80 - curl_xml
81 Retrieves XML data via cURL and parses it according to user
82 configuration.
84 - dbi
85 Executes SQL statements on various databases and interprets the returned
86 data.
88 - df
89 Mountpoint usage (Basically the values `df(1)' delivers)
91 - disk
92 Disk utilization: Sectors read/written, number of read/write actions,
93 average time an IO-operation took to complete.
95 - dns
96 DNS traffic: Query types, response codes, opcodes and traffic/octets
97 transferred.
99 - drbd
100 Collect individual drbd resource statistics.
102 - email
103 Email statistics: Count, traffic, spam scores and checks.
104 See collectd-email(5).
106 - entropy
107 Amount of entropy available to the system.
109 - ethstat
110 Network interface card statistics.
112 - exec
113 Values gathered by a custom program or script.
114 See collectd-exec(5).
116 - fhcount
117 File handles statistics.
119 - filecount
120 Count the number of files in directories.
122 - fscache
123 Linux file-system based caching framework statistics.
125 - gmond
126 Receive multicast traffic from Ganglia instances.
128 - gps
129 Monitor gps related data through gpsd.
131 - grpc
132 Receive values over the network using the gRPC framework.
134 - hddtemp
135 Hard disk temperatures using hddtempd.
137 - hugepages
138 Report the number of used and free hugepages. More info on
139 hugepages can be found here:
140 https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt.
142 - interface
143 Interface traffic: Number of octets, packets and errors for each
144 interface.
146 - ipc
147 IPC counters: semaphores used, number of allocated segments in shared
148 memory and more.
150 - ipmi
151 IPMI (Intelligent Platform Management Interface) sensors information.
153 - iptables
154 Iptables' counters: Number of bytes that were matched by a certain
155 iptables rule.
157 - ipvs
158 IPVS connection statistics (number of connections, octets and packets
159 for each service and destination).
160 See http://www.linuxvirtualserver.org/software/index.html.
162 - irq
163 IRQ counters: Frequency in which certain interrupts occur.
165 - java
166 Integrates a `Java Virtual Machine' (JVM) to execute plugins in Java
167 bytecode. See “Configuring with libjvm” below.
169 - load
170 System load average over the last 1, 5 and 15 minutes.
172 - lpar
173 Detailed CPU statistics of the “Logical Partitions” virtualization
174 technique built into IBM's POWER processors.
176 - lua
177 The Lua plugin implements a Lua interpreter into collectd. This
178 makes it possible to write plugins in Lua which are executed by
179 collectd without the need to start a heavy interpreter every interval.
180 See collectd-lua(5) for details.
182 - lvm
183 Size of “Logical Volumes” (LV) and “Volume Groups” (VG) of Linux'
184 “Logical Volume Manager” (LVM).
186 - madwifi
187 Queries very detailed usage statistics from wireless LAN adapters and
188 interfaces that use the Atheros chipset and the MadWifi driver.
190 - mbmon
191 Motherboard sensors: temperature, fan speed and voltage information,
192 using mbmon(1).
194 - md
195 Linux software-RAID device information (number of active, failed, spare
196 and missing disks).
198 - memcachec
199 Query and parse data from a memcache daemon (memcached).
201 - memcached
202 Statistics of the memcached distributed caching system.
203 <http://www.danga.com/memcached/>
205 - memory
206 Memory utilization: Memory occupied by running processes, page cache,
207 buffer cache and free.
209 - mic
210 Collects CPU usage, memory usage, temperatures and power consumption from
211 Intel Many Integrated Core (MIC) CPUs.
213 - modbus
214 Reads values from Modbus/TCP enabled devices. Supports reading values
215 from multiple "slaves" so gateway devices can be used.
217 - mqtt
218 Publishes and subscribes to MQTT topics.
220 - multimeter
221 Information provided by serial multimeters, such as the `Metex
222 M-4650CR'.
224 - mysql
225 MySQL server statistics: Commands issued, handlers triggered, thread
226 usage, query cache utilization and traffic/octets sent and received.
228 - netapp
229 Plugin to query performance values from a NetApp storage system using the
230 “Manage ONTAP” SDK provided by NetApp.
232 - netlink
233 Very detailed Linux network interface and routing statistics. You can get
234 (detailed) information on interfaces, qdiscs, classes, and, if you can
235 make use of it, filters.
237 - network
238 Receive values that were collected by other hosts. Large setups will
239 want to collect the data on one dedicated machine, and this is the
240 plugin of choice for that.
242 - nfs
243 NFS Procedures: Which NFS command were called how often. Only NFSv2 and
244 NFSv3 right now.
246 - nginx
247 Collects statistics from `nginx' (speak: engine X), a HTTP and mail
248 server/proxy.
250 - ntpd
251 NTP daemon statistics: Local clock drift, offset to peers, etc.
253 - numa
254 Information about Non-Uniform Memory Access (NUMA).
256 - nut
257 Network UPS tools: UPS current, voltage, power, charge, utilisation,
258 temperature, etc. See upsd(8).
260 - olsrd
261 Queries routing information from the “Optimized Link State Routing”
262 daemon.
264 - onewire (EXPERIMENTAL!)
265 Read onewire sensors using the owcapu library of the owfs project.
266 Please read in collectd.conf(5) why this plugin is experimental.
268 - openldap
269 Read monitoring information from OpenLDAP's cn=Monitor subtree.
271 - openvpn
272 RX and TX of each client in openvpn-status.log (status-version 2).
273 <http://openvpn.net/index.php/documentation/howto.html>
275 - oracle
276 Query data from an Oracle database.
278 - perl
279 The perl plugin implements a Perl-interpreter into collectd. You can
280 write your own plugins in Perl and return arbitrary values using this
281 API. See collectd-perl(5).
283 - pf
284 Query statistics from BSD's packet filter "pf".
286 - pinba
287 Receive and dispatch timing values from Pinba, a profiling extension for
288 PHP.
290 - ping
291 Network latency: Time to reach the default gateway or another given
292 host.
294 - postgresql
295 PostgreSQL database statistics: active server connections, transaction
296 numbers, block IO, table row manipulations.
298 - powerdns
299 PowerDNS name server statistics.
301 - processes
302 Process counts: Number of running, sleeping, zombie, ... processes.
304 - protocols
305 Counts various aspects of network protocols such as IP, TCP, UDP, etc.
307 - python
308 The python plugin implements a Python interpreter into collectd. This
309 makes it possible to write plugins in Python which are executed by
310 collectd without the need to start a heavy interpreter every interval.
311 See collectd-python(5) for details.
313 - redis
314 The redis plugin gathers information from a Redis server, including:
315 uptime, used memory, total connections etc.
317 - routeros
318 Query interface and wireless registration statistics from RouterOS.
320 - rrdcached
321 RRDtool caching daemon (RRDcacheD) statistics.
323 - sensors
324 System sensors, accessed using lm_sensors: Voltages, temperatures and
325 fan rotation speeds.
327 - serial
328 RX and TX of serial interfaces. Linux only; needs root privileges.
330 - sigrok
331 Uses libsigrok as a backend, allowing any sigrok-supported device
332 to have its measurements fed to collectd. This includes multimeters,
333 sound level meters, thermometers, and much more.
335 - smart
336 Collect SMART statistics, notably load cycle count, temperature
337 and bad sectors.
339 - snmp
340 Read values from SNMP (Simple Network Management Protocol) enabled
341 network devices such as switches, routers, thermometers, rack monitoring
342 servers, etc. See collectd-snmp(5).
344 - statsd
345 Acts as a StatsD server, reading values sent over the network from StatsD
346 clients and calculating rates and other aggregates out of these values.
348 - swap
349 Pages swapped out onto hard disk or whatever is called `swap' by the OS..
351 - table
352 Parse table-like structured files.
354 - tail
355 Follows (tails) log files, parses them by lines and submits matched
356 values.
358 - tail_csv
359 Follows (tails) files in CSV format, parses each line and submits
360 extracted values.
362 - tape
363 Bytes and operations read and written on tape devices. Solaris only.
365 - tcpconns
366 Number of TCP connections to specific local and remote ports.
368 - teamspeak2
369 TeamSpeak2 server statistics.
371 - ted
372 Plugin to read values from `The Energy Detective' (TED).
374 - thermal
375 Linux ACPI thermal zone information.
377 - tokyotyrant
378 Reads the number of records and file size from a running Tokyo Tyrant
379 server.
381 - turbostat
382 Reads CPU frequency and C-state residency on modern Intel
383 turbo-capable processors.
385 - uptime
386 System uptime statistics.
388 - users
389 Users currently logged in.
391 - varnish
392 Various statistics from Varnish, an HTTP accelerator.
394 - virt
395 CPU, memory, disk and network I/O statistics from virtual machines.
397 - vmem
398 Virtual memory statistics, e. g. the number of page-ins/-outs or the
399 number of pagefaults.
401 - vserver
402 System resources used by Linux VServers.
403 See <http://linux-vserver.org/>.
405 - wireless
406 Link quality of wireless cards. Linux only.
408 - xencpu
409 XEN Hypervisor CPU stats.
411 - xmms
412 Bitrate and frequency of music played with XMMS.
414 - zfs_arc
415 Statistics for ZFS' “Adaptive Replacement Cache” (ARC).
417 - zone
418 Measures the percentage of cpu load per container (zone) under Solaris 10
419 and higher
421 - zookeeper
422 Read data from Zookeeper's MNTR command.
424 * Output can be written or sent to various destinations by the following
425 plugins:
427 - amqp
428 Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
429 server, such as RabbitMQ.
431 - csv
432 Write to comma separated values (CSV) files. This needs lots of
433 diskspace but is extremely portable and can be analysed with almost
434 every program that can analyse anything. Even Microsoft's Excel..
436 - lua
437 It's possible to implement write plugins in Lua using the Lua
438 plugin. See collectd-lua(5) for details.
440 - network
441 Send the data to a remote host to save the data somehow. This is useful
442 for large setups where the data should be saved by a dedicated machine.
444 - perl
445 Of course the values are propagated to plugins written in Perl, too, so
446 you can easily do weird stuff with the plugins we didn't dare think of
447 ;) See collectd-perl(5).
449 - python
450 It's possible to implement write plugins in Python using the python
451 plugin. See collectd-python(5) for details.
453 - rrdcached
454 Output to round-robin-database (RRD) files using the RRDtool caching
455 daemon (RRDcacheD) - see rrdcached(1). That daemon provides a general
456 implementation of the caching done by the `rrdtool' plugin.
458 - rrdtool
459 Output to round-robin-database (RRD) files using librrd. See rrdtool(1).
460 This is likely the most popular destination for such values. Since
461 updates to RRD-files are somewhat expensive this plugin can cache
462 updates to the files and write a bunch of updates at once, which lessens
463 system load a lot.
465 - unixsock
466 One can query the values from the unixsock plugin whenever they're
467 needed. Please read collectd-unixsock(5) for a description on how that's
468 done.
470 - write_graphite
471 Sends data to Carbon, the storage layer of Graphite using TCP or UDP. It
472 can be configured to avoid logging send errors (especially useful when
473 using UDP).
475 - write_http
476 Sends the values collected by collectd to a web-server using HTTP POST
477 requests. The transmitted data is either in a form understood by the
478 Exec plugin or formatted in JSON.
480 - write_kafka
481 Sends data to Apache Kafka, a distributed queue.
483 - write_log
484 Writes data to the log
486 - write_mongodb
487 Sends data to MongoDB, a NoSQL database.
489 - write_redis
490 Sends the values to a Redis key-value database server.
492 - write_riemann
493 Sends data to Riemann, a stream processing and monitoring system.
495 - write_sensu
496 Sends data to Sensu, a stream processing and monitoring system, via the
497 Sensu client local TCP socket.
499 - write_tsdb
500 Sends data OpenTSDB, a scalable no master, no shared state time series
501 database.
503 * Logging is, as everything in collectd, provided by plugins. The following
504 plugins keep us informed about what's going on:
506 - logfile
507 Writes log messages to a file or STDOUT/STDERR.
509 - perl
510 Log messages are propagated to plugins written in Perl as well.
511 See collectd-perl(5).
513 - python
514 It's possible to implement log plugins in Python using the python plugin.
515 See collectd-python(5) for details.
517 - syslog
518 Logs to the standard UNIX logging mechanism, syslog.
520 - log_logstash
521 Writes log messages formatted as logstash JSON events.
523 * Notifications can be handled by the following plugins:
525 - notify_desktop
526 Send a desktop notification to a notification daemon, as defined in
527 the Desktop Notification Specification. To actually display the
528 notifications, notification-daemon is required.
529 See http://www.galago-project.org/specs/notification/.
531 - notify_email
532 Send an E-mail with the notification message to the configured
533 recipients.
535 - notify_nagios
536 Submit notifications as passive check results to a local nagios instance.
538 - exec
539 Execute a program or script to handle the notification.
540 See collectd-exec(5).
542 - logfile
543 Writes the notification message to a file or STDOUT/STDERR.
545 - network
546 Send the notification to a remote host to handle it somehow.
548 - perl
549 Notifications are propagated to plugins written in Perl as well.
550 See collectd-perl(5).
552 - python
553 It's possible to implement notification plugins in Python using the
554 python plugin. See collectd-python(5) for details.
556 * Value processing can be controlled using the "filter chain" infrastructure
557 and "matches" and "targets". The following plugins are available:
559 - match_empty_counter
560 Match counter values which are currently zero.
562 - match_hashed
563 Match values using a hash function of the hostname.
565 - match_regex
566 Match values by their identifier based on regular expressions.
568 - match_timediff
569 Match values with an invalid timestamp.
571 - match_value
572 Select values by their data sources' values.
574 - target_notification
575 Create and dispatch a notification.
577 - target_replace
578 Replace parts of an identifier using regular expressions.
580 - target_scale
581 Scale (multiply) values by an arbitrary value.
583 - target_set
584 Set (overwrite) entire parts of an identifier.
586 * Miscellaneous plugins:
588 - aggregation
589 Selects multiple value lists based on patterns or regular expressions
590 and creates new aggregated values lists from those.
592 - threshold
593 Checks values against configured thresholds and creates notifications if
594 values are out of bounds. See collectd-threshold(5) for details.
596 - uuid
597 Sets the hostname to a unique identifier. This is meant for setups
598 where each client may migrate to another physical host, possibly going
599 through one or more name changes in the process.
601 * Performance: Since collectd is running as a daemon it doesn't spend much
602 time starting up again and again. With the exception of the exec plugin no
603 processes are forked. Caching in output plugins, such as the rrdtool and
604 network plugins, makes sure your resources are used efficiently. Also,
605 since collectd is programmed multithreaded it benefits from hyper-threading
606 and multicore processors and makes sure that the daemon isn't idle if only
607 one plugin waits for an IO-operation to complete.
609 * Once set up, hardly any maintenance is necessary. Setup is kept as easy
610 as possible and the default values should be okay for most users.
613 Operation
614 ---------
616 * collectd's configuration file can be found at `sysconfdir'/collectd.conf.
617 Run `collectd -h' for a list of built-in defaults. See `collectd.conf(5)'
618 for a list of options and a syntax description.
620 * When the `csv' or `rrdtool' plugins are loaded they'll write the values to
621 files. The usual place for these files is beneath `/var/lib/collectd'.
623 * When using some of the plugins, collectd needs to run as user root, since
624 only root can do certain things, such as craft ICMP packages needed to ping
625 other hosts. collectd should NOT be installed setuid root since it can be
626 used to overwrite valuable files!
628 * Sample scripts to generate graphs reside in `contrib/' in the source
629 package or somewhere near `/usr/share/doc/collectd' in most distributions.
630 Please be aware that those script are meant as a starting point for your
631 own experiments.. Some of them require the `RRDs' Perl module.
632 (`librrds-perl' on Debian) If you have written a more sophisticated
633 solution please share it with us.
635 * The RRAs of the automatically created RRD files depend on the `step'
636 and `heartbeat' settings given. If change these settings you may need to
637 re-create the files, losing all data. Please be aware of that when changing
638 the values and read the rrdtool(1) manpage thoroughly.
641 collectd and chkrootkit
642 -----------------------
644 If you are using the `dns' plugin chkrootkit(1) will report collectd as a
645 packet sniffer ("<iface>: PACKET SNIFFER(/usr/sbin/collectd[<pid>])"). The
646 plugin captures all UDP packets on port 53 to analyze the DNS traffic. In
647 this case, collectd is a legitimate sniffer and the report should be
648 considered to be a false positive. However, you might want to check that
649 this really is collectd and not some other, illegitimate sniffer.
652 Prerequisites
653 -------------
655 To compile collectd from source you will need:
657 * Usual suspects: C compiler, linker, preprocessor, make, ...
659 * A POSIX-threads (pthread) implementation.
660 Since gathering some statistics is slow (network connections, slow devices,
661 etc) collectd is parallelized. The POSIX threads interface is being
662 used and should be found in various implementations for hopefully all
663 platforms.
665 * aerotools-ng (optional)
666 Used by the `aquaero' plugin. Currently, the `libaquaero5' library, which
667 is used by the `aerotools-ng' toolkit, is not compiled as a shared object
668 nor does it feature an installation routine. Therefore, you need to point
669 collectd's configure script at the source directory of the `aerotools-ng'
670 project.
671 <https://github.com/lynix/aerotools-ng>
673 * CoreFoundation.framework and IOKit.framework (optional)
674 For compiling on Darwin in general and the `apple_sensors' plugin in
675 particular.
676 <http://developer.apple.com/corefoundation/>
678 * libatasmart (optional)
679 Used by the `smart' plugin.
680 <http://git.0pointer.de/?p=libatasmart.git>
682 * libcap (optional)
683 The `turbostat' plugin can optionally build Linux Capabilities support,
684 which avoids full privileges requirement (aka. running as root) to read
685 values.
686 <http://sites.google.com/site/fullycapable/>
688 * libclntsh (optional)
689 Used by the `oracle' plugin.
691 * libhiredis (optional)
692 Used by the redis plugin. Please note that you require a 0.10.0 version
693 or higher. <https://github.com/redis/hiredis>
695 * libcurl (optional)
696 If you want to use the `apache', `ascent', `bind', `curl', `curl_json',
697 `curl_xml', `nginx', or `write_http' plugin.
698 <http://curl.haxx.se/>
700 * libdbi (optional)
701 Used by the `dbi' plugin to connect to various databases.
702 <http://libdbi.sourceforge.net/>
704 * libesmtp (optional)
705 For the `notify_email' plugin.
706 <http://www.stafford.uklinux.net/libesmtp/>
708 * libganglia (optional)
709 Used by the `gmond' plugin to process data received from Ganglia.
710 <http://ganglia.info/>
712 * libgrpc (optional)
713 Used by the `grpc' plugin. gRPC requires a C++ compiler supporting the
714 C++11 standard.
715 <https://grpc.io/>
717 * libgcrypt (optional)
718 Used by the `network' plugin for encryption and authentication.
719 <http://www.gnupg.org/>
721 * libgps (optional)
722 Used by the `gps' plugin.
723 <http://developer.berlios.de/projects/gpsd/>
725 * libhal (optional)
726 If present, the `uuid' plugin will check for UUID from HAL.
727 <http://hal.freedesktop.org/>
729 * libi2c-dev (optional)
730 Used for the plugin `barometer', provides just the i2c-dev.h header file
731 for user space i2c development.
733 * libiptc (optional)
734 For querying iptables counters.
735 <http://netfilter.org/>
737 * libjvm (optional)
738 Library that encapsulates the `Java Virtual Machine' (JVM). This library is
739 used by the `java' plugin to execute Java bytecode. See “Configuring with
740 libjvm” below.
741 <http://openjdk.java.net/> (and others)
743 * libldap (optional)
744 Used by the `openldap' plugin.
745 <http://www.openldap.org/>
747 * liblua (optional)
748 Used by the `lua' plugin. Currently, Lua 5.1 and later are supported.
749 <https://www.lua.org/>
751 * liblvm2 (optional)
752 Used by the `lvm' plugin.
753 <ftp://sources.redhat.com/pub/lvm2/>
755 * libmemcached (optional)
756 Used by the `memcachec' plugin to connect to a memcache daemon.
757 <http://tangent.org/552/libmemcached.html>
759 * libmnl (optional)
760 Used by the `netlink' plugin.
761 <http://www.netfilter.org/projects/libmnl/>
763 * libmodbus (optional)
764 Used by the `modbus' plugin to communicate with Modbus/TCP devices. The
765 `modbus' plugin works with version 2.0.3 of the library – due to frequent
766 API changes other versions may or may not compile cleanly.
767 <http://www.libmodbus.org/>
769 * libmysqlclient (optional)
770 Unsurprisingly used by the `mysql' plugin.
771 <http://dev.mysql.com/>
773 * libnetapp (optional)
774 Required for the `netapp' plugin.
775 This library is part of the “Manage ONTAP SDK” published by NetApp.
777 * libnetsnmp (optional)
778 For the `snmp' plugin.
779 <http://www.net-snmp.org/>
781 * libnotify (optional)
782 For the `notify_desktop' plugin.
783 <http://www.galago-project.org/>
785 * libopenipmi (optional)
786 Used by the `ipmi' plugin to prove IPMI devices.
787 <http://openipmi.sourceforge.net/>
789 * liboping (optional)
790 Used by the `ping' plugin to send and receive ICMP packets.
791 <http://octo.it/liboping/>
793 * libowcapi (optional)
794 Used by the `onewire' plugin to read values from onewire sensors (or the
795 owserver(1) daemon).
796 <http://www.owfs.org/>
798 * libpcap (optional)
799 Used to capture packets by the `dns' plugin.
800 <http://www.tcpdump.org/>
802 * libperfstat (optional)
803 Used by various plugins to gather statistics under AIX.
805 * libperl (optional)
806 Obviously used by the `perl' plugin. The library has to be compiled with
807 ithread support (introduced in Perl 5.6.0).
808 <http://www.perl.org/>
810 * libpq (optional)
811 The PostgreSQL C client library used by the `postgresql' plugin.
812 <http://www.postgresql.org/>
814 * libprotobuf, protoc 3.0+ (optional)
815 Used by the `grpc' plugin to generate service stubs and code to handle
816 network packets of collectd's protobuf-based network protocol.
817 <https://developers.google.com/protocol-buffers/>
819 * libprotobuf-c, protoc-c (optional)
820 Used by the `pinba' plugin to generate a parser for the network packets
821 sent by the Pinba PHP extension.
822 <http://code.google.com/p/protobuf-c/>
824 * libpython (optional)
825 Used by the `python' plugin. Currently, Python 2.6 and later and Python 3
826 are supported.
827 <http://www.python.org/>
829 * librabbitmq (optional; also called “rabbitmq-c”)
830 Used by the `amqp' plugin for AMQP connections, for example to RabbitMQ.
831 <http://hg.rabbitmq.com/rabbitmq-c/>
833 * librdkafka (optional; also called “rdkafka”)
834 Used by the `write_kafka' plugin for producing messages and sending them
835 to a Kafka broker.
836 <https://github.com/edenhill/librdkafka>
838 * librouteros (optional)
839 Used by the `routeros' plugin to connect to a device running `RouterOS'.
840 <http://octo.it/librouteros/>
842 * librrd (optional)
843 Used by the `rrdtool' and `rrdcached' plugins. The latter requires RRDtool
844 client support which was added after version 1.3 of RRDtool. Versions 1.0,
845 1.2 and 1.3 are known to work with the `rrdtool' plugin.
846 <http://oss.oetiker.ch/rrdtool/>
848 * librt, libsocket, libkstat, libdevinfo (optional)
849 Various standard Solaris libraries which provide system functions.
850 <http://developers.sun.com/solaris/>
852 * libsensors (optional)
853 To read from `lm_sensors', see the `sensors' plugin.
854 <http://www.lm-sensors.org/>
856 * libsigrok (optional)
857 Used by the `sigrok' plugin. In addition, libsigrok depends on glib,
858 libzip, and optionally (depending on which drivers are enabled) on
859 libusb, libftdi and libudev.
861 * libstatgrab (optional)
862 Used by various plugins to collect statistics on systems other than Linux
863 and/or Solaris.
864 <http://www.i-scream.org/libstatgrab/>
866 * libtokyotyrant (optional)
867 Used by the `tokyotyrant' plugin.
868 <http://1978th.net/tokyotyrant/>
870 * libupsclient/nut (optional)
871 For the `nut' plugin which queries nut's `upsd'.
872 <http://networkupstools.org/>
874 * libvirt (optional)
875 Collect statistics from virtual machines.
876 <http://libvirt.org/>
878 * libxml2 (optional)
879 Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
880 `virt' plugins.
881 <http://xmlsoft.org/>
883 * libxen (optional)
884 Used by the `xencpu' plugin.
885 <http://xenbits.xensource.com/>
887 * libxmms (optional)
888 <http://www.xmms.org/>
890 * libyajl (optional)
891 Parse JSON data. This is needed for the `ceph', `curl_json' and
892 `log_logstash' plugins.
893 <http://github.com/lloyd/yajl>
895 * libvarnish (optional)
896 Fetches statistics from a Varnish instance. This is needed for the
897 `varnish' plugin.
898 <http://varnish-cache.org>
900 * riemann-c-client (optional)
901 For the `write_riemann' plugin.
902 <https://github.com/algernon/riemann-c-client>
904 Configuring / Compiling / Installing
905 ------------------------------------
907 To configure, build and install collectd with the default settings, run
908 `./configure && make && make install'. For detailed, generic instructions
909 see INSTALL. For a complete list of configure options and their description,
910 run `./configure --help'.
912 By default, the configure script will check for all build dependencies and
913 disable all plugins whose requirements cannot be fulfilled (any other plugin
914 will be enabled). To enable a plugin, install missing dependencies (see
915 section `Prerequisites' above) and rerun `configure'. If you specify the
916 `--enable-<plugin>' configure option, the script will fail if the depen-
917 dencies for the specified plugin are not met. In that case you can force the
918 plugin to be built using the `--enable-<plugin>=force' configure option.
919 This will most likely fail though unless you're working in a very unusual
920 setup and you really know what you're doing. If you specify the
921 `--disable-<plugin>' configure option, the plugin will not be built. If you
922 specify the `--enable-all-plugins' or `--disable-all-plugins' configure
923 options, all plugins will be enabled or disabled respectively by default.
924 Explicitly enabling or disabling a plugin overwrites the default for the
925 specified plugin. These options are meant for package maintainers and should
926 not be used in everyday situations.
928 By default, collectd will be installed into `/opt/collectd'. You can adjust
929 this setting by specifying the `--prefix' configure option - see INSTALL for
930 details. If you pass DESTDIR=<path> to `make install', <path> will be
931 prefixed to all installation directories. This might be useful when creating
932 packages for collectd.
934 Configuring with libjvm
935 -----------------------
937 To determine the location of the required files of a Java installation is not
938 an easy task, because the locations vary with your kernel (Linux, SunOS, …)
939 and with your architecture (x86, SPARC, …) and there is no ‘java-config’
940 script we could use. Configuration of the JVM library is therefore a bit
941 tricky.
943 The easiest way to use the `--with-java=$JAVA_HOME' option, where
944 `$JAVA_HOME' is usually something like:
945 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14
947 The configure script will then use find(1) to look for the following files:
949 - jni.h
950 - jni_md.h
951 - libjvm.so
953 If found, appropriate CPP-flags and LD-flags are set and the following
954 library checks succeed.
956 If this doesn't work for you, you have the possibility to specify CPP-flags,
957 C-flags, LD-flags and LIBS for the ‘Java’ plugin by hand, using the
958 following environment variables:
960 - JAVA_CPPFLAGS
961 - JAVA_CFLAGS
962 - JAVA_LDFLAGS
963 - JAVA_LIBS
965 For example (shortened for demonstration purposes):
967 ./configure JAVA_CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
969 Adding "-ljvm" to JAVA_LIBS is done automatically, you don't have to
970 do that.
972 Generating the configure script
973 -------------------------------
975 Collectd ships with a `build.sh' script to generate the `configure'
976 script shipped with releases.
978 To generate the `configure` script, you'll need the following dependencies:
980 - autoconf
981 - automake
982 - flex
983 - bison
984 - libtool
985 - libtool-ltdl
986 - pkg-config
988 The `build.sh' script takes no arguments.
990 Crosscompiling
991 --------------
993 To compile correctly collectd needs to be able to initialize static
994 variables to NAN (Not A Number). Some C libraries, especially the GNU
995 libc, have a problem with that.
997 Luckily, with GCC it's possible to work around that problem: One can define
998 NAN as being (0.0 / 0.0) and `isnan' as `f != f'. However, to test this
999 ``implementation'' the configure script needs to compile and run a short
1000 test program. Obviously running a test program when doing a cross-
1001 compilation is, well, challenging.
1003 If you run into this problem, you can use the `--with-nan-emulation'
1004 configure option to force the use of this implementation. We can't promise
1005 that the compiled binary actually behaves as it should, but since NANs
1006 are likely never passed to the libm you have a good chance to be lucky.
1008 Likewise, collectd needs to know the layout of doubles in memory, in order
1009 to craft uniform network packets over different architectures. For this, it
1010 needs to know how to convert doubles into the memory layout used by x86. The
1011 configure script tries to figure this out by compiling and running a few
1012 small test programs. This is of course not possible when cross-compiling.
1013 You can use the `--with-fp-layout' option to tell the configure script which
1014 conversion method to assume. Valid arguments are:
1016 * `nothing' (12345678 -> 12345678)
1017 * `endianflip' (12345678 -> 87654321)
1018 * `intswap' (12345678 -> 56781234)
1021 Contact
1022 -------
1024 For questions, bug reports, development information and basically all other
1025 concerns please send an email to collectd's mailing list at
1026 <list at collectd.org>.
1028 For live discussion and more personal contact visit us in IRC, we're in
1029 channel #collectd on freenode.
1032 Author
1033 ------
1035 Florian octo Forster <octo at collectd.org>,
1036 Sebastian tokkee Harl <sh at tokkee.org>,
1037 and many contributors (see `AUTHORS').
1039 Please use GitHub reporting bugs and submitting pull requests.
1040 See CONTRIBUTING.md for details.