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