e97140bab32f84e4bc5ee59c5a22ab57203d54c1
[collectd.git] / README
1  collectd - System information collection daemon
2 =================================================
3 https://collectd.org/
4
5 About
6 -----
7
8   collectd is a small daemon which collects system information periodically
9   and provides mechanisms to store and monitor the values in a variety of
10   ways.
11
12
13 Features
14 --------
15
16   * collectd is able to collect the following data:
17
18     - apache
19       Apache server utilization: Number of bytes transferred, number of
20       requests handled and detailed scoreboard statistics
21
22     - apcups
23       APC UPS Daemon: UPS charge, load, input/output/battery voltage, etc.
24
25     - apple_sensors
26       Sensors in Macs running Mac OS X / Darwin: Temperature, fan speed and
27       voltage sensors.
28
29     - aquaero
30       Various sensors in the Aquaero 5 water cooling board made by Aquacomputer.
31
32     - ascent
33       Statistics about Ascent, a free server for the game `World of Warcraft'.
34
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.
39
40     - battery
41       Batterycharge, -current and voltage of ACPI and PMU based laptop
42       batteries.
43
44     - bind
45       Name server and resolver statistics from the `statistics-channel'
46       interface of BIND 9.5, 9,6 and later.
47
48     - ceph
49       Statistics from the Ceph distributed storage system.
50
51     - cgroups
52       CPU accounting information for process groups under Linux.
53
54     - chrony
55       Chrony daemon statistics: Local clock drift, offset to peers, etc.
56
57     - conntrack
58       Number of nf_conntrack entries.
59
60     - contextswitch
61       Number of context switches done by the operating system.
62
63     - cpu
64       CPU utilization: Time spent in the system, user, nice, idle, and related
65       states.
66
67     - cpufreq
68       CPU frequency (For laptops with speed step or a similar technology)
69
70     - curl
71       Parse statistics from websites using regular expressions.
72
73     - curl_json
74       Retrieves JSON data via cURL and parses it according to user
75       configuration.
76
77     - curl_xml
78       Retrieves XML data via cURL and parses it according to user
79       configuration.
80
81     - dbi
82       Executes SQL statements on various databases and interprets the returned
83       data.
84
85     - df
86       Mountpoint usage (Basically the values `df(1)' delivers)
87
88     - disk
89       Disk utilization: Sectors read/written, number of read/write actions,
90       average time an IO-operation took to complete.
91
92     - dns
93       DNS traffic: Query types, response codes, opcodes and traffic/octets
94       transferred.
95
96     - drbd
97       Collect individual drbd resource statistics.
98
99     - email
100       Email statistics: Count, traffic, spam scores and checks.
101       See collectd-email(5).
102
103     - entropy
104       Amount of entropy available to the system.
105
106     - ethstat
107       Network interface card statistics.
108
109     - exec
110       Values gathered by a custom program or script.
111       See collectd-exec(5).
112
113     - fhcount
114       File handles statistics.
115
116     - filecount
117       Count the number of files in directories.
118
119     - fscache
120       Linux file-system based caching framework statistics.
121
122     - gmond
123       Receive multicast traffic from Ganglia instances.
124
125     - grpc
126       Receive values over the network using the gRPC framework.
127
128     - hddtemp
129       Hard disk temperatures using hddtempd.
130
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.
135
136     - interface
137       Interface traffic: Number of octets, packets and errors for each
138       interface.
139
140     - ipc
141       IPC counters: semaphores used, number of allocated segments in shared
142       memory and more.
143
144     - ipmi
145       IPMI (Intelligent Platform Management Interface) sensors information.
146
147     - iptables
148       Iptables' counters: Number of bytes that were matched by a certain
149       iptables rule.
150
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.
155
156     - irq
157       IRQ counters: Frequency in which certain interrupts occur.
158
159     - java
160       Integrates a `Java Virtual Machine' (JVM) to execute plugins in Java
161       bytecode. See “Configuring with libjvm” below.
162
163     - load
164       System load average over the last 1, 5 and 15 minutes.
165
166     - lpar
167       Detailed CPU statistics of the “Logical Partitions” virtualization
168       technique built into IBM's POWER processors.
169
170     - lvm
171       Size of “Logical Volumes” (LV) and “Volume Groups” (VG) of Linux'
172       “Logical Volume Manager” (LVM).
173
174     - madwifi
175       Queries very detailed usage statistics from wireless LAN adapters and
176       interfaces that use the Atheros chipset and the MadWifi driver.
177
178     - mbmon
179       Motherboard sensors: temperature, fan speed and voltage information,
180       using mbmon(1).
181
182     - md
183       Linux software-RAID device information (number of active, failed, spare
184       and missing disks).
185
186     - memcachec
187       Query and parse data from a memcache daemon (memcached).
188
189     - memcached
190       Statistics of the memcached distributed caching system.
191       <http://www.danga.com/memcached/>
192
193     - memory
194       Memory utilization: Memory occupied by running processes, page cache,
195       buffer cache and free.
196
197     - mic
198       Collects CPU usage, memory usage, temperatures and power consumption from
199       Intel Many Integrated Core (MIC) CPUs.
200
201     - modbus
202       Reads values from Modbus/TCP enabled devices. Supports reading values
203       from multiple "slaves" so gateway devices can be used.
204
205     - mqtt
206       Publishes and subscribes to MQTT topics.
207
208     - multimeter
209       Information provided by serial multimeters, such as the `Metex
210       M-4650CR'.
211
212     - mysql
213       MySQL server statistics: Commands issued, handlers triggered, thread
214       usage, query cache utilization and traffic/octets sent and received.
215
216     - netapp
217       Plugin to query performance values from a NetApp storage system using the
218       “Manage ONTAP” SDK provided by NetApp.
219
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.
224
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.
229
230     - nfs
231       NFS Procedures: Which NFS command were called how often. Only NFSv2 and
232       NFSv3 right now.
233
234     - nginx
235       Collects statistics from `nginx' (speak: engine X), a HTTP and mail
236       server/proxy.
237
238     - ntpd
239       NTP daemon statistics: Local clock drift, offset to peers, etc.
240
241     - numa
242       Information about Non-Uniform Memory Access (NUMA).
243
244     - nut
245       Network UPS tools: UPS current, voltage, power, charge, utilisation,
246       temperature, etc. See upsd(8).
247
248     - olsrd
249       Queries routing information from the “Optimized Link State Routing”
250       daemon.
251
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.
255
256     - openldap
257       Read monitoring information from OpenLDAP's cn=Monitor subtree.
258
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>
262
263     - oracle
264       Query data from an Oracle database.
265
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).
270
271     - pf
272       Query statistics from BSD's packet filter "pf".
273
274     - pinba
275       Receive and dispatch timing values from Pinba, a profiling extension for
276       PHP.
277
278     - ping
279       Network latency: Time to reach the default gateway or another given
280       host.
281
282     - postgresql
283       PostgreSQL database statistics: active server connections, transaction
284       numbers, block IO, table row manipulations.
285
286     - powerdns
287       PowerDNS name server statistics.
288
289     - processes
290       Process counts: Number of running, sleeping, zombie, ... processes.
291
292     - protocols
293       Counts various aspects of network protocols such as IP, TCP, UDP, etc.
294
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.
300
301     - redis
302       The redis plugin gathers information from a Redis server, including:
303       uptime, used memory, total connections etc.
304
305     - routeros
306       Query interface and wireless registration statistics from RouterOS.
307
308     - rrdcached
309       RRDtool caching daemon (RRDcacheD) statistics.
310
311     - sensors
312       System sensors, accessed using lm_sensors: Voltages, temperatures and
313       fan rotation speeds.
314
315     - serial
316       RX and TX of serial interfaces. Linux only; needs root privileges.
317
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.
322
323     - smart
324       Collect SMART statistics, notably load cycle count, temperature
325       and bad sectors.
326
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).
331
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.
335
336     - swap
337       Pages swapped out onto hard disk or whatever is called `swap' by the OS..
338
339     - table
340       Parse table-like structured files.
341
342     - tail
343       Follows (tails) log files, parses them by lines and submits matched
344       values.
345
346     - tail_csv
347       Follows (tails) files in CSV format, parses each line and submits
348       extracted values.
349
350     - tape
351       Bytes and operations read and written on tape devices. Solaris only.
352
353     - tcpconns
354       Number of TCP connections to specific local and remote ports.
355
356     - teamspeak2
357       TeamSpeak2 server statistics.
358
359     - ted
360       Plugin to read values from `The Energy Detective' (TED).
361
362     - thermal
363       Linux ACPI thermal zone information.
364
365     - tokyotyrant
366       Reads the number of records and file size from a running Tokyo Tyrant
367       server.
368
369     - turbostat
370       Reads CPU frequency and C-state residency on modern Intel
371       turbo-capable processors.
372
373     - uptime
374       System uptime statistics.
375
376     - users
377       Users currently logged in.
378
379     - varnish
380       Various statistics from Varnish, an HTTP accelerator.
381
382     - virt
383       CPU, memory, disk and network I/O statistics from virtual machines.
384
385     - vmem
386       Virtual memory statistics, e. g. the number of page-ins/-outs or the
387       number of pagefaults.
388
389     - vserver
390       System resources used by Linux VServers.
391       See <http://linux-vserver.org/>.
392
393     - wireless
394       Link quality of wireless cards. Linux only.
395
396     - xencpu
397       XEN Hypervisor CPU stats.
398
399     - xmms
400       Bitrate and frequency of music played with XMMS.
401
402     - zfs_arc
403       Statistics for ZFS' “Adaptive Replacement Cache” (ARC).
404
405     - zone
406       Measures the percentage of cpu load per container (zone) under Solaris 10
407       and higher
408
409     - zookeeper
410       Read data from Zookeeper's MNTR command.
411
412   * Output can be written or sent to various destinations by the following
413     plugins:
414
415     - amqp
416       Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
417       server, such as RabbitMQ.
418
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..
423
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.
427
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).
432
433     - python
434       It's possible to implement write plugins in Python using the python
435       plugin. See collectd-python(5) for details.
436
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.
441
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.
448
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.
453
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).
458
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.
463
464     - write_kafka
465       Sends data to Apache Kafka, a distributed queue.
466
467     - write_log
468       Writes data to the log
469
470     - write_mongodb
471       Sends data to MongoDB, a NoSQL database.
472
473     - write_redis
474       Sends the values to a Redis key-value database server.
475
476     - write_riemann
477       Sends data to Riemann, a stream processing and monitoring system.
478
479     - write_sensu
480       Sends data to Sensu, a stream processing and monitoring system, via the
481       Sensu client local TCP socket.
482
483     - write_tsdb
484       Sends data OpenTSDB, a scalable no master, no shared state time series
485       database.
486
487   * Logging is, as everything in collectd, provided by plugins. The following
488     plugins keep us informed about what's going on:
489
490     - logfile
491       Writes log messages to a file or STDOUT/STDERR.
492
493     - perl
494       Log messages are propagated to plugins written in Perl as well.
495       See collectd-perl(5).
496
497     - python
498       It's possible to implement log plugins in Python using the python plugin.
499       See collectd-python(5) for details.
500
501     - syslog
502       Logs to the standard UNIX logging mechanism, syslog.
503
504     - log_logstash
505       Writes log messages formatted as logstash JSON events.
506
507   * Notifications can be handled by the following plugins:
508
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/.
514
515     - notify_email
516       Send an E-mail with the notification message to the configured
517       recipients.
518
519     - notify_nagios
520       Submit notifications as passive check results to a local nagios instance.
521
522     - exec
523       Execute a program or script to handle the notification.
524       See collectd-exec(5).
525
526     - logfile
527       Writes the notification message to a file or STDOUT/STDERR.
528
529     - network
530       Send the notification to a remote host to handle it somehow.
531
532     - perl
533       Notifications are propagated to plugins written in Perl as well.
534       See collectd-perl(5).
535
536     - python
537       It's possible to implement notification plugins in Python using the
538       python plugin. See collectd-python(5) for details.
539
540   * Value processing can be controlled using the "filter chain" infrastructure
541     and "matches" and "targets". The following plugins are available:
542
543     - match_empty_counter
544       Match counter values which are currently zero.
545
546     - match_hashed
547       Match values using a hash function of the hostname.
548
549     - match_regex
550       Match values by their identifier based on regular expressions.
551
552     - match_timediff
553       Match values with an invalid timestamp.
554
555     - match_value
556       Select values by their data sources' values.
557
558     - target_notification
559       Create and dispatch a notification.
560
561     - target_replace
562       Replace parts of an identifier using regular expressions.
563
564     - target_scale
565       Scale (multiply) values by an arbitrary value.
566
567     - target_set
568       Set (overwrite) entire parts of an identifier.
569
570   * Miscellaneous plugins:
571
572     - aggregation
573       Selects multiple value lists based on patterns or regular expressions
574       and creates new aggregated values lists from those.
575
576     - threshold
577       Checks values against configured thresholds and creates notifications if
578       values are out of bounds. See collectd-threshold(5) for details.
579
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.
584
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.
592
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.
595
596
597 Operation
598 ---------
599
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.
603
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'.
606
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!
611
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.
618
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.
623
624
625 collectd and chkrootkit
626 -----------------------
627
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.
634
635
636 Prerequisites
637 -------------
638
639   To compile collectd from source you will need:
640
641   * Usual suspects: C compiler, linker, preprocessor, make, ...
642
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.
648
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>
656
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/>
661
662   * libatasmart (optional)
663     Used by the `smart' plugin.
664     <http://git.0pointer.de/?p=libatasmart.git>
665
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/>
671
672   * libclntsh (optional)
673     Used by the `oracle' plugin.
674
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>
678
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/>
683
684   * libdbi (optional)
685     Used by the `dbi' plugin to connect to various databases.
686     <http://libdbi.sourceforge.net/>
687
688   * libesmtp (optional)
689     For the `notify_email' plugin.
690     <http://www.stafford.uklinux.net/libesmtp/>
691
692   * libganglia (optional)
693     Used by the `gmond' plugin to process data received from Ganglia.
694     <http://ganglia.info/>
695
696   * libgrpc (optional)
697     Used by the `grpc' plugin. gRPC requires a C++ compiler supporting the
698     C++11 standard.
699     <https://grpc.io/>
700
701   * libgcrypt (optional)
702     Used by the `network' plugin for encryption and authentication.
703     <http://www.gnupg.org/>
704
705   * libhal (optional)
706     If present, the `uuid' plugin will check for UUID from HAL.
707     <http://hal.freedesktop.org/>
708
709   * libi2c-dev (optional)
710     Used for the plugin `barometer', provides just the i2c-dev.h header file
711     for user space i2c development.
712
713   * libiptc (optional)
714     For querying iptables counters.
715     <http://netfilter.org/>
716
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)
722
723   * libldap (optional)
724     Used by the `openldap' plugin.
725     <http://www.openldap.org/>
726
727   * liblvm2 (optional)
728     Used by the `lvm' plugin.
729     <ftp://sources.redhat.com/pub/lvm2/>
730
731   * libmemcached (optional)
732     Used by the `memcachec' plugin to connect to a memcache daemon.
733     <http://tangent.org/552/libmemcached.html>
734
735   * libmnl (optional)
736     Used by the `netlink' plugin.
737     <http://www.netfilter.org/projects/libmnl/>
738
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/>
744
745   * libmysqlclient (optional)
746     Unsurprisingly used by the `mysql' plugin.
747     <http://dev.mysql.com/>
748
749   * libnetapp (optional)
750     Required for the `netapp' plugin.
751     This library is part of the “Manage ONTAP SDK” published by NetApp.
752
753   * libnetsnmp (optional)
754     For the `snmp' plugin.
755     <http://www.net-snmp.org/>
756
757   * libnotify (optional)
758     For the `notify_desktop' plugin.
759     <http://www.galago-project.org/>
760
761   * libopenipmi (optional)
762     Used by the `ipmi' plugin to prove IPMI devices.
763     <http://openipmi.sourceforge.net/>
764
765   * liboping (optional)
766     Used by the `ping' plugin to send and receive ICMP packets.
767     <http://octo.it/liboping/>
768
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/>
773
774   * libpcap (optional)
775     Used to capture packets by the `dns' plugin.
776     <http://www.tcpdump.org/>
777
778   * libperfstat (optional)
779     Used by various plugins to gather statistics under AIX.
780
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/>
785
786   * libpq (optional)
787     The PostgreSQL C client library used by the `postgresql' plugin.
788     <http://www.postgresql.org/>
789
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/>
794
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/>
799
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/>
804
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/>
808
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>
813
814   * librouteros (optional)
815     Used by the `routeros' plugin to connect to a device running `RouterOS'.
816     <http://octo.it/librouteros/>
817
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/>
823
824   * librt, libsocket, libkstat, libdevinfo (optional)
825     Various standard Solaris libraries which provide system functions.
826     <http://developers.sun.com/solaris/>
827
828   * libsensors (optional)
829     To read from `lm_sensors', see the `sensors' plugin.
830     <http://www.lm-sensors.org/>
831
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.
836
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/>
841
842   * libtokyotyrant (optional)
843     Used by the `tokyotyrant' plugin.
844     <http://1978th.net/tokyotyrant/>
845
846   * libupsclient/nut (optional)
847     For the `nut' plugin which queries nut's `upsd'.
848     <http://networkupstools.org/>
849
850   * libvirt (optional)
851     Collect statistics from virtual machines.
852     <http://libvirt.org/>
853
854   * libxml2 (optional)
855     Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
856     `virt' plugins.
857     <http://xmlsoft.org/>
858
859   * libxen (optional)
860     Used by the `xencpu' plugin.
861     <http://xenbits.xensource.com/>
862
863   * libxmms (optional)
864     <http://www.xmms.org/>
865
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>
870
871   * libvarnish (optional)
872      Fetches statistics from a Varnish instance. This is needed for the
873      `varnish' plugin.
874      <http://varnish-cache.org>
875
876   * riemann-c-client (optional)
877      For the `write_riemann' plugin.
878      <https://github.com/algernon/riemann-c-client>
879
880 Configuring / Compiling / Installing
881 ------------------------------------
882
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'.
887
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.
903
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.
909
910 Configuring with libjvm
911 -----------------------
912
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.
918
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
922
923   The configure script will then use find(1) to look for the following files:
924
925     - jni.h
926     - jni_md.h
927     - libjvm.so
928
929   If found, appropriate CPP-flags and LD-flags are set and the following
930   library checks succeed.
931
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:
935
936     - JAVA_CPPFLAGS
937     - JAVA_CFLAGS
938     - JAVA_LDFLAGS
939     - JAVA_LIBS
940
941   For example (shortened for demonstration purposes):
942
943     ./configure JAVA_CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
944
945   Adding "-ljvm" to JAVA_LIBS is done automatically, you don't have to
946   do that.
947
948 Generating the configure script
949 -------------------------------
950
951 Collectd ships with a `build.sh' script to generate the `configure'
952 script shipped with releases.
953
954 To generate the `configure` script, you'll need the following dependencies:
955
956 - autoconf
957 - automake
958 - flex
959 - bison
960 - libtool
961 - libtool-ltdl
962 - pkg-config
963
964 The `build.sh' script takes no arguments.
965
966 Crosscompiling
967 --------------
968
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.
972
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.
978
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.
983
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:
991
992     * `nothing'    (12345678 -> 12345678)
993     * `endianflip' (12345678 -> 87654321)
994     * `intswap'    (12345678 -> 56781234)
995
996
997 Contact
998 -------
999
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>.
1003
1004   For live discussion and more personal contact visit us in IRC, we're in
1005   channel #collectd on freenode.
1006
1007
1008 Author
1009 ------
1010
1011   Florian octo Forster <octo at collectd.org>,
1012   Sebastian tokkee Harl <sh at tokkee.org>,
1013   and many contributors (see `AUTHORS').
1014
1015   Please send bug reports and patches to the mailing list, see `Contact'
1016   above.
1017