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