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 - interface
138 Interface traffic: Number of octets, packets and errors for each
139 interface.
141 - ipc
142 IPC counters: semaphores used, number of allocated segments in shared
143 memory and more.
145 - ipmi
146 IPMI (Intelligent Platform Management Interface) sensors information.
148 - iptables
149 Iptables' counters: Number of bytes that were matched by a certain
150 iptables rule.
152 - ipvs
153 IPVS connection statistics (number of connections, octets and packets
154 for each service and destination).
155 See http://www.linuxvirtualserver.org/software/index.html.
157 - irq
158 IRQ counters: Frequency in which certain interrupts occur.
160 - java
161 Integrates a `Java Virtual Machine' (JVM) to execute plugins in Java
162 bytecode. See “Configuring with libjvm” below.
164 - load
165 System load average over the last 1, 5 and 15 minutes.
167 - lpar
168 Detailed CPU statistics of the “Logical Partitions” virtualization
169 technique built into IBM's POWER processors.
171 - lua
172 The Lua plugin implements a Lua interpreter into collectd. This
173 makes it possible to write plugins in Lua which are executed by
174 collectd without the need to start a heavy interpreter every interval.
175 See collectd-lua(5) for details.
177 - lvm
178 Size of “Logical Volumes” (LV) and “Volume Groups” (VG) of Linux'
179 “Logical Volume Manager” (LVM).
181 - madwifi
182 Queries very detailed usage statistics from wireless LAN adapters and
183 interfaces that use the Atheros chipset and the MadWifi driver.
185 - mbmon
186 Motherboard sensors: temperature, fan speed and voltage information,
187 using mbmon(1).
189 - md
190 Linux software-RAID device information (number of active, failed, spare
191 and missing disks).
193 - memcachec
194 Query and parse data from a memcache daemon (memcached).
196 - memcached
197 Statistics of the memcached distributed caching system.
198 <http://www.danga.com/memcached/>
200 - memory
201 Memory utilization: Memory occupied by running processes, page cache,
202 buffer cache and free.
204 - mic
205 Collects CPU usage, memory usage, temperatures and power consumption from
206 Intel Many Integrated Core (MIC) CPUs.
208 - modbus
209 Reads values from Modbus/TCP enabled devices. Supports reading values
210 from multiple "slaves" so gateway devices can be used.
212 - mqtt
213 Publishes and subscribes to MQTT topics.
215 - multimeter
216 Information provided by serial multimeters, such as the `Metex
217 M-4650CR'.
219 - mysql
220 MySQL server statistics: Commands issued, handlers triggered, thread
221 usage, query cache utilization and traffic/octets sent and received.
223 - netapp
224 Plugin to query performance values from a NetApp storage system using the
225 “Manage ONTAP” SDK provided by NetApp.
227 - netlink
228 Very detailed Linux network interface and routing statistics. You can get
229 (detailed) information on interfaces, qdiscs, classes, and, if you can
230 make use of it, filters.
232 - network
233 Receive values that were collected by other hosts. Large setups will
234 want to collect the data on one dedicated machine, and this is the
235 plugin of choice for that.
237 - nfs
238 NFS Procedures: Which NFS command were called how often. Only NFSv2 and
239 NFSv3 right now.
241 - nginx
242 Collects statistics from `nginx' (speak: engine X), a HTTP and mail
243 server/proxy.
245 - ntpd
246 NTP daemon statistics: Local clock drift, offset to peers, etc.
248 - numa
249 Information about Non-Uniform Memory Access (NUMA).
251 - nut
252 Network UPS tools: UPS current, voltage, power, charge, utilisation,
253 temperature, etc. See upsd(8).
255 - olsrd
256 Queries routing information from the “Optimized Link State Routing”
257 daemon.
259 - onewire (EXPERIMENTAL!)
260 Read onewire sensors using the owcapu library of the owfs project.
261 Please read in collectd.conf(5) why this plugin is experimental.
263 - openldap
264 Read monitoring information from OpenLDAP's cn=Monitor subtree.
266 - openvpn
267 RX and TX of each client in openvpn-status.log (status-version 2).
268 <http://openvpn.net/index.php/documentation/howto.html>
270 - oracle
271 Query data from an Oracle database.
273 - perl
274 The perl plugin implements a Perl-interpreter into collectd. You can
275 write your own plugins in Perl and return arbitrary values using this
276 API. See collectd-perl(5).
278 - pf
279 Query statistics from BSD's packet filter "pf".
281 - pinba
282 Receive and dispatch timing values from Pinba, a profiling extension for
283 PHP.
285 - ping
286 Network latency: Time to reach the default gateway or another given
287 host.
289 - postgresql
290 PostgreSQL database statistics: active server connections, transaction
291 numbers, block IO, table row manipulations.
293 - powerdns
294 PowerDNS name server statistics.
296 - processes
297 Process counts: Number of running, sleeping, zombie, ... processes.
299 - protocols
300 Counts various aspects of network protocols such as IP, TCP, UDP, etc.
302 - python
303 The python plugin implements a Python interpreter into collectd. This
304 makes it possible to write plugins in Python which are executed by
305 collectd without the need to start a heavy interpreter every interval.
306 See collectd-python(5) for details.
308 - redis
309 The redis plugin gathers information from a Redis server, including:
310 uptime, used memory, total connections etc.
312 - routeros
313 Query interface and wireless registration statistics from RouterOS.
315 - rrdcached
316 RRDtool caching daemon (RRDcacheD) statistics.
318 - sensors
319 System sensors, accessed using lm_sensors: Voltages, temperatures and
320 fan rotation speeds.
322 - serial
323 RX and TX of serial interfaces. Linux only; needs root privileges.
325 - sigrok
326 Uses libsigrok as a backend, allowing any sigrok-supported device
327 to have its measurements fed to collectd. This includes multimeters,
328 sound level meters, thermometers, and much more.
330 - smart
331 Collect SMART statistics, notably load cycle count, temperature
332 and bad sectors.
334 - snmp
335 Read values from SNMP (Simple Network Management Protocol) enabled
336 network devices such as switches, routers, thermometers, rack monitoring
337 servers, etc. See collectd-snmp(5).
339 - statsd
340 Acts as a StatsD server, reading values sent over the network from StatsD
341 clients and calculating rates and other aggregates out of these values.
343 - swap
344 Pages swapped out onto hard disk or whatever is called `swap' by the OS..
346 - table
347 Parse table-like structured files.
349 - tail
350 Follows (tails) log files, parses them by lines and submits matched
351 values.
353 - tail_csv
354 Follows (tails) files in CSV format, parses each line and submits
355 extracted values.
357 - tape
358 Bytes and operations read and written on tape devices. Solaris only.
360 - tcpconns
361 Number of TCP connections to specific local and remote ports.
363 - teamspeak2
364 TeamSpeak2 server statistics.
366 - ted
367 Plugin to read values from `The Energy Detective' (TED).
369 - thermal
370 Linux ACPI thermal zone information.
372 - tokyotyrant
373 Reads the number of records and file size from a running Tokyo Tyrant
374 server.
376 - turbostat
377 Reads CPU frequency and C-state residency on modern Intel
378 turbo-capable processors.
380 - uptime
381 System uptime statistics.
383 - users
384 Users currently logged in.
386 - varnish
387 Various statistics from Varnish, an HTTP accelerator.
389 - virt
390 CPU, memory, disk and network I/O statistics from virtual machines.
392 - vmem
393 Virtual memory statistics, e. g. the number of page-ins/-outs or the
394 number of pagefaults.
396 - vserver
397 System resources used by Linux VServers.
398 See <http://linux-vserver.org/>.
400 - wireless
401 Link quality of wireless cards. Linux only.
403 - xencpu
404 XEN Hypervisor CPU stats.
406 - xmms
407 Bitrate and frequency of music played with XMMS.
409 - zfs_arc
410 Statistics for ZFS' “Adaptive Replacement Cache” (ARC).
412 - zone
413 Measures the percentage of cpu load per container (zone) under Solaris 10
414 and higher
416 - zookeeper
417 Read data from Zookeeper's MNTR command.
419 * Output can be written or sent to various destinations by the following
420 plugins:
422 - amqp
423 Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
424 server, such as RabbitMQ.
426 - csv
427 Write to comma separated values (CSV) files. This needs lots of
428 diskspace but is extremely portable and can be analysed with almost
429 every program that can analyse anything. Even Microsoft's Excel..
431 - lua
432 It's possible to implement write plugins in Lua using the Lua
433 plugin. See collectd-lua(5) for details.
435 - network
436 Send the data to a remote host to save the data somehow. This is useful
437 for large setups where the data should be saved by a dedicated machine.
439 - perl
440 Of course the values are propagated to plugins written in Perl, too, so
441 you can easily do weird stuff with the plugins we didn't dare think of
442 ;) See collectd-perl(5).
444 - python
445 It's possible to implement write plugins in Python using the python
446 plugin. See collectd-python(5) for details.
448 - rrdcached
449 Output to round-robin-database (RRD) files using the RRDtool caching
450 daemon (RRDcacheD) - see rrdcached(1). That daemon provides a general
451 implementation of the caching done by the `rrdtool' plugin.
453 - rrdtool
454 Output to round-robin-database (RRD) files using librrd. See rrdtool(1).
455 This is likely the most popular destination for such values. Since
456 updates to RRD-files are somewhat expensive this plugin can cache
457 updates to the files and write a bunch of updates at once, which lessens
458 system load a lot.
460 - unixsock
461 One can query the values from the unixsock plugin whenever they're
462 needed. Please read collectd-unixsock(5) for a description on how that's
463 done.
465 - write_graphite
466 Sends data to Carbon, the storage layer of Graphite using TCP or UDP. It
467 can be configured to avoid logging send errors (especially useful when
468 using UDP).
470 - write_http
471 Sends the values collected by collectd to a web-server using HTTP POST
472 requests. The transmitted data is either in a form understood by the
473 Exec plugin or formatted in JSON.
475 - write_kafka
476 Sends data to Apache Kafka, a distributed queue.
478 - write_log
479 Writes data to the log
481 - write_mongodb
482 Sends data to MongoDB, a NoSQL database.
484 - write_redis
485 Sends the values to a Redis key-value database server.
487 - write_riemann
488 Sends data to Riemann, a stream processing and monitoring system.
490 - write_sensu
491 Sends data to Sensu, a stream processing and monitoring system, via the
492 Sensu client local TCP socket.
494 - write_tsdb
495 Sends data OpenTSDB, a scalable no master, no shared state time series
496 database.
498 * Logging is, as everything in collectd, provided by plugins. The following
499 plugins keep us informed about what's going on:
501 - logfile
502 Writes log messages to a file or STDOUT/STDERR.
504 - perl
505 Log messages are propagated to plugins written in Perl as well.
506 See collectd-perl(5).
508 - python
509 It's possible to implement log plugins in Python using the python plugin.
510 See collectd-python(5) for details.
512 - syslog
513 Logs to the standard UNIX logging mechanism, syslog.
515 - log_logstash
516 Writes log messages formatted as logstash JSON events.
518 * Notifications can be handled by the following plugins:
520 - notify_desktop
521 Send a desktop notification to a notification daemon, as defined in
522 the Desktop Notification Specification. To actually display the
523 notifications, notification-daemon is required.
524 See http://www.galago-project.org/specs/notification/.
526 - notify_email
527 Send an E-mail with the notification message to the configured
528 recipients.
530 - notify_nagios
531 Submit notifications as passive check results to a local nagios instance.
533 - exec
534 Execute a program or script to handle the notification.
535 See collectd-exec(5).
537 - logfile
538 Writes the notification message to a file or STDOUT/STDERR.
540 - network
541 Send the notification to a remote host to handle it somehow.
543 - perl
544 Notifications are propagated to plugins written in Perl as well.
545 See collectd-perl(5).
547 - python
548 It's possible to implement notification plugins in Python using the
549 python plugin. See collectd-python(5) for details.
551 * Value processing can be controlled using the "filter chain" infrastructure
552 and "matches" and "targets". The following plugins are available:
554 - match_empty_counter
555 Match counter values which are currently zero.
557 - match_hashed
558 Match values using a hash function of the hostname.
560 - match_regex
561 Match values by their identifier based on regular expressions.
563 - match_timediff
564 Match values with an invalid timestamp.
566 - match_value
567 Select values by their data sources' values.
569 - target_notification
570 Create and dispatch a notification.
572 - target_replace
573 Replace parts of an identifier using regular expressions.
575 - target_scale
576 Scale (multiply) values by an arbitrary value.
578 - target_set
579 Set (overwrite) entire parts of an identifier.
581 * Miscellaneous plugins:
583 - aggregation
584 Selects multiple value lists based on patterns or regular expressions
585 and creates new aggregated values lists from those.
587 - threshold
588 Checks values against configured thresholds and creates notifications if
589 values are out of bounds. See collectd-threshold(5) for details.
591 - uuid
592 Sets the hostname to a unique identifier. This is meant for setups
593 where each client may migrate to another physical host, possibly going
594 through one or more name changes in the process.
596 * Performance: Since collectd is running as a daemon it doesn't spend much
597 time starting up again and again. With the exception of the exec plugin no
598 processes are forked. Caching in output plugins, such as the rrdtool and
599 network plugins, makes sure your resources are used efficiently. Also,
600 since collectd is programmed multithreaded it benefits from hyper-threading
601 and multicore processors and makes sure that the daemon isn't idle if only
602 one plugin waits for an IO-operation to complete.
604 * Once set up, hardly any maintenance is necessary. Setup is kept as easy
605 as possible and the default values should be okay for most users.
608 Operation
609 ---------
611 * collectd's configuration file can be found at `sysconfdir'/collectd.conf.
612 Run `collectd -h' for a list of built-in defaults. See `collectd.conf(5)'
613 for a list of options and a syntax description.
615 * When the `csv' or `rrdtool' plugins are loaded they'll write the values to
616 files. The usual place for these files is beneath `/var/lib/collectd'.
618 * When using some of the plugins, collectd needs to run as user root, since
619 only root can do certain things, such as craft ICMP packages needed to ping
620 other hosts. collectd should NOT be installed setuid root since it can be
621 used to overwrite valuable files!
623 * Sample scripts to generate graphs reside in `contrib/' in the source
624 package or somewhere near `/usr/share/doc/collectd' in most distributions.
625 Please be aware that those script are meant as a starting point for your
626 own experiments.. Some of them require the `RRDs' Perl module.
627 (`librrds-perl' on Debian) If you have written a more sophisticated
628 solution please share it with us.
630 * The RRAs of the automatically created RRD files depend on the `step'
631 and `heartbeat' settings given. If change these settings you may need to
632 re-create the files, losing all data. Please be aware of that when changing
633 the values and read the rrdtool(1) manpage thoroughly.
636 collectd and chkrootkit
637 -----------------------
639 If you are using the `dns' plugin chkrootkit(1) will report collectd as a
640 packet sniffer ("<iface>: PACKET SNIFFER(/usr/sbin/collectd[<pid>])"). The
641 plugin captures all UDP packets on port 53 to analyze the DNS traffic. In
642 this case, collectd is a legitimate sniffer and the report should be
643 considered to be a false positive. However, you might want to check that
644 this really is collectd and not some other, illegitimate sniffer.
647 Prerequisites
648 -------------
650 To compile collectd from source you will need:
652 * Usual suspects: C compiler, linker, preprocessor, make, ...
654 * A POSIX-threads (pthread) implementation.
655 Since gathering some statistics is slow (network connections, slow devices,
656 etc) collectd is parallelized. The POSIX threads interface is being
657 used and should be found in various implementations for hopefully all
658 platforms.
660 * aerotools-ng (optional)
661 Used by the `aquaero' plugin. Currently, the `libaquaero5' library, which
662 is used by the `aerotools-ng' toolkit, is not compiled as a shared object
663 nor does it feature an installation routine. Therefore, you need to point
664 collectd's configure script at the source directory of the `aerotools-ng'
665 project.
666 <https://github.com/lynix/aerotools-ng>
668 * CoreFoundation.framework and IOKit.framework (optional)
669 For compiling on Darwin in general and the `apple_sensors' plugin in
670 particular.
671 <http://developer.apple.com/corefoundation/>
673 * libatasmart (optional)
674 Used by the `smart' plugin.
675 <http://git.0pointer.de/?p=libatasmart.git>
677 * libcap (optional)
678 The `turbostat' plugin can optionally build Linux Capabilities support,
679 which avoids full privileges requirement (aka. running as root) to read
680 values.
681 <http://sites.google.com/site/fullycapable/>
683 * libclntsh (optional)
684 Used by the `oracle' plugin.
686 * libhiredis (optional)
687 Used by the redis plugin. Please note that you require a 0.10.0 version
688 or higher. <https://github.com/redis/hiredis>
690 * libcurl (optional)
691 If you want to use the `apache', `ascent', `bind', `curl', `curl_json',
692 `curl_xml', `nginx', or `write_http' plugin.
693 <http://curl.haxx.se/>
695 * libdbi (optional)
696 Used by the `dbi' plugin to connect to various databases.
697 <http://libdbi.sourceforge.net/>
699 * libesmtp (optional)
700 For the `notify_email' plugin.
701 <http://www.stafford.uklinux.net/libesmtp/>
703 * libganglia (optional)
704 Used by the `gmond' plugin to process data received from Ganglia.
705 <http://ganglia.info/>
707 * libgrpc (optional)
708 Used by the `grpc' plugin. gRPC requires a C++ compiler supporting the
709 C++11 standard.
710 <https://grpc.io/>
712 * libgcrypt (optional)
713 Used by the `network' plugin for encryption and authentication.
714 <http://www.gnupg.org/>
716 * libgps (optional)
717 Used by the `gps' plugin.
718 <http://developer.berlios.de/projects/gpsd/>
720 * libhal (optional)
721 If present, the `uuid' plugin will check for UUID from HAL.
722 <http://hal.freedesktop.org/>
724 * libi2c-dev (optional)
725 Used for the plugin `barometer', provides just the i2c-dev.h header file
726 for user space i2c development.
728 * libiptc (optional)
729 For querying iptables counters.
730 <http://netfilter.org/>
732 * libjvm (optional)
733 Library that encapsulates the `Java Virtual Machine' (JVM). This library is
734 used by the `java' plugin to execute Java bytecode. See “Configuring with
735 libjvm” below.
736 <http://openjdk.java.net/> (and others)
738 * libldap (optional)
739 Used by the `openldap' plugin.
740 <http://www.openldap.org/>
742 * liblua (optional)
743 Used by the `lua' plugin. Currently, Lua 5.1 and later are supported.
744 <https://www.lua.org/>
746 * liblvm2 (optional)
747 Used by the `lvm' plugin.
748 <ftp://sources.redhat.com/pub/lvm2/>
750 * libmemcached (optional)
751 Used by the `memcachec' plugin to connect to a memcache daemon.
752 <http://tangent.org/552/libmemcached.html>
754 * libmnl (optional)
755 Used by the `netlink' plugin.
756 <http://www.netfilter.org/projects/libmnl/>
758 * libmodbus (optional)
759 Used by the `modbus' plugin to communicate with Modbus/TCP devices. The
760 `modbus' plugin works with version 2.0.3 of the library – due to frequent
761 API changes other versions may or may not compile cleanly.
762 <http://www.libmodbus.org/>
764 * libmysqlclient (optional)
765 Unsurprisingly used by the `mysql' plugin.
766 <http://dev.mysql.com/>
768 * libnetapp (optional)
769 Required for the `netapp' plugin.
770 This library is part of the “Manage ONTAP SDK” published by NetApp.
772 * libnetsnmp (optional)
773 For the `snmp' plugin.
774 <http://www.net-snmp.org/>
776 * libnotify (optional)
777 For the `notify_desktop' plugin.
778 <http://www.galago-project.org/>
780 * libopenipmi (optional)
781 Used by the `ipmi' plugin to prove IPMI devices.
782 <http://openipmi.sourceforge.net/>
784 * liboping (optional)
785 Used by the `ping' plugin to send and receive ICMP packets.
786 <http://octo.it/liboping/>
788 * libowcapi (optional)
789 Used by the `onewire' plugin to read values from onewire sensors (or the
790 owserver(1) daemon).
791 <http://www.owfs.org/>
793 * libpcap (optional)
794 Used to capture packets by the `dns' plugin.
795 <http://www.tcpdump.org/>
797 * libperfstat (optional)
798 Used by various plugins to gather statistics under AIX.
800 * libperl (optional)
801 Obviously used by the `perl' plugin. The library has to be compiled with
802 ithread support (introduced in Perl 5.6.0).
803 <http://www.perl.org/>
805 * libpq (optional)
806 The PostgreSQL C client library used by the `postgresql' plugin.
807 <http://www.postgresql.org/>
809 * libprotobuf, protoc 3.0+ (optional)
810 Used by the `grpc' plugin to generate service stubs and code to handle
811 network packets of collectd's protobuf-based network protocol.
812 <https://developers.google.com/protocol-buffers/>
814 * libprotobuf-c, protoc-c (optional)
815 Used by the `pinba' plugin to generate a parser for the network packets
816 sent by the Pinba PHP extension.
817 <http://code.google.com/p/protobuf-c/>
819 * libpython (optional)
820 Used by the `python' plugin. Currently, Python 2.6 and later and Python 3
821 are supported.
822 <http://www.python.org/>
824 * librabbitmq (optional; also called “rabbitmq-c”)
825 Used by the `amqp' plugin for AMQP connections, for example to RabbitMQ.
826 <http://hg.rabbitmq.com/rabbitmq-c/>
828 * librdkafka (optional; also called “rdkafka”)
829 Used by the `write_kafka' plugin for producing messages and sending them
830 to a Kafka broker.
831 <https://github.com/edenhill/librdkafka>
833 * librouteros (optional)
834 Used by the `routeros' plugin to connect to a device running `RouterOS'.
835 <http://octo.it/librouteros/>
837 * librrd (optional)
838 Used by the `rrdtool' and `rrdcached' plugins. The latter requires RRDtool
839 client support which was added after version 1.3 of RRDtool. Versions 1.0,
840 1.2 and 1.3 are known to work with the `rrdtool' plugin.
841 <http://oss.oetiker.ch/rrdtool/>
843 * librt, libsocket, libkstat, libdevinfo (optional)
844 Various standard Solaris libraries which provide system functions.
845 <http://developers.sun.com/solaris/>
847 * libsensors (optional)
848 To read from `lm_sensors', see the `sensors' plugin.
849 <http://www.lm-sensors.org/>
851 * libsigrok (optional)
852 Used by the `sigrok' plugin. In addition, libsigrok depends on glib,
853 libzip, and optionally (depending on which drivers are enabled) on
854 libusb, libftdi and libudev.
856 * libstatgrab (optional)
857 Used by various plugins to collect statistics on systems other than Linux
858 and/or Solaris.
859 <http://www.i-scream.org/libstatgrab/>
861 * libtokyotyrant (optional)
862 Used by the `tokyotyrant' plugin.
863 <http://1978th.net/tokyotyrant/>
865 * libupsclient/nut (optional)
866 For the `nut' plugin which queries nut's `upsd'.
867 <http://networkupstools.org/>
869 * libvirt (optional)
870 Collect statistics from virtual machines.
871 <http://libvirt.org/>
873 * libxml2 (optional)
874 Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
875 `virt' plugins.
876 <http://xmlsoft.org/>
878 * libxen (optional)
879 Used by the `xencpu' plugin.
880 <http://xenbits.xensource.com/>
882 * libxmms (optional)
883 <http://www.xmms.org/>
885 * libyajl (optional)
886 Parse JSON data. This is needed for the `ceph', `curl_json' and
887 `log_logstash' plugins.
888 <http://github.com/lloyd/yajl>
890 * libvarnish (optional)
891 Fetches statistics from a Varnish instance. This is needed for the
892 `varnish' plugin.
893 <http://varnish-cache.org>
895 * riemann-c-client (optional)
896 For the `write_riemann' plugin.
897 <https://github.com/algernon/riemann-c-client>
899 Configuring / Compiling / Installing
900 ------------------------------------
902 To configure, build and install collectd with the default settings, run
903 `./configure && make && make install'. For detailed, generic instructions
904 see INSTALL. For a complete list of configure options and their description,
905 run `./configure --help'.
907 By default, the configure script will check for all build dependencies and
908 disable all plugins whose requirements cannot be fulfilled (any other plugin
909 will be enabled). To enable a plugin, install missing dependencies (see
910 section `Prerequisites' above) and rerun `configure'. If you specify the
911 `--enable-<plugin>' configure option, the script will fail if the depen-
912 dencies for the specified plugin are not met. In that case you can force the
913 plugin to be built using the `--enable-<plugin>=force' configure option.
914 This will most likely fail though unless you're working in a very unusual
915 setup and you really know what you're doing. If you specify the
916 `--disable-<plugin>' configure option, the plugin will not be built. If you
917 specify the `--enable-all-plugins' or `--disable-all-plugins' configure
918 options, all plugins will be enabled or disabled respectively by default.
919 Explicitly enabling or disabling a plugin overwrites the default for the
920 specified plugin. These options are meant for package maintainers and should
921 not be used in everyday situations.
923 By default, collectd will be installed into `/opt/collectd'. You can adjust
924 this setting by specifying the `--prefix' configure option - see INSTALL for
925 details. If you pass DESTDIR=<path> to `make install', <path> will be
926 prefixed to all installation directories. This might be useful when creating
927 packages for collectd.
929 Configuring with libjvm
930 -----------------------
932 To determine the location of the required files of a Java installation is not
933 an easy task, because the locations vary with your kernel (Linux, SunOS, …)
934 and with your architecture (x86, SPARC, …) and there is no ‘java-config’
935 script we could use. Configuration of the JVM library is therefore a bit
936 tricky.
938 The easiest way to use the `--with-java=$JAVA_HOME' option, where
939 `$JAVA_HOME' is usually something like:
940 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14
942 The configure script will then use find(1) to look for the following files:
944 - jni.h
945 - jni_md.h
946 - libjvm.so
948 If found, appropriate CPP-flags and LD-flags are set and the following
949 library checks succeed.
951 If this doesn't work for you, you have the possibility to specify CPP-flags,
952 C-flags, LD-flags and LIBS for the ‘Java’ plugin by hand, using the
953 following environment variables:
955 - JAVA_CPPFLAGS
956 - JAVA_CFLAGS
957 - JAVA_LDFLAGS
958 - JAVA_LIBS
960 For example (shortened for demonstration purposes):
962 ./configure JAVA_CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
964 Adding "-ljvm" to JAVA_LIBS is done automatically, you don't have to
965 do that.
967 Generating the configure script
968 -------------------------------
970 Collectd ships with a `build.sh' script to generate the `configure'
971 script shipped with releases.
973 To generate the `configure` script, you'll need the following dependencies:
975 - autoconf
976 - automake
977 - flex
978 - bison
979 - libtool
980 - libtool-ltdl
981 - pkg-config
983 The `build.sh' script takes no arguments.
985 Crosscompiling
986 --------------
988 To compile correctly collectd needs to be able to initialize static
989 variables to NAN (Not A Number). Some C libraries, especially the GNU
990 libc, have a problem with that.
992 Luckily, with GCC it's possible to work around that problem: One can define
993 NAN as being (0.0 / 0.0) and `isnan' as `f != f'. However, to test this
994 ``implementation'' the configure script needs to compile and run a short
995 test program. Obviously running a test program when doing a cross-
996 compilation is, well, challenging.
998 If you run into this problem, you can use the `--with-nan-emulation'
999 configure option to force the use of this implementation. We can't promise
1000 that the compiled binary actually behaves as it should, but since NANs
1001 are likely never passed to the libm you have a good chance to be lucky.
1003 Likewise, collectd needs to know the layout of doubles in memory, in order
1004 to craft uniform network packets over different architectures. For this, it
1005 needs to know how to convert doubles into the memory layout used by x86. The
1006 configure script tries to figure this out by compiling and running a few
1007 small test programs. This is of course not possible when cross-compiling.
1008 You can use the `--with-fp-layout' option to tell the configure script which
1009 conversion method to assume. Valid arguments are:
1011 * `nothing' (12345678 -> 12345678)
1012 * `endianflip' (12345678 -> 87654321)
1013 * `intswap' (12345678 -> 56781234)
1016 Contact
1017 -------
1019 For questions, bug reports, development information and basically all other
1020 concerns please send an email to collectd's mailing list at
1021 <list at collectd.org>.
1023 For live discussion and more personal contact visit us in IRC, we're in
1024 channel #collectd on freenode.
1027 Author
1028 ------
1030 Florian octo Forster <octo at collectd.org>,
1031 Sebastian tokkee Harl <sh at tokkee.org>,
1032 and many contributors (see `AUTHORS').
1034 Please use GitHub reporting bugs and submitting pull requests.
1035 See CONTRIBUTING.md for details.