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