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 - write_sensu
452 Sends data to Sensu a stream processing and monitoring system, via sensu client local TCP socket.
454 * Logging is, as everything in collectd, provided by plugins. The following
455 plugins keep up informed about what's going on:
457 - logfile
458 Writes log messages to a file or STDOUT/STDERR.
460 - perl
461 Log messages are propagated to plugins written in Perl as well.
462 See collectd-perl(5).
464 - python
465 It's possible to implement log plugins in Python using the python plugin.
466 See collectd-python(5) for details.
468 - syslog
469 Logs to the standard UNIX logging mechanism, syslog.
471 - log_logstash
472 Writes log messages formatted as logstash JSON events.
474 * Notifications can be handled by the following plugins:
476 - notify_desktop
477 Send a desktop notification to a notification daemon, as defined in
478 the Desktop Notification Specification. To actually display the
479 notifications, notification-daemon is required.
480 See http://www.galago-project.org/specs/notification/.
482 - notify_email
483 Send an E-mail with the notification message to the configured
484 recipients.
486 - exec
487 Execute a program or script to handle the notification.
488 See collectd-exec(5).
490 - logfile
491 Writes the notification message to a file or STDOUT/STDERR.
493 - network
494 Send the notification to a remote host to handle it somehow.
496 - perl
497 Notifications are propagated to plugins written in Perl as well.
498 See collectd-perl(5).
500 - python
501 It's possible to implement notification plugins in Python using the
502 python plugin. See collectd-python(5) for details.
504 * Value processing can be controlled using the "filter chain" infrastructure
505 and "matches" and "targets". The following plugins are available:
507 - match_empty_counter
508 Match counter values which are currently zero.
510 - match_hashed
511 Match values using a hash function of the hostname.
513 - match_regex
514 Match values by their identifier based on regular expressions.
516 - match_timediff
517 Match values with an invalid timestamp.
519 - match_value
520 Select values by their data sources' values.
522 - target_notification
523 Create and dispatch a notification.
525 - target_replace
526 Replace parts of an identifier using regular expressions.
528 - target_scale
529 Scale (multiply) values by an arbitrary value.
531 - target_set
532 Set (overwrite) entire parts of an identifier.
534 * Miscellaneous plugins:
536 - aggregation
537 Selects multiple value lists based on patterns or regular expressions
538 and creates new aggregated values lists from those.
540 - threshold
541 Checks values against configured thresholds and creates notifications if
542 values are out of bounds. See collectd-threshold(5) for details.
544 - uuid
545 Sets the hostname to a unique identifier. This is meant for setups
546 where each client may migrate to another physical host, possibly going
547 through one or more name changes in the process.
549 * Performance: Since collectd is running as a daemon it doesn't spend much
550 time starting up again and again. With the exception of the exec plugin no
551 processes are forked. Caching in output plugins, such as the rrdtool and
552 network plugins, makes sure your resources are used efficiently. Also,
553 since collectd is programmed multithreaded it benefits from hyper-threading
554 and multicore processors and makes sure that the daemon isn't idle if only
555 one plugin waits for an IO-operation to complete.
557 * Once set up, hardly any maintenance is necessary. Setup is kept as easy
558 as possible and the default values should be okay for most users.
561 Operation
562 ---------
564 * collectd's configuration file can be found at `sysconfdir'/collectd.conf.
565 Run `collectd -h' for a list of built-in defaults. See `collectd.conf(5)'
566 for a list of options and a syntax description.
568 * When the `csv' or `rrdtool' plugins are loaded they'll write the values to
569 files. The usual place for these files is beneath `/var/lib/collectd'.
571 * When using some of the plugins, collectd needs to run as user root, since
572 only root can do certain things, such as craft ICMP packages needed to ping
573 other hosts. collectd should NOT be installed setuid root since it can be
574 used to overwrite valuable files!
576 * Sample scripts to generate graphs reside in `contrib/' in the source
577 package or somewhere near `/usr/share/doc/collectd' in most distributions.
578 Please be aware that those script are meant as a starting point for your
579 own experiments.. Some of them require the `RRDs' Perl module.
580 (`librrds-perl' on Debian) If you have written a more sophisticated
581 solution please share it with us.
583 * The RRAs of the automatically created RRD files depend on the `step'
584 and `heartbeat' settings given. If change these settings you may need to
585 re-create the files, losing all data. Please be aware of that when changing
586 the values and read the rrdtool(1) manpage thoroughly.
589 collectd and chkrootkit
590 -----------------------
592 If you are using the `dns' plugin chkrootkit(1) will report collectd as a
593 packet sniffer ("<iface>: PACKET SNIFFER(/usr/sbin/collectd[<pid>])"). The
594 plugin captures all UDP packets on port 53 to analyze the DNS traffic. In
595 this case, collectd is a legitimate sniffer and the report should be
596 considered to be a false positive. However, you might want to check that
597 this really is collectd and not some other, illegitimate sniffer.
600 Prerequisites
601 -------------
603 To compile collectd from source you will need:
605 * Usual suspects: C compiler, linker, preprocessor, make, ...
607 * A POSIX-threads (pthread) implementation.
608 Since gathering some statistics is slow (network connections, slow devices,
609 etc) collectd is parallelized. The POSIX threads interface is being
610 used and should be found in various implementations for hopefully all
611 platforms.
613 * aerotools-ng (optional)
614 Used by the `aquaero' plugin. Currently, the `libaquaero5' library, which
615 is used by the `aerotools-ng' toolkit, is not compiled as a shared object
616 nor does it feature an installation routine. Therefore, you need to point
617 collectd's configure script at the source directory of the `aerotools-ng'
618 project.
619 <https://github.com/lynix/aerotools-ng>
621 * CoreFoundation.framework and IOKit.framework (optional)
622 For compiling on Darwin in general and the `apple_sensors' plugin in
623 particular.
624 <http://developer.apple.com/corefoundation/>
626 * libatasmart (optional)
627 Used by the `smart' plugin.
628 <http://git.0pointer.de/?p=libatasmart.git>
630 * libclntsh (optional)
631 Used by the `oracle' plugin.
633 * libhiredis (optional)
634 Used by the redis plugin. Please note that you require a 0.10.0 version
635 or higher. <https://github.com/redis/hiredis>
637 * libcurl (optional)
638 If you want to use the `apache', `ascent', `bind', `curl', `curl_json',
639 `curl_xml', `nginx', or `write_http' plugin.
640 <http://curl.haxx.se/>
642 * libdbi (optional)
643 Used by the `dbi' plugin to connect to various databases.
644 <http://libdbi.sourceforge.net/>
646 * libesmtp (optional)
647 For the `notify_email' plugin.
648 <http://www.stafford.uklinux.net/libesmtp/>
650 * libganglia (optional)
651 Used by the `gmond' plugin to process data received from Ganglia.
652 <http://ganglia.info/>
654 * libgcrypt (optional)
655 Used by the `network' plugin for encryption and authentication.
656 <http://www.gnupg.org/>
658 * libhal (optional)
659 If present, the `uuid' plugin will check for UUID from HAL.
660 <http://hal.freedesktop.org/>
662 * libi2c-dev (optional)
663 Used for the plugin `barometer', provides just the i2c-dev.h header file
664 for user space i2c development.
666 * libiptc (optional)
667 For querying iptables counters.
668 <http://netfilter.org/>
670 * libjvm (optional)
671 Library that encapsulates the `Java Virtual Machine' (JVM). This library is
672 used by the `java' plugin to execute Java bytecode. See “Configuring with
673 libjvm” below.
674 <http://openjdk.java.net/> (and others)
676 * libldap (optional)
677 Used by the `openldap' plugin.
678 <http://www.openldap.org/>
680 * liblvm2 (optional)
681 Used by the `lvm' plugin.
682 <ftp://sources.redhat.com/pub/lvm2/>
684 * libmemcached (optional)
685 Used by the `memcachec' plugin to connect to a memcache daemon.
686 <http://tangent.org/552/libmemcached.html>
688 * libmnl (optional)
689 Used by the `netlink' plugin.
690 <http://www.netfilter.org/projects/libmnl/>
692 * libmodbus (optional)
693 Used by the `modbus' plugin to communicate with Modbus/TCP devices. The
694 `modbus' plugin works with version 2.0.3 of the library – due to frequent
695 API changes other versions may or may not compile cleanly.
696 <http://www.libmodbus.org/>
698 * libmysqlclient (optional)
699 Unsurprisingly used by the `mysql' plugin.
700 <http://dev.mysql.com/>
702 * libnetapp (optional)
703 Required for the `netapp' plugin.
704 This library is part of the “Manage ONTAP SDK” published by NetApp.
706 * libnetsnmp (optional)
707 For the `snmp' plugin.
708 <http://www.net-snmp.org/>
710 * libnotify (optional)
711 For the `notify_desktop' plugin.
712 <http://www.galago-project.org/>
714 * libopenipmi (optional)
715 Used by the `ipmi' plugin to prove IPMI devices.
716 <http://openipmi.sourceforge.net/>
718 * liboping (optional)
719 Used by the `ping' plugin to send and receive ICMP packets.
720 <http://octo.it/liboping/>
722 * libowcapi (optional)
723 Used by the `onewire' plugin to read values from onewire sensors (or the
724 owserver(1) daemon).
725 <http://www.owfs.org/>
727 * libpcap (optional)
728 Used to capture packets by the `dns' plugin.
729 <http://www.tcpdump.org/>
731 * libperfstat (optional)
732 Used by various plugins to gather statistics under AIX.
734 * libperl (optional)
735 Obviously used by the `perl' plugin. The library has to be compiled with
736 ithread support (introduced in Perl 5.6.0).
737 <http://www.perl.org/>
739 * libpq (optional)
740 The PostgreSQL C client library used by the `postgresql' plugin.
741 <http://www.postgresql.org/>
743 * libprotobuf-c, protoc-c (optional)
744 Used by the `pinba' plugin to generate a parser for the network packets
745 sent by the Pinba PHP extension, and by the `write_riemann' plugin to
746 generate events to be sent to a Riemann server.
747 <http://code.google.com/p/protobuf-c/>
749 * libpython (optional)
750 Used by the `python' plugin. Currently, Python 2.3 and later and Python 3
751 are supported.
752 <http://www.python.org/>
754 * librabbitmq (optional; also called “rabbitmq-c”)
755 Used by the `amqp' plugin for AMQP connections, for example to RabbitMQ.
756 <http://hg.rabbitmq.com/rabbitmq-c/>
758 * librdkafka (optional; also called “rdkafka”)
759 Used by the `write_kafka' plugin for producing messages and sending them
760 to a Kafka broker.
761 <https://github.com/edenhill/librdkafka>
763 * librouteros (optional)
764 Used by the `routeros' plugin to connect to a device running `RouterOS'.
765 <http://octo.it/librouteros/>
767 * librrd (optional)
768 Used by the `rrdtool' and `rrdcached' plugins. The latter requires RRDtool
769 client support which was added after version 1.3 of RRDtool. Versions 1.0,
770 1.2 and 1.3 are known to work with the `rrdtool' plugin.
771 <http://oss.oetiker.ch/rrdtool/>
773 * librt, libsocket, libkstat, libdevinfo (optional)
774 Various standard Solaris libraries which provide system functions.
775 <http://developers.sun.com/solaris/>
777 * libsensors (optional)
778 To read from `lm_sensors', see the `sensors' plugin.
779 <http://www.lm-sensors.org/>
781 * libsigrok (optional)
782 Used by the `sigrok' plugin. In addition, libsigrok depends on glib,
783 libzip, and optionally (depending on which drivers are enabled) on
784 libusb, libftdi and libudev.
786 * libstatgrab (optional)
787 Used by various plugins to collect statistics on systems other than Linux
788 and/or Solaris.
789 <http://www.i-scream.org/libstatgrab/>
791 * libtokyotyrant (optional)
792 Used by the `tokyotyrant' plugin.
793 <http://1978th.net/tokyotyrant/>
795 * libupsclient/nut (optional)
796 For the `nut' plugin which queries nut's `upsd'.
797 <http://networkupstools.org/>
799 * libvirt (optional)
800 Collect statistics from virtual machines.
801 <http://libvirt.org/>
803 * libxml2 (optional)
804 Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
805 `virt' plugins.
806 <http://xmlsoft.org/>
808 * libxmms (optional)
809 <http://www.xmms.org/>
811 * libyajl (optional)
812 Parse JSON data. This is needed for the `ceph', `curl_json' and
813 `log_logstash' plugins.
814 <http://github.com/lloyd/yajl>
816 * libvarnish (optional)
817 Fetches statistics from a Varnish instance. This is needed for the
818 `varnish' plugin.
819 <http://varnish-cache.org>
821 Configuring / Compiling / Installing
822 ------------------------------------
824 To configure, build and install collectd with the default settings, run
825 `./configure && make && make install'. For detailed, generic instructions
826 see INSTALL. For a complete list of configure options and their description,
827 run `./configure --help'.
829 By default, the configure script will check for all build dependencies and
830 disable all plugins whose requirements cannot be fulfilled (any other plugin
831 will be enabled). To enable a plugin, install missing dependencies (see
832 section `Prerequisites' above) and rerun `configure'. If you specify the
833 `--enable-<plugin>' configure option, the script will fail if the depen-
834 dencies for the specified plugin are not met. In that case you can force the
835 plugin to be built using the `--enable-<plugin>=force' configure option.
836 This will most likely fail though unless you're working in a very unusual
837 setup and you really know what you're doing. If you specify the
838 `--disable-<plugin>' configure option, the plugin will not be built. If you
839 specify the `--enable-all-plugins' or `--disable-all-plugins' configure
840 options, all plugins will be enabled or disabled respectively by default.
841 Explicitly enabling or disabling a plugin overwrites the default for the
842 specified plugin. These options are meant for package maintainers and should
843 not be used in everyday situations.
845 By default, collectd will be installed into `/opt/collectd'. You can adjust
846 this setting by specifying the `--prefix' configure option - see INSTALL for
847 details. If you pass DESTDIR=<path> to `make install', <path> will be
848 prefixed to all installation directories. This might be useful when creating
849 packages for collectd.
851 Configuring with libjvm
852 -----------------------
854 To determine the location of the required files of a Java installation is not
855 an easy task, because the locations vary with your kernel (Linux, SunOS, …)
856 and with your architecture (x86, SPARC, …) and there is no ‘java-config’
857 script we could use. Configuration of the JVM library is therefore a bit
858 tricky.
860 The easiest way to use the `--with-java=$JAVA_HOME' option, where
861 `$JAVA_HOME' is usually something like:
862 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14
864 The configure script will then use find(1) to look for the following files:
866 - jni.h
867 - jni_md.h
868 - libjvm.so
870 If found, appropriate CPP-flags and LD-flags are set and the following
871 library checks succeed.
873 If this doesn't work for you, you have the possibility to specify CPP-flags,
874 C-flags and LD-flags for the ‘Java’ plugin by hand, using the following three
875 (environment) variables:
877 - JAVA_CPPFLAGS
878 - JAVA_CFLAGS
879 - JAVA_LDFLAGS
881 For example (shortened for demonstration purposes):
883 ./configure JAVA_CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
885 Adding "-ljvm" to the JAVA_LDFLAGS is done automatically, you don't have to
886 do that.
888 Generating the configure script
889 -------------------------------
891 Collectd ships with a `build.sh' script to generate the `configure'
892 script shipped with releases.
894 To generate the `configure` script, you'll need the following dependencies:
896 - autoconf
897 - automake
898 - flex
899 - bison
900 - libtool
901 - libtool-ltdl
903 The `build.sh' script takes no arguments.
905 Crosscompiling
906 --------------
908 To compile correctly collectd needs to be able to initialize static
909 variables to NAN (Not A Number). Some C libraries, especially the GNU
910 libc, have a problem with that.
912 Luckily, with GCC it's possible to work around that problem: One can define
913 NAN as being (0.0 / 0.0) and `isnan' as `f != f'. However, to test this
914 ``implementation'' the configure script needs to compile and run a short
915 test program. Obviously running a test program when doing a cross-
916 compilation is, well, challenging.
918 If you run into this problem, you can use the `--with-nan-emulation'
919 configure option to force the use of this implementation. We can't promise
920 that the compiled binary actually behaves as it should, but since NANs
921 are likely never passed to the libm you have a good chance to be lucky.
923 Likewise, collectd needs to know the layout of doubles in memory, in order
924 to craft uniform network packets over different architectures. For this, it
925 needs to know how to convert doubles into the memory layout used by x86. The
926 configure script tries to figure this out by compiling and running a few
927 small test programs. This is of course not possible when cross-compiling.
928 You can use the `--with-fp-layout' option to tell the configure script which
929 conversion method to assume. Valid arguments are:
931 * `nothing' (12345678 -> 12345678)
932 * `endianflip' (12345678 -> 87654321)
933 * `intswap' (12345678 -> 56781234)
936 Contact
937 -------
939 For questions, bug reports, development information and basically all other
940 concerns please send an email to collectd's mailing list at
941 <list at collectd.org>.
943 For live discussion and more personal contact visit us in IRC, we're in
944 channel #collectd on freenode.
947 Author
948 ------
950 Florian octo Forster <octo at collectd.org>,
951 Sebastian tokkee Harl <sh at tokkee.org>,
952 and many contributors (see `AUTHORS').
954 Please send bug reports and patches to the mailing list, see `Contact'
955 above.