0484867539025b8fd24a53c6b0deb7085fa66de0
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 - iptables
131 Iptables' counters: Number of bytes that were matched by a certain
132 iptables rule.
134 - ipmi
135 IPMI (Intelligent Platform Management Interface) sensors information.
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 - nut
225 Network UPS tools: UPS current, voltage, power, charge, utilisation,
226 temperature, etc. See upsd(8).
228 - numa
229 Information about Non-Uniform Memory Access (NUMA).
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 - uptime
353 System uptime statistics.
355 - users
356 Users currently logged in.
358 - varnish
359 Various statistics from Varnish, an HTTP accelerator.
361 - virt
362 CPU, memory, disk and network I/O statistics from virtual machines.
364 - vmem
365 Virtual memory statistics, e. g. the number of page-ins/-outs or the
366 number of pagefaults.
368 - vserver
369 System resources used by Linux VServers.
370 See <http://linux-vserver.org/>.
372 - wireless
373 Link quality of wireless cards. Linux only.
375 - xmms
376 Bitrate and frequency of music played with XMMS.
378 - zfs_arc
379 Statistics for ZFS' “Adaptive Replacement Cache” (ARC).
381 - zookeeper
382 Read data from Zookeeper's MNTR command.
384 * Output can be written or sent to various destinations by the following
385 plugins:
387 - amqp
388 Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
389 server, such as RabbitMQ.
391 - csv
392 Write to comma separated values (CSV) files. This needs lots of
393 diskspace but is extremely portable and can be analysed with almost
394 every program that can analyse anything. Even Microsoft's Excel..
396 - network
397 Send the data to a remote host to save the data somehow. This is useful
398 for large setups where the data should be saved by a dedicated machine.
400 - perl
401 Of course the values are propagated to plugins written in Perl, too, so
402 you can easily do weird stuff with the plugins we didn't dare think of
403 ;) See collectd-perl(5).
405 - python
406 It's possible to implement write plugins in Python using the python
407 plugin. See collectd-python(5) for details.
409 - rrdcached
410 Output to round-robin-database (RRD) files using the RRDtool caching
411 daemon (RRDcacheD) - see rrdcached(1). That daemon provides a general
412 implementation of the caching done by the `rrdtool' plugin.
414 - rrdtool
415 Output to round-robin-database (RRD) files using librrd. See rrdtool(1).
416 This is likely the most popular destination for such values. Since
417 updates to RRD-files are somewhat expensive this plugin can cache
418 updates to the files and write a bunch of updates at once, which lessens
419 system load a lot.
421 - unixsock
422 One can query the values from the unixsock plugin whenever they're
423 needed. Please read collectd-unixsock(5) for a description on how that's
424 done.
426 - write_graphite
427 Sends data to Carbon, the storage layer of Graphite using TCP or UDP. It
428 can be configured to avoid logging send errors (especially useful when
429 using UDP).
431 - write_tsdb
432 Sends data OpenTSDB, a scalable no master, no shared state time series
433 database.
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 * Logging is, as everything in collectd, provided by plugins. The following
460 plugins keep up informed about what's going on:
462 - logfile
463 Writes log messages to a file or STDOUT/STDERR.
465 - perl
466 Log messages are propagated to plugins written in Perl as well.
467 See collectd-perl(5).
469 - python
470 It's possible to implement log plugins in Python using the python plugin.
471 See collectd-python(5) for details.
473 - syslog
474 Logs to the standard UNIX logging mechanism, syslog.
476 - log_logstash
477 Writes log messages formatted as logstash JSON events.
479 * Notifications can be handled by the following plugins:
481 - notify_desktop
482 Send a desktop notification to a notification daemon, as defined in
483 the Desktop Notification Specification. To actually display the
484 notifications, notification-daemon is required.
485 See http://www.galago-project.org/specs/notification/.
487 - notify_email
488 Send an E-mail with the notification message to the configured
489 recipients.
491 - exec
492 Execute a program or script to handle the notification.
493 See collectd-exec(5).
495 - logfile
496 Writes the notification message to a file or STDOUT/STDERR.
498 - network
499 Send the notification to a remote host to handle it somehow.
501 - perl
502 Notifications are propagated to plugins written in Perl as well.
503 See collectd-perl(5).
505 - python
506 It's possible to implement notification plugins in Python using the
507 python plugin. See collectd-python(5) for details.
509 * Value processing can be controlled using the "filter chain" infrastructure
510 and "matches" and "targets". The following plugins are available:
512 - match_empty_counter
513 Match counter values which are currently zero.
515 - match_hashed
516 Match values using a hash function of the hostname.
518 - match_regex
519 Match values by their identifier based on regular expressions.
521 - match_timediff
522 Match values with an invalid timestamp.
524 - match_value
525 Select values by their data sources' values.
527 - target_notification
528 Create and dispatch a notification.
530 - target_replace
531 Replace parts of an identifier using regular expressions.
533 - target_scale
534 Scale (multiply) values by an arbitrary value.
536 - target_set
537 Set (overwrite) entire parts of an identifier.
539 * Miscellaneous plugins:
541 - aggregation
542 Selects multiple value lists based on patterns or regular expressions
543 and creates new aggregated values lists from those.
545 - threshold
546 Checks values against configured thresholds and creates notifications if
547 values are out of bounds. See collectd-threshold(5) for details.
549 - uuid
550 Sets the hostname to a unique identifier. This is meant for setups
551 where each client may migrate to another physical host, possibly going
552 through one or more name changes in the process.
554 * Performance: Since collectd is running as a daemon it doesn't spend much
555 time starting up again and again. With the exception of the exec plugin no
556 processes are forked. Caching in output plugins, such as the rrdtool and
557 network plugins, makes sure your resources are used efficiently. Also,
558 since collectd is programmed multithreaded it benefits from hyper-threading
559 and multicore processors and makes sure that the daemon isn't idle if only
560 one plugin waits for an IO-operation to complete.
562 * Once set up, hardly any maintenance is necessary. Setup is kept as easy
563 as possible and the default values should be okay for most users.
566 Operation
567 ---------
569 * collectd's configuration file can be found at `sysconfdir'/collectd.conf.
570 Run `collectd -h' for a list of built-in defaults. See `collectd.conf(5)'
571 for a list of options and a syntax description.
573 * When the `csv' or `rrdtool' plugins are loaded they'll write the values to
574 files. The usual place for these files is beneath `/var/lib/collectd'.
576 * When using some of the plugins, collectd needs to run as user root, since
577 only root can do certain things, such as craft ICMP packages needed to ping
578 other hosts. collectd should NOT be installed setuid root since it can be
579 used to overwrite valuable files!
581 * Sample scripts to generate graphs reside in `contrib/' in the source
582 package or somewhere near `/usr/share/doc/collectd' in most distributions.
583 Please be aware that those script are meant as a starting point for your
584 own experiments.. Some of them require the `RRDs' Perl module.
585 (`librrds-perl' on Debian) If you have written a more sophisticated
586 solution please share it with us.
588 * The RRAs of the automatically created RRD files depend on the `step'
589 and `heartbeat' settings given. If change these settings you may need to
590 re-create the files, losing all data. Please be aware of that when changing
591 the values and read the rrdtool(1) manpage thoroughly.
594 collectd and chkrootkit
595 -----------------------
597 If you are using the `dns' plugin chkrootkit(1) will report collectd as a
598 packet sniffer ("<iface>: PACKET SNIFFER(/usr/sbin/collectd[<pid>])"). The
599 plugin captures all UDP packets on port 53 to analyze the DNS traffic. In
600 this case, collectd is a legitimate sniffer and the report should be
601 considered to be a false positive. However, you might want to check that
602 this really is collectd and not some other, illegitimate sniffer.
605 Prerequisites
606 -------------
608 To compile collectd from source you will need:
610 * Usual suspects: C compiler, linker, preprocessor, make, ...
612 * A POSIX-threads (pthread) implementation.
613 Since gathering some statistics is slow (network connections, slow devices,
614 etc) collectd is parallelized. The POSIX threads interface is being
615 used and should be found in various implementations for hopefully all
616 platforms.
618 * aerotools-ng (optional)
619 Used by the `aquaero' plugin. Currently, the `libaquaero5' library, which
620 is used by the `aerotools-ng' toolkit, is not compiled as a shared object
621 nor does it feature an installation routine. Therefore, you need to point
622 collectd's configure script at the source directory of the `aerotools-ng'
623 project.
624 <https://github.com/lynix/aerotools-ng>
626 * CoreFoundation.framework and IOKit.framework (optional)
627 For compiling on Darwin in general and the `apple_sensors' plugin in
628 particular.
629 <http://developer.apple.com/corefoundation/>
631 * libatasmart (optional)
632 Used by the `smart' plugin.
633 <http://git.0pointer.de/?p=libatasmart.git>
635 * libclntsh (optional)
636 Used by the `oracle' plugin.
638 * libhiredis (optional)
639 Used by the redis plugin. Please note that you require a 0.10.0 version
640 or higher. <https://github.com/redis/hiredis>
642 * libcurl (optional)
643 If you want to use the `apache', `ascent', `bind', `curl', `curl_json',
644 `curl_xml', `nginx', or `write_http' plugin.
645 <http://curl.haxx.se/>
647 * libdbi (optional)
648 Used by the `dbi' plugin to connect to various databases.
649 <http://libdbi.sourceforge.net/>
651 * libesmtp (optional)
652 For the `notify_email' plugin.
653 <http://www.stafford.uklinux.net/libesmtp/>
655 * libganglia (optional)
656 Used by the `gmond' plugin to process data received from Ganglia.
657 <http://ganglia.info/>
659 * libgcrypt (optional)
660 Used by the `network' plugin for encryption and authentication.
661 <http://www.gnupg.org/>
663 * libhal (optional)
664 If present, the `uuid' plugin will check for UUID from HAL.
665 <http://hal.freedesktop.org/>
667 * libi2c-dev (optional)
668 Used for the plugin `barometer', provides just the i2c-dev.h header file
669 for user space i2c development.
671 * libiptc (optional)
672 For querying iptables counters.
673 <http://netfilter.org/>
675 * libjvm (optional)
676 Library that encapsulates the `Java Virtual Machine' (JVM). This library is
677 used by the `java' plugin to execute Java bytecode. See “Configuring with
678 libjvm” below.
679 <http://openjdk.java.net/> (and others)
681 * libldap (optional)
682 Used by the `openldap' plugin.
683 <http://www.openldap.org/>
685 * liblvm2 (optional)
686 Used by the `lvm' plugin.
687 <ftp://sources.redhat.com/pub/lvm2/>
689 * libmemcached (optional)
690 Used by the `memcachec' plugin to connect to a memcache daemon.
691 <http://tangent.org/552/libmemcached.html>
693 * libmnl (optional)
694 Used by the `netlink' plugin.
695 <http://www.netfilter.org/projects/libmnl/>
697 * libmodbus (optional)
698 Used by the `modbus' plugin to communicate with Modbus/TCP devices. The
699 `modbus' plugin works with version 2.0.3 of the library – due to frequent
700 API changes other versions may or may not compile cleanly.
701 <http://www.libmodbus.org/>
703 * libmysqlclient (optional)
704 Unsurprisingly used by the `mysql' plugin.
705 <http://dev.mysql.com/>
707 * libnetapp (optional)
708 Required for the `netapp' plugin.
709 This library is part of the “Manage ONTAP SDK” published by NetApp.
711 * libnetsnmp (optional)
712 For the `snmp' plugin.
713 <http://www.net-snmp.org/>
715 * libnotify (optional)
716 For the `notify_desktop' plugin.
717 <http://www.galago-project.org/>
719 * libopenipmi (optional)
720 Used by the `ipmi' plugin to prove IPMI devices.
721 <http://openipmi.sourceforge.net/>
723 * liboping (optional)
724 Used by the `ping' plugin to send and receive ICMP packets.
725 <http://octo.it/liboping/>
727 * libowcapi (optional)
728 Used by the `onewire' plugin to read values from onewire sensors (or the
729 owserver(1) daemon).
730 <http://www.owfs.org/>
732 * libpcap (optional)
733 Used to capture packets by the `dns' plugin.
734 <http://www.tcpdump.org/>
736 * libperfstat (optional)
737 Used by various plugins to gather statistics under AIX.
739 * libperl (optional)
740 Obviously used by the `perl' plugin. The library has to be compiled with
741 ithread support (introduced in Perl 5.6.0).
742 <http://www.perl.org/>
744 * libpq (optional)
745 The PostgreSQL C client library used by the `postgresql' plugin.
746 <http://www.postgresql.org/>
748 * libprotobuf-c, protoc-c (optional)
749 Used by the `pinba' plugin to generate a parser for the network packets
750 sent by the Pinba PHP extension, and by the `write_riemann' plugin to
751 generate events to be sent to a Riemann server.
752 <http://code.google.com/p/protobuf-c/>
754 * libpython (optional)
755 Used by the `python' plugin. Currently, Python 2.3 and later and Python 3
756 are supported.
757 <http://www.python.org/>
759 * librabbitmq (optional; also called “rabbitmq-c”)
760 Used by the `amqp' plugin for AMQP connections, for example to RabbitMQ.
761 <http://hg.rabbitmq.com/rabbitmq-c/>
763 * librdkafka (optional; also called “rdkafka”)
764 Used by the `write_kafka' plugin for producing messages and sending them
765 to a Kafka broker.
766 <https://github.com/edenhill/librdkafka>
768 * librouteros (optional)
769 Used by the `routeros' plugin to connect to a device running `RouterOS'.
770 <http://octo.it/librouteros/>
772 * librrd (optional)
773 Used by the `rrdtool' and `rrdcached' plugins. The latter requires RRDtool
774 client support which was added after version 1.3 of RRDtool. Versions 1.0,
775 1.2 and 1.3 are known to work with the `rrdtool' plugin.
776 <http://oss.oetiker.ch/rrdtool/>
778 * librt, libsocket, libkstat, libdevinfo (optional)
779 Various standard Solaris libraries which provide system functions.
780 <http://developers.sun.com/solaris/>
782 * libsensors (optional)
783 To read from `lm_sensors', see the `sensors' plugin.
784 <http://www.lm-sensors.org/>
786 * libsigrok (optional)
787 Used by the `sigrok' plugin. In addition, libsigrok depends on glib,
788 libzip, and optionally (depending on which drivers are enabled) on
789 libusb, libftdi and libudev.
791 * libstatgrab (optional)
792 Used by various plugins to collect statistics on systems other than Linux
793 and/or Solaris.
794 <http://www.i-scream.org/libstatgrab/>
796 * libtokyotyrant (optional)
797 Used by the `tokyotyrant' plugin.
798 <http://1978th.net/tokyotyrant/>
800 * libupsclient/nut (optional)
801 For the `nut' plugin which queries nut's `upsd'.
802 <http://networkupstools.org/>
804 * libvirt (optional)
805 Collect statistics from virtual machines.
806 <http://libvirt.org/>
808 * libxml2 (optional)
809 Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
810 `virt' plugins.
811 <http://xmlsoft.org/>
813 * libxmms (optional)
814 <http://www.xmms.org/>
816 * libyajl (optional)
817 Parse JSON data. This is needed for the `ceph', `curl_json' and
818 `log_logstash' plugins.
819 <http://github.com/lloyd/yajl>
821 * libvarnish (optional)
822 Fetches statistics from a Varnish instance. This is needed for the
823 `varnish' plugin.
824 <http://varnish-cache.org>
826 Configuring / Compiling / Installing
827 ------------------------------------
829 To configure, build and install collectd with the default settings, run
830 `./configure && make && make install'. For detailed, generic instructions
831 see INSTALL. For a complete list of configure options and their description,
832 run `./configure --help'.
834 By default, the configure script will check for all build dependencies and
835 disable all plugins whose requirements cannot be fulfilled (any other plugin
836 will be enabled). To enable a plugin, install missing dependencies (see
837 section `Prerequisites' above) and rerun `configure'. If you specify the
838 `--enable-<plugin>' configure option, the script will fail if the depen-
839 dencies for the specified plugin are not met. In that case you can force the
840 plugin to be built using the `--enable-<plugin>=force' configure option.
841 This will most likely fail though unless you're working in a very unusual
842 setup and you really know what you're doing. If you specify the
843 `--disable-<plugin>' configure option, the plugin will not be built. If you
844 specify the `--enable-all-plugins' or `--disable-all-plugins' configure
845 options, all plugins will be enabled or disabled respectively by default.
846 Explicitly enabling or disabling a plugin overwrites the default for the
847 specified plugin. These options are meant for package maintainers and should
848 not be used in everyday situations.
850 By default, collectd will be installed into `/opt/collectd'. You can adjust
851 this setting by specifying the `--prefix' configure option - see INSTALL for
852 details. If you pass DESTDIR=<path> to `make install', <path> will be
853 prefixed to all installation directories. This might be useful when creating
854 packages for collectd.
856 Configuring with libjvm
857 -----------------------
859 To determine the location of the required files of a Java installation is not
860 an easy task, because the locations vary with your kernel (Linux, SunOS, …)
861 and with your architecture (x86, SPARC, …) and there is no ‘java-config’
862 script we could use. Configuration of the JVM library is therefore a bit
863 tricky.
865 The easiest way to use the `--with-java=$JAVA_HOME' option, where
866 `$JAVA_HOME' is usually something like:
867 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14
869 The configure script will then use find(1) to look for the following files:
871 - jni.h
872 - jni_md.h
873 - libjvm.so
875 If found, appropriate CPP-flags and LD-flags are set and the following
876 library checks succeed.
878 If this doesn't work for you, you have the possibility to specify CPP-flags,
879 C-flags and LD-flags for the ‘Java’ plugin by hand, using the following three
880 (environment) variables:
882 - JAVA_CPPFLAGS
883 - JAVA_CFLAGS
884 - JAVA_LDFLAGS
886 For example (shortened for demonstration purposes):
888 ./configure JAVA_CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
890 Adding "-ljvm" to the JAVA_LDFLAGS is done automatically, you don't have to
891 do that.
893 Generating the configure script
894 -------------------------------
896 Collectd ships with a `build.sh' script to generate the `configure'
897 script shipped with releases.
899 To generate the `configure` script, you'll need the following dependencies:
901 - autoconf
902 - automake
903 - flex
904 - bison
905 - libtool
906 - libtool-ltdl
908 The `build.sh' script takes no arguments.
910 Crosscompiling
911 --------------
913 To compile correctly collectd needs to be able to initialize static
914 variables to NAN (Not A Number). Some C libraries, especially the GNU
915 libc, have a problem with that.
917 Luckily, with GCC it's possible to work around that problem: One can define
918 NAN as being (0.0 / 0.0) and `isnan' as `f != f'. However, to test this
919 ``implementation'' the configure script needs to compile and run a short
920 test program. Obviously running a test program when doing a cross-
921 compilation is, well, challenging.
923 If you run into this problem, you can use the `--with-nan-emulation'
924 configure option to force the use of this implementation. We can't promise
925 that the compiled binary actually behaves as it should, but since NANs
926 are likely never passed to the libm you have a good chance to be lucky.
928 Likewise, collectd needs to know the layout of doubles in memory, in order
929 to craft uniform network packets over different architectures. For this, it
930 needs to know how to convert doubles into the memory layout used by x86. The
931 configure script tries to figure this out by compiling and running a few
932 small test programs. This is of course not possible when cross-compiling.
933 You can use the `--with-fp-layout' option to tell the configure script which
934 conversion method to assume. Valid arguments are:
936 * `nothing' (12345678 -> 12345678)
937 * `endianflip' (12345678 -> 87654321)
938 * `intswap' (12345678 -> 56781234)
941 Contact
942 -------
944 For questions, bug reports, development information and basically all other
945 concerns please send an email to collectd's mailing list at
946 <list at collectd.org>.
948 For live discussion and more personal contact visit us in IRC, we're in
949 channel #collectd on freenode.
952 Author
953 ------
955 Florian octo Forster <octo at collectd.org>,
956 Sebastian tokkee Harl <sh at tokkee.org>,
957 and many contributors (see `AUTHORS').
959 Please send bug reports and patches to the mailing list, see `Contact'
960 above.