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