Merge pull request #312 from jazzmes/libvirt-mem-usage
[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 transfered, 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, fanspeed and
27       voltage sensors.
28
29     - aquaero
30       Various sensors in the Aquaero 5 watercooling 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       transfered.
89
90     - email
91       Email statistics: Count, traffic, spam scores and checks.
92       See collectd-email(5).
93
94     - entropy
95       Amount of entropy available to the system.
96
97     - ethstat
98       Network interface card statistics.
99
100     - exec
101       Values gathered by a custom program or script.
102       See collectd-exec(5).
103
104     - filecount
105       Count the number of files in directories.
106
107     - fscache
108       Linux file-system based caching framework statistics.
109
110     - gmond
111       Receive multicast traffic from Ganglia instances.
112
113     - hddtemp
114       Harddisk temperatures using hddtempd.
115
116     - interface
117       Interface traffic: Number of octets, packets and errors for each
118       interface.
119
120     - iptables
121       Iptables' counters: Number of bytes that were matched by a certain
122       iptables rule.
123
124     - ipmi
125       IPMI (Intelligent Platform Management Interface) sensors information.
126
127     - ipvs
128       IPVS connection statistics (number of connections, octets and packets
129       for each service and destination).
130       See http://www.linuxvirtualserver.org/software/index.html.
131
132     - irq
133       IRQ counters: Frequency in which certain interrupts occur.
134
135     - java
136       Integrates a `Java Virtual Machine' (JVM) to execute plugins in Java
137       bytecode. See “Configuring with libjvm” below.
138
139     - load
140       System load average over the last 1, 5 and 15 minutes.
141
142     - lpar
143       Detailed CPU statistics of the “Logical Partitions” virtualization
144       technique built into IBM's POWER processors.
145
146     - libvirt
147       CPU, memory, disk and network I/O statistics from virtual machines.
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, fanspeed 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     - openvpn
233       RX and TX of each client in openvpn-status.log (status-version 2).
234       <http://openvpn.net/index.php/documentation/howto.html>
235
236     - oracle
237       Query data from an Oracle database.
238
239     - perl
240       The perl plugin implements a Perl-interpreter into collectd. You can
241       write your own plugins in Perl and return arbitrary values using this
242       API. See collectd-perl(5).
243
244     - pf
245       Query statistics from BSD's packet filter "pf".
246
247     - pinba
248       Receive and dispatch timing values from Pinba, a profiling extension for
249       PHP.
250
251     - ping
252       Network latency: Time to reach the default gateway or another given
253       host.
254
255     - postgresql
256       PostgreSQL database statistics: active server connections, transaction
257       numbers, block IO, table row manipulations.
258
259     - powerdns
260       PowerDNS name server statistics.
261
262     - processes
263       Process counts: Number of running, sleeping, zombie, ... processes.
264
265     - protocols
266       Counts various aspects of network protocols such as IP, TCP, UDP, etc.
267
268     - python
269       The python plugin implements a Python interpreter into collectd. This
270       makes it possible to write plugins in Python which are executed by
271       collectd without the need to start a heavy interpreter every interval.
272       See collectd-python(5) for details.
273
274     - redis
275       The redis plugin gathers information from a redis server, including:
276       uptime, used memory, total connections etc.
277
278     - routeros
279       Query interface and wireless registration statistics from RouterOS.
280
281     - rrdcached
282       RRDtool caching daemon (RRDcacheD) statistics.
283
284     - sensors
285       System sensors, accessed using lm_sensors: Voltages, temperatures and
286       fan rotation speeds.
287
288     - serial
289       RX and TX of serial interfaces. Linux only; needs root privileges.
290
291     - sigrok
292       Uses libsigrok as a backend, allowing any sigrok-supported device
293       to have its measurements fed to collectd. This includes multimeters,
294       sound level meters, thermometers, and much more.
295
296     - snmp
297       Read values from SNMP (Simple Network Management Protocol) enabled
298       network devices such as switches, routers, thermometers, rack monitoring
299       servers, etc. See collectd-snmp(5).
300
301     - statsd
302       Acts as a StatsD server, reading values sent over the network from StatsD
303       clients and calculating rates and other aggregates out of these values.
304
305     - swap
306       Pages swapped out onto harddisk or whatever is called `swap' by the OS..
307
308     - table
309       Parse table-like structured files.
310
311     - tail
312       Follows (tails) logfiles, parses them by lines and submits matched
313       values.
314
315     - tail_csv
316       Follows (tails) files in CSV format, parses each line and submits
317       extracted values.
318
319     - tape
320       Bytes and operations read and written on tape devices. Solaris only.
321
322     - tcpconns
323       Number of TCP connections to specific local and remote ports.
324
325     - teamspeak2
326       TeamSpeak2 server statistics.
327
328     - ted
329       Plugin to read values from `The Energy Detective' (TED).
330
331     - thermal
332       Linux ACPI thermal zone information.
333
334     - tokyotyrant
335       Reads the number of records and file size from a running Tokyo Tyrant
336       server.
337
338     - uptime
339       System uptime statistics.
340
341     - users
342       Users currently logged in.
343
344     - varnish
345       Various statistics from Varnish, an HTTP accelerator.
346
347     - vmem
348       Virtual memory statistics, e. g. the number of page-ins/-outs or the
349       number of pagefaults.
350
351     - vserver
352       System resources used by Linux VServers.
353       See <http://linux-vserver.org/>.
354
355     - wireless
356       Link quality of wireless cards. Linux only.
357
358     - xmms
359       Bitrate and frequency of music played with XMMS.
360
361     - zfs_arc
362       Statistics for ZFS' “Adaptive Replacement Cache” (ARC).
363
364   * Output can be written or sent to various destinations by the following
365     plugins:
366
367     - amqp
368       Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
369       server, such as RabbitMQ.
370
371     - csv
372       Write to comma separated values (CSV) files. This needs lots of
373       diskspace but is extremely portable and can be analysed with almost
374       every program that can analyse anything. Even Microsoft's Excel..
375
376     - network
377       Send the data to a remote host to save the data somehow. This is useful
378       for large setups where the data should be saved by a dedicated machine.
379
380     - perl
381       Of course the values are propagated to plugins written in Perl, too, so
382       you can easily do weird stuff with the plugins we didn't dare think of
383       ;) See collectd-perl(5).
384
385     - python
386       It's possible to implement write plugins in Python using the python
387       plugin. See collectd-python(5) for details.
388
389     - rrdcached
390       Output to round-robin-database (RRD) files using the RRDtool caching
391       daemon (RRDcacheD) - see rrdcached(1). That daemon provides a general
392       implementation of the caching done by the `rrdtool' plugin.
393
394     - rrdtool
395       Output to round-robin-database (RRD) files using librrd. See rrdtool(1).
396       This is likely the most popular destination for such values. Since
397       updates to RRD-files are somewhat expensive this plugin can cache
398       updates to the files and write a bunch of updates at once, which lessens
399       system load a lot.
400
401     - unixsock
402       One can query the values from the unixsock plugin whenever they're
403       needed. Please read collectd-unixsock(5) for a description on how that's
404       done.
405
406     - write_graphite
407       Sends data to Carbon, the storage layer of Graphite using TCP or UDP. It
408       can be configured to avoid logging send errors (especially useful when
409       using UDP).
410
411     - write_http
412       Sends the values collected by collectd to a web-server using HTTP POST
413       requests. The transmitted data is either in a form understood by the
414       Exec plugin or formatted in JSON.
415
416     - write_kafka
417       Sends data to Apache Kafka, a distributed queue.
418
419     - write_mongodb
420       Sends data to MongoDB, a NoSQL database.
421
422     - write_redis
423       Sends the values to a Redis key-value database server.
424
425     - write_riemann
426       Sends data to Riemann, a stream processing and monitoring system.
427
428   * Logging is, as everything in collectd, provided by plugins. The following
429     plugins keep up informed about what's going on:
430
431     - logfile
432       Writes log messages to a file or STDOUT/STDERR.
433
434     - perl
435       Log messages are propagated to plugins written in Perl as well.
436       See collectd-perl(5).
437
438     - python
439       It's possible to implement log plugins in Python using the python plugin.
440       See collectd-python(5) for details.
441
442     - syslog
443       Logs to the standard UNIX logging mechanism, syslog.
444
445     - log_logstash
446       Writes log messages formatted as logstash JSON events.
447
448   * Notifications can be handled by the following plugins:
449
450     - notify_desktop
451       Send a desktop notification to a notification daemon, as defined in
452       the Desktop Notification Specification. To actually display the
453       notifications, notification-daemon is required.
454       See http://www.galago-project.org/specs/notification/.
455
456     - notify_email
457       Send an E-mail with the notification message to the configured
458       recipients.
459
460     - exec
461       Execute a program or script to handle the notification.
462       See collectd-exec(5).
463
464     - logfile
465       Writes the notification message to a file or STDOUT/STDERR.
466
467     - network
468       Send the notification to a remote host to handle it somehow.
469
470     - perl
471       Notifications are propagated to plugins written in Perl as well.
472       See collectd-perl(5).
473
474     - python
475       It's possible to implement notification plugins in Python using the
476       python plugin. See collectd-python(5) for details.
477
478   * Value processing can be controlled using the "filter chain" infrastructure
479     and "matches" and "targets". The following plugins are available:
480
481     - match_empty_counter
482       Match counter values which are currently zero.
483
484     - match_hashed
485       Match values using a hash function of the hostname.
486
487     - match_regex
488       Match values by their identifier based on regular expressions.
489
490     - match_timediff
491       Match values with an invalid timestamp.
492
493     - match_value
494       Select values by their data sources' values.
495
496     - target_notification
497       Create and dispatch a notification.
498
499     - target_replace
500       Replace parts of an identifier using regular expressions.
501
502     - target_scale
503       Scale (multiply) values by an arbitrary value.
504
505     - target_set
506       Set (overwrite) entire parts of an identifier.
507
508   * Miscellaneous plugins:
509
510     - aggregation
511       Selects multiple value lists based on patterns or regular expressions
512       and creates new aggregated values lists from those.
513
514     - threshold
515       Checks values against configured thresholds and creates notifications if
516       values are out of bounds. See collectd-threshold(5) for details.
517
518     - uuid
519       Sets the hostname to an unique identifier. This is meant for setups
520       where each client may migrate to another physical host, possibly going
521       through one or more name changes in the process.
522
523   * Performance: Since collectd is running as a daemon it doesn't spend much
524     time starting up again and again. With the exception of the exec plugin no
525     processes are forked. Caching in output plugins, such as the rrdtool and
526     network plugins, makes sure your resources are used efficiently. Also,
527     since collectd is programmed multithreaded it benefits from hyperthreading
528     and multicore processors and makes sure that the daemon isn't idle if only
529     one plugin waits for an IO-operation to complete.
530
531   * Once set up, hardly any maintenance is necessary. Setup is kept as easy
532     as possible and the default values should be okay for most users.
533
534
535 Operation
536 ---------
537
538   * collectd's configuration file can be found at `sysconfdir'/collectd.conf.
539     Run `collectd -h' for a list of builtin defaults. See `collectd.conf(5)'
540     for a list of options and a syntax description.
541
542   * When the `csv' or `rrdtool' plugins are loaded they'll write the values to
543     files. The usual place for these files is beneath `/var/lib/collectd'.
544
545   * When using some of the plugins, collectd needs to run as user root, since
546     only root can do certain things, such as craft ICMP packages needed to ping
547     other hosts. collectd should NOT be installed setuid root since it can be
548     used to overwrite valuable files!
549
550   * Sample scripts to generate graphs reside in `contrib/' in the source
551     package or somewhere near `/usr/share/doc/collectd' in most distributions.
552     Please be aware that those script are meant as a starting point for your
553     own experiments.. Some of them require the `RRDs' Perl module.
554     (`librrds-perl' on Debian) If you have written a more sophisticated
555     solution please share it with us.
556
557   * The RRAs of the automatically created RRD files depend on the `step'
558     and `heartbeat' settings given. If change these settings you may need to
559     re-create the files, losing all data. Please be aware of that when changing
560     the values and read the rrdtool(1) manpage thoroughly.
561
562
563 collectd and chkrootkit
564 -----------------------
565
566   If you are using the `dns' plugin chkrootkit(1) will report collectd as a
567   packet sniffer ("<iface>: PACKET SNIFFER(/usr/sbin/collectd[<pid>])"). The
568   plugin captures all UDP packets on port 53 to analyze the DNS traffic. In
569   this case, collectd is a legitimate sniffer and the report should be
570   considered to be a false positive. However, you might want to check that
571   this really is collectd and not some other, illegitimate sniffer.
572
573
574 Prerequisites
575 -------------
576
577   To compile collectd from source you will need:
578
579   * Usual suspects: C compiler, linker, preprocessor, make, ...
580
581   * A POSIX-threads (pthread) implementation.
582     Since gathering some statistics is slow (network connections, slow devices,
583     etc) collectd is parallelized. The POSIX threads interface is being
584     used and should be found in various implementations for hopefully all
585     platforms.
586
587   * aerotools-ng (optional)
588     Used by the `aquaero' plugin. Currently, the `libaquaero5' library, which
589     is used by the `aerotools-ng' toolkit, is not compiled as a shared object
590     nor does it feature an installation routine. Therefore, you need to point
591     collectd's configure script at the source directory of the `aerotools-ng'
592     project.
593     <https://github.com/lynix/aerotools-ng>
594
595   * CoreFoundation.framework and IOKit.framework (optional)
596     For compiling on Darwin in general and the `apple_sensors' plugin in
597     particular.
598     <http://developer.apple.com/corefoundation/>
599
600   * libclntsh (optional)
601     Used by the `oracle' plugin.
602
603   * libcredis (optional)
604     Used by the `redis' plugin. Please note that you require a 0.2.2 version
605     or higher. <http://code.google.com/p/credis/>
606
607   * libcurl (optional)
608     If you want to use the `apache', `ascent', `bind', `curl', `curl_json',
609     `curl_xml', `nginx', or `write_http' plugin.
610     <http://curl.haxx.se/>
611
612   * libdbi (optional)
613     Used by the `dbi' plugin to connect to various databases.
614     <http://libdbi.sourceforge.net/>
615
616   * libesmtp (optional)
617     For the `notify_email' plugin.
618     <http://www.stafford.uklinux.net/libesmtp/>
619
620   * libganglia (optional)
621     Used by the `gmond' plugin to process data received from Ganglia.
622     <http://ganglia.info/>
623
624   * libgcrypt (optional)
625     Used by the `network' plugin for encryption and authentication.
626     <http://www.gnupg.org/>
627
628   * libhal (optional)
629     If present, the `uuid' plugin will check for UUID from HAL.
630     <http://hal.freedesktop.org/>
631
632   * libi2c-dev (optional)
633     Used for the plugin `barometer', provides just the i2c-dev.h header file
634     for user space i2c development.
635
636   * libiptc (optional)
637     For querying iptables counters.
638     <http://netfilter.org/>
639
640   * libjvm (optional)
641     Library that encapsulates the `Java Virtual Machine' (JVM). This library is
642     used by the `java' plugin to execute Java bytecode. See “Configuring with
643     libjvm” below.
644     <http://openjdk.java.net/> (and others)
645
646   * liblvm2 (optional)
647     Used by the `lvm' plugin.
648     <ftp://sources.redhat.com/pub/lvm2/>
649
650   * libmemcached (optional)
651     Used by the `memcachec' plugin to connect to a memcache daemon.
652     <http://tangent.org/552/libmemcached.html>
653
654   * libmnl (optional)
655     Used by the `netlink' plugin.
656     <http://www.netfilter.org/projects/libmnl/>
657
658   * libmodbus (optional)
659     Used by the `modbus' plugin to communicate with Modbus/TCP devices. The
660     `modbus' plugin works with version 2.0.3 of the library – due to frequent
661     API changes other versions may or may not compile cleanly.
662     <http://www.libmodbus.org/>
663
664   * libmysqlclient (optional)
665     Unsurprisingly used by the `mysql' plugin.
666     <http://dev.mysql.com/>
667
668   * libnetapp (optional)
669     Required for the `netapp' plugin.
670     This library is part of the “Manage ONTAP SDK” published by NetApp.
671
672   * libnetsnmp (optional)
673     For the `snmp' plugin.
674     <http://www.net-snmp.org/>
675
676   * libnotify (optional)
677     For the `notify_desktop' plugin.
678     <http://www.galago-project.org/>
679
680   * libopenipmi (optional)
681     Used by the `ipmi' plugin to prove IPMI devices.
682     <http://openipmi.sourceforge.net/>
683
684   * liboping (optional)
685     Used by the `ping' plugin to send and receive ICMP packets.
686     <http://octo.it/liboping/>
687
688   * libowcapi (optional)
689     Used by the `onewire' plugin to read values from onewire sensors (or the
690     owserver(1) daemon).
691     <http://www.owfs.org/>
692
693   * libpcap (optional)
694     Used to capture packets by the `dns' plugin.
695     <http://www.tcpdump.org/>
696
697   * libperfstat (optional)
698     Used by various plugins to gather statistics under AIX.
699
700   * libperl (optional)
701     Obviously used by the `perl' plugin. The library has to be compiled with
702     ithread support (introduced in Perl 5.6.0).
703     <http://www.perl.org/>
704
705   * libpq (optional)
706     The PostgreSQL C client library used by the `postgresql' plugin.
707     <http://www.postgresql.org/>
708
709   * libprotobuf-c, protoc-c (optional)
710     Used by the `pinba' plugin to generate a parser for the network packets
711     sent by the Pinba PHP extension, and by the `write_riemann' plugin to
712     generate events to be sent to a Riemann server.
713     <http://code.google.com/p/protobuf-c/>
714
715   * libpython (optional)
716     Used by the `python' plugin. Currently, Python 2.3 and later and Python 3
717     are supported.
718     <http://www.python.org/>
719
720   * librabbitmq (optional; also called “rabbitmq-c”)
721     Used by the `amqp' plugin for AMQP connections, for example to RabbitMQ.
722     <http://hg.rabbitmq.com/rabbitmq-c/>
723
724   * librdkafka (optional; also called “rdkafka”)
725     Used by the `write_kafka' plugin for producing messages and sending them
726     to a Kafka broker.
727     <https://github.com/edenhill/librdkafka>
728
729   * librouteros (optional)
730     Used by the `routeros' plugin to connect to a device running `RouterOS'.
731     <http://octo.it/librouteros/>
732
733   * librrd (optional)
734     Used by the `rrdtool' and `rrdcached' plugins. The latter requires RRDtool
735     client support which was added after version 1.3 of RRDtool. Versions 1.0,
736     1.2 and 1.3 are known to work with the `rrdtool' plugin.
737     <http://oss.oetiker.ch/rrdtool/>
738
739   * librt, libsocket, libkstat, libdevinfo (optional)
740     Various standard Solaris libraries which provide system functions.
741     <http://developers.sun.com/solaris/>
742
743   * libsensors (optional)
744     To read from `lm_sensors', see the `sensors' plugin.
745     <http://www.lm-sensors.org/>
746
747   * libsigrok (optional)
748     Used by the `sigrok' plugin. In addition, libsigrok depends on glib,
749     libzip, and optionally (depending on which drivers are enabled) on
750     libusb, libftdi and libudev.
751
752   * libstatgrab (optional)
753     Used by various plugins to collect statistics on systems other than Linux
754     and/or Solaris.
755     <http://www.i-scream.org/libstatgrab/>
756
757   * libtokyotyrant (optional)
758     Used by the `tokyotyrant' plugin.
759     <http://1978th.net/tokyotyrant/>
760
761   * libupsclient/nut (optional)
762     For the `nut' plugin which queries nut's `upsd'.
763     <http://networkupstools.org/>
764
765   * libvirt (optional)
766     Collect statistics from virtual machines.
767     <http://libvirt.org/>
768
769   * libxml2 (optional)
770     Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
771     `libvirt' plugins.
772     <http://xmlsoft.org/>
773
774   * libxmms (optional)
775     <http://www.xmms.org/>
776
777   * libyajl (optional)
778     Parse JSON data. This is needed for the `curl_json' and `log_logstash'
779     plugins.
780     <http://github.com/lloyd/yajl>
781
782   * libvarnish (optional)
783      Fetches statistics from a Varnish instance. This is needed for the
784      `varnish' plugin.
785      <http://varnish-cache.org>
786
787 Configuring / Compiling / Installing
788 ------------------------------------
789
790   To configure, build and install collectd with the default settings, run
791   `./configure && make && make install'.  For detailed, generic instructions
792   see INSTALL. For a complete list of configure options and their description,
793   run `./configure --help'.
794
795   By default, the configure script will check for all build dependencies and
796   disable all plugins whose requirements cannot be fulfilled (any other plugin
797   will be enabled). To enable a plugin, install missing dependencies (see
798   section `Prerequisites' above) and rerun `configure'. If you specify the
799   `--enable-<plugin>' configure option, the script will fail if the depen-
800   dencies for the specified plugin are not met. In that case you can force the
801   plugin to be built using the `--enable-<plugin>=force' configure option.
802   This will most likely fail though unless you're working in a very unusual
803   setup and you really know what you're doing. If you specify the
804   `--disable-<plugin>' configure option, the plugin will not be built. If you
805   specify the `--enable-all-plugins' or `--disable-all-plugins' configure
806   options, all plugins will be enabled or disabled respectively by default.
807   Explicitly enabling or disabling a plugin overwrites the default for the
808   specified plugin. These options are meant for package maintainers and should
809   not be used in everyday situations.
810
811   By default, collectd will be installed into `/opt/collectd'. You can adjust
812   this setting by specifying the `--prefix' configure option - see INSTALL for
813   details. If you pass DESTDIR=<path> to `make install', <path> will be
814   prefixed to all installation directories. This might be useful when creating
815   packages for collectd.
816
817 Configuring with libjvm
818 -----------------------
819
820   To determine the location of the required files of a Java installation is not
821   an easy task, because the locations vary with your kernel (Linux, SunOS, …)
822   and with your architecture (x86, SPARC, …) and there is no ‘java-config’
823   script we could use. Configuration of the JVM library is therefore a bit
824   tricky.
825
826   The easiest way to use the `--with-java=$JAVA_HOME' option, where
827   `$JAVA_HOME' is usually something like:
828     /usr/lib/jvm/java-1.5.0-sun-1.5.0.14
829
830   The configure script will then use find(1) to look for the following files:
831
832     - jni.h
833     - jni_md.h
834     - libjvm.so
835
836   If found, appropriate CPP-flags and LD-flags are set and the following
837   library checks succeed.
838
839   If this doesn't work for you, you have the possibility to specify CPP-flags,
840   C-flags and LD-flags for the ‘Java’ plugin by hand, using the following three
841   (environment) variables:
842
843     - JAVA_CPPFLAGS
844     - JAVA_CFLAGS
845     - JAVA_LDFLAGS
846
847   For example (shortened for demonstration purposes):
848
849     ./configure JAVA_CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
850
851   Adding "-ljvm" to the JAVA_LDFLAGS is done automatically, you don't have to
852   do that.
853
854 Crosscompiling
855 --------------
856
857   To compile correctly collectd needs to be able to initialize static
858   variables to NAN (Not A Number). Some C libraries, especially the GNU
859   libc, have a problem with that.
860
861   Luckily, with GCC it's possible to work around that problem: One can define
862   NAN as being (0.0 / 0.0) and `isnan' as `f != f'. However, to test this
863   ``implementation'' the configure script needs to compile and run a short
864   test program. Obviously running a test program when doing a cross-
865   compilation is, well, challenging.
866
867   If you run into this problem, you can use the `--with-nan-emulation'
868   configure option to force the use of this implementation. We can't promise
869   that the compiled binary actually behaves as it should, but since NANs
870   are likely never passed to the libm you have a good chance to be lucky.
871
872   Likewise, collectd needs to know the layout of doubles in memory, in order
873   to craft uniform network packets over different architectures. For this, it
874   needs to know how to convert doubles into the memory layout used by x86. The
875   configure script tries to figure this out by compiling and running a few
876   small test programs. This is of course not possible when cross-compiling.
877   You can use the `--with-fp-layout' option to tell the configure script which
878   conversion method to assume. Valid arguments are:
879
880     * `nothing'    (12345678 -> 12345678)
881     * `endianflip' (12345678 -> 87654321)
882     * `intswap'    (12345678 -> 56781234)
883
884
885 Contact
886 -------
887
888   For questions, bug reports, development information and basically all other
889   concerns please send an email to collectd's mailing list at
890   <list at collectd.org>.
891
892   For live discussion and more personal contact visit us in IRC, we're in
893   channel #collectd on freenode.
894
895
896 Author
897 ------
898
899   Florian octo Forster <octo at collectd.org>,
900   Sebastian tokkee Harl <sh at tokkee.org>,
901   and many contributors (see `AUTHORS').
902
903   Please send bug reports and patches to the mailing list, see `Contact'
904   above.
905