X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.pod;h=e36dcdf3eb0c9ebe031970da77cf86d777a36059;hb=47b7950c0bd0ae0b3823b8bfc4442d6a5dad36c5;hp=09aa5906256559719fb8c446fde15cd6bc70fc5f;hpb=bb458cd29afa10a63385efe6168dcc95d039612e;p=collectd.git diff --git a/src/collectd.pod b/src/collectd.pod index 09aa5906..e36dcdf3 100644 --- a/src/collectd.pod +++ b/src/collectd.pod @@ -8,97 +8,46 @@ collectd I<[options]> =head1 DESCRIPTION -collectd is a daemon that collects various system statistics periodically and -stores them into RRD-files. Which data is collected depends on compile-time -settings. The following features may be available: +collectd is a daemon that receives system statistics and makes them available +in a number of ways. The main daemon itself doesn't have any real functionality +apart from loading, querying and submitting to plugins. For a description of +available plugins please see L below. -=over 4 - -=item - -Battery status (I) - -=item - -CPU utilization (I) - -=item - -Mountpoint usage (I) - -=item - -Disk and partition usage/throughput (I) - -=item - -Harddisk temperatures (I) - -=item - -System load averages (I) - -=item - -Memory usage (I) - -=item - -MySQL statistics (I) - -=item - -NFS utilization (I, Linux only) - -=item - -Network latency (I) - -=item - -Number of processes (I, Linux only) - -=item - -lm_sensors information (I, Linux only) - -=item - -Serial port traffic (I, Linux only) - -=item - -Swap usage (I) - -=item +=head1 OPTIONS -Tape drive usage (I, Solaris only) +Most of collectd's configuration is done using using a configfile. See +L for an in-depth description of all options. -=item +=over 4 -Network traffic (I) +=item B<-C> Iconfig-fileE> -=item +Specify an alternative config file. This is the place to go when you wish to +change B's behavior. The path may be relative to the current working +directory. -Number of users logged into the system (I) +=item B<-t> -=back +Test the configuration only. The program immediately exits after parsing the +config file. A return code not equal to zero indicates an error. -=head1 OPTIONS +=item B<-T> -=over 4 +Test the plugin read callbacks only. The program immediately exits after invoking +the read callbacks once. A return code not equal to zero indicates an error. -=item B<-C> Iconfig-fileE> +=item B<-P> Ipid-fileE> -Specify an alternative config file. This is the place to go when you wish to -change B's behavior. The path may be relative to the current working -directory. +Specify an alternative pid file. This overwrites any settings in the config +file. This is thought for init-scripts that require the PID-file in a certain +directory to work correctly. For everyday-usage use the B +config-option. =item B<-f> Don't fork to the background. I will also B close standard file descriptors, detach from the session nor write a pid file. This is mainly -thought for 'supervisioning' init replacements such as I. +thought for 'supervising' init replacements such as I. =item B<-h> @@ -106,292 +55,84 @@ Output usage information and exit. =back -=head1 RRD FILES +=head1 PLUGINS -The RRD files are created automatically with the following RRAs: +As noted above, the real power of collectd lies within it's plugins. A +(hopefully complete) list of plugins and short descriptions can be found in the +F file that is distributed with the sourcecode. If you're using a +package it's a good bet to search somewhere near F. - RRA:AVERAGE:0.2:6:1500 - RRA:AVERAGE:0.1:180:1680 - RRA:AVERAGE:0.1:2160:1520 - RRA:MIN:0.2:6:1500 - RRA:MIN:0.1:180:1680 - RRA:MIN:0.1:2160:1520 - RRA:MAX:0.2:6:1500 - RRA:MAX:0.1:180:1680 - RRA:MAX:0.1:2160:1520 - -Since collectd uses a 10 second I the RRAs contain the following -timespans: - - Resolution | Data points | Timespan - -----------+-------------+---------- - 60 seconds | 1500 | 25 hours - 30 minutes | 1680 | 35 days - 6 hours | 1520 | 380 days - -The DS'es depend on the module creating the RRD files: +There are two big groups of plugins, B and B plugins: =over 4 -=item Battery charge (FnameE>/charge.rrd>) - - DS:charge:GAUGE:25:0:U - -=item Battery current (FnameE>/current.rrd>) - - DS:current:GAUGE:25:U:U - -=item Battery voltage (FnameE>/voltage.rrd>) - - DS:voltage:GAUGE:25:U:U - -=item CPU (FnumE>.rrd>) - - DS:user:COUNTER:25:0:100 - DS:nice:COUNTER:25:0:100 - DS:syst:COUNTER:25:0:100 - DS:idle:COUNTER:25:0:100 - DS:wait:COUNTER:25:0:100 - -=item Mountpoints (FpathE>.rrd>) - - DS:used:GAUGE:25:0:U - DS:free:GAUGE:25:0:U - -=item Diskstats (FmajorE>-IminorE>.rrd>) - - DS:rcount:COUNTER:25:0:U - DS:rmerged:COUNTER:25:0:U - DS:rbytes:COUNTER:25:0:U - DS:rtime:COUNTER:25:0:U - DS:wcount:COUNTER:25:0:U - DS:wmerged:COUNTER:25:0:U - DS:wbytes:COUNTER:25:0:U - DS:wtime:COUNTER:25:0:U - -=item Diskstats (FmajorE>-IminorE>.rrd>) - - DS:rcount:COUNTER:25:0:U - DS:rbytes:COUNTER:25:0:U - DS:wcount:COUNTER:25:0:U - DS:wbytes:COUNTER:25:0:U - -=item HDD Temperature (FmajorE>-IminorE>.rrd>) - - DS:value:GAUGE:25:U:U - -=item System load (F) - - DS:shortterm:GAUGE:25:0:100 - DS:midterm:GAUGE:25:0:100 - DS:longterm:GAUGE:25:0:100 - -=item Memory usage (F) - - DS:used:GAUGE:25:0:9223372036854775807 - DS:free:GAUGE:25:0:9223372036854775807 - DS:buffers:GAUGE:25:0:9223372036854775807 - DS:cached:GAUGE:25:0:9223372036854775807 - -=item MySQL commands and handlers (FcommandE>.rrd> and FhandlerE>.rrd>) - - DS:value:COUNTER:25:0:U - -=item MySQL query cache (F) - - DS:hits:COUNTER:25:0:U - DS:inserts:COUNTER:25:0:U - DS:not_cached:COUNTER:25:0:U - DS:lowmem_prunes:COUNTER:25:0:U - DS:queries_in_cache:GAUGE:25:0:U - -=item MySQL threads (F) - - DS:running:GAUGE:25:0:U - DS:connected:GAUGE:25:0:U - DS:cached:GAUGE:25:0:U - DS:created:COUNTER:25:0:U - -=item NFSv2 Procedures (F.rrd>) - - DS:null:COUNTER:25:0:U - DS:getattr:COUNTER:25:0:U - DS:setattr:COUNTER:25:0:U - DS:root:COUNTER:25:0:U - DS:lookup:COUNTER:25:0:U - DS:readlink:COUNTER:25:0:U - DS:read:COUNTER:25:0:U - DS:wrcache:COUNTER:25:0:U - DS:write:COUNTER:25:0:U - DS:create:COUNTER:25:0:U - DS:remove:COUNTER:25:0:U - DS:rename:COUNTER:25:0:U - DS:link:COUNTER:25:0:U - DS:symlink:COUNTER:25:0:U - DS:mkdir:COUNTER:25:0:U - DS:rmdir:COUNTER:25:0:U - DS:readdir:COUNTER:25:0:U - DS:fsstat:COUNTER:25:0:U - -=item NFSv3 Procedures (F.rrd>) - - DS:null:COUNTER:25:0:U - DS:getattr:COUNTER:25:0:U - DS:setattr:COUNTER:25:0:U - DS:lookup:COUNTER:25:0:U - DS:access:COUNTER:25:0:U - DS:readlink:COUNTER:25:0:U - DS:read:COUNTER:25:0:U - DS:write:COUNTER:25:0:U - DS:create:COUNTER:25:0:U - DS:mkdir:COUNTER:25:0:U - DS:symlink:COUNTER:25:0:U - DS:mknod:COUNTER:25:0:U - DS:remove:COUNTER:25:0:U - DS:rmdir:COUNTER:25:0:U - DS:rename:COUNTER:25:0:U - DS:link:COUNTER:25:0:U - DS:readdir:COUNTER:25:0:U - DS:readdirplus:COUNTER:25:0:U - DS:fsstat:COUNTER:25:0:U - DS:fsinfo:COUNTER:25:0:U - DS:pathconf:COUNTER:25:0:U - DS:commit:COUNTER:25:0:U - -=item Network latency / Ping (FhostnameE>.rrd>) - - DS:ping:GAUGE:25:0:65535 - -=item Processes (F) - - DS:running:GAUGE:25:0:65535 - DS:sleeping:GAUGE:25:0:65535 - DS:zombies:GAUGE:25:0:65535 - DS:stopped:GAUGE:25:0:65535 - DS:paging:GAUGE:25:0:65535 - DS:blocked:GAUGE:25:0:65535 - -=item lm_sensors (FchipE>-IfeatureE>.rrd>) +=item - DS:value:GAUGE:25:U:U +Input plugins are queried periodically. They somehow acquire the current value +of whatever they where designed to work with and submit these values back to +the daemon, i. e. they "dispatch" the values. As an example, the C +reads the current cpu-counters of time spent in the various modes (user, +system, nice, ...) and dispatches these counters to the daemon. -=item Serial port traffic (FnumE>.rrd>) +=item - DS:incoming:COUNTER:25:0:U - DS:outgoing:COUNTER:25:0:U - -=item Swap usage (F) - - DS:used:GAUGE:25:0:1099511627776 - DS:free:GAUGE:25:0:1099511627776 - DS:cached:GAUGE:25:0:1099511627776 - DS:resv:GAUGE:25:0:1099511627776 - -=item Tape drive usage (FnameE>.rrd>) - - DS:rcount:COUNTER:25:0: - DS:rmerged:COUNTER:25:0:U - DS:rbytes:COUNTER:25:0:U - DS:rtime:COUNTER:25:0:U - DS:wcount:COUNTER:25:0:U - DS:wmerged:COUNTER:25:0:U - DS:wbytes:COUNTER:25:0:U - DS:wtime:COUNTER:25:0:U - -=item Network traffic (FnameE>.rrd>) - - DS:incoming:COUNTER:25:0:U - DS:outgoing:COUNTER:25:0:U - -=item Users (F) - - DS:users:GAUGE:25:0:65535 +Output plugins get the dispatched values from the daemon and does something +with them. Common applications are writing to RRD-files, CSV-files or sending +the data over a network link to a remote box. =back -=head1 MODES - -By default collectd starts in the so called I which is not very -interesting. It collects data and writes it into RRD files in -F. There's nothing special so I won't discuss that in more -detail.. - -Please be aware that B. A -later declaration overrides earlier ones. I will start in -server-mode. If you want statistics of the server too you will have to start a -client process as well. - -Starting with version 3 collectd may send data over a network. As common with -network stuff there are two modes: A I and a I. Since one -usually has many senders and only a few listeners the sender is also called -I (using the option B<-c>) and the listener is called I (using -the option B<-s>). - -Communication happends using the (IPv4) multicast group B<239.192.74.66> and -packets sent to the port B<25826/udp>. Every ten seconds the I queries -all the modules and sends the collected data to the multicast group. The -I subscribes to the multicast group upon startup and then waits for -incoming packets. As it receives the packets it checks wether it has the -neccessary module and, if found, writes the data to an RRD file, creating -directories and files as needed. +Of course not all plugins fit neatly into one of the two above categories. The +C, for example, is able to send (i.Ee. "write") B +receive (i.Ee. "dispatch") values. Also, it opens a socket upon +initialization and dispatches the values when it receives them and isn't +triggered at the same time the input plugins are being read. You can think of +the network receive part as working asynchronous if it helps. -The multicast group used is within the I as defined -by L. Addresses within that space are meant to be routed within an AS -but not to the outside. However collectd cannot control this and won't try. So -it's totally up to you to secure your net. +In addition to the above, there are "logging plugins". Right now those are the +C and the C. With these plugins collectd can +provide information about issues and significant situations to the user. +Several loglevels let you suppress uninteresting messages. -The UDP port used has been checked to not be assigned by the IANA. +Starting with version C<4.3.0> collectd has support for B. This is +done by checking thresholds defined by the user. If a value is out of range, a +notification will be dispatched to "notification plugins". See +L for more detailed information about threshold checking. -On multi-homed machines you may need to add a route to the multicast net -(B<224.0.0.0/4>) if multicast packages take the wrong interface. The listener -on the other hand listens on B interfaces. +Please note that some plugins, that provide other means of communicating with +the daemon, have manpages of their own to describe their functionality in more +detail. In particular those are L, L, +L, L, and L -=head1 SPECIAL PLUGINS +=head1 SIGNALS -=head2 cpufreq +B accepts the following signals: -This module reads F (for -the first CPU installed) to get the current CPU frequency. If this file does -not exist make sure B (L) or a -similar tool is installed. - -=head2 mysql - -Requires B to be installed. It connects to the database when -started and keeps the connection up as long as possible. When the connection is -interrupted for whatever reason it will try to re-connect. The syslog will -contain loud complaints in case anything goes wrong. - -This plugin issues C and evaluates C, -C and C which correspond to F, -F and F. Also, the values of -C are put in F and values of C are put -in F. Please refer to the B, -I<5.2.4. Server Status Variables> for an explanation of these values. - -=head2 sensors +=over 4 -The B module uses lm_sensors to retrieve sensor-values. This means -that all the needed modules have to be loaded and lm_sensors has to be -configured (most likely by editing F. Read -L for details. +=item B, B -The B homepage can be found at -L. +These signals cause B to shut down all plugins and terminate. -=head2 hddtemp +=item B -To get values from B collectd connects to B (127.0.0.1), -port B<7634/tcp>. hddtemp has to be running to work correctly. If hddtemp is -not running timeouts may appear which may interfere with other statistics.. +This signal causes B to signal all plugins to flush data from +internal caches. E.Eg. the C will write all pending data +to the RRD files. This is the same as using the C command of the +C. -The B homepage can be found at -L. +=back =head1 SEE ALSO -L, L, L, L, -L +L, +L, +L, +L, +L, +L, +L, +L =head1 AUTHOR