Code

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