Code

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