Code

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