-=item Data-Set
-
-A data-set is a list of one or more data-sources. Each data-source defines a
-name, type, min- and max-value and the data-set wraps them up into one
-structure. The general layout looks like this:
-
- [{
- name => 'data_source_name',
- type => DS_TYPE_COUNTER || DS_TYPE_GAUGE
- min => value || undef,
- max => value || undef
- }, ...]
-
-=item Value-List
-
-A value-list is one structure which features an array of values and fields to
-identify the values, i. e. time and host, plugin name and plugin-instance as
-well as a type and type-instance. Since the "type" is not included in the
-value-list but is passed as an extra argument, the general layout looks like
-this:
-
- {
- values => [123, 0.5],
- time => time (),
- host => 'localhost',
- plugin => 'myplugin',
- plugin_instance => '',
- type_instance => ''
- }
-
-=back
-
-The following functions provide the C-interface to Perl-modules:
-
-=over 4
-
-=item B<plugin_register> (I<type>, I<name>, I<data>)
-
-Registers a callback-function or data-set.
-
-I<type> can be one of:
-
-=over 4
-
-=item TYPE_INIT
-
-=item TYPE_READ
-
-=item TYPE_WRITE
-
-=item TYPE_LOG
-
-=item TYPE_SHUTDOWN
-
-=item TYPE_DATASET
-
-=back
-
-I<name> is the name of the callback-function or the type of the data-set,
-depending on the value of I<type>. (Please note that the type of the data-set
-is the value passed as I<name> here and has nothing to do with the I<type>
-argument which simply tells B<plugin_register> what is being registered.)
-
-The last argument, I<data>, is either a function- or an array-reference. If
-I<type> is B<TYPE_DATASET>, then the I<data> argument must be an
-array-reference which points to an array of hashes. Each hash describes one
-data-source. For the exact layout see B<Data-Set> above.
-
-If the I<type> argument is any of the other types (B<TYPE_INIT>, B<TYPE_READ>,
-...) when I<data> is expected to be a funtion reference. These functions are
-called in the various stages of the daemon and are passed the following
-arguments:
-
-=over 4
-
-=item TYPE_INIT
-
-=item TYPE_READ
-
-=item TYPE_SHUTDOWN
-
-No arguments are passed
-
-=item TYPE_WRITE
-
-The arguments passed are I<type>, I<data-set>, and I<value-list>. I<type> is a
-string. For the layout of I<data-set> and I<value-list> see above.
-
-=item TYPE_LOG
-
-The arguments are I<log-level> and I<message>. The log level is small for
-important messages and high for less important messages. The least important
-level is B<LOG_DEBUG>, the most important level is B<LOG_ERR>. In between there
-are (from least to most important): B<LOG_INFO>, B<LOG_NOTICE>, and
-B<LOG_WARNING>. I<message> is simply a string B<without> a newline at the end.
-
-=back
-
-=item B<plugin_unregister> (I<type>, I<plugin>)
-
-Removes a callback or data-set from collectd's internal list of
-functionsE<nbsp>/ datasets.
-
-=item B<plugin_dispatch_values> (I<type>, I<value-list>)
-
-Submits a I<value-list> of type I<type> to the daemon. If the data-set I<type>
-is found (and the number of values matches the number of data-sources) then the
-type, data-set and value-list is passed to all write-callbacks that are
-registered with the daemon.
-
-=item B<plugin_log> (I<log-level>, I<message>)
-
-TODO.
-
-=back
-
-=head2 sensors
-
-The B<sensors> 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</etc/sensors.conf>. Read
-L<sensors.conf(5)> for details.
-
-The B<lm_sensors> homepage can be found at
-L<http://secure.netroedge.com/~lm78/>.
-
-=head2 mbmon
-
-The B<mbmon> module uses mbmon to retrieve temperature, voltage, etc.
-
-collectd connects to B<localhost> (127.0.0.1), port B<411/tcp>.
-The B<Host> and B<Port> options can be used to change these
-default values. See L<collectd.conf(5)> for details. C<mbmon> has to be
-running to work correctly. If C<mbmon> is not running timeouts may appear
-which may interfere with other statistics..
-
-C<mbmon> must be run with the -r option ("print TAG and Value format");
-Debian's /etc/init.d/mbmon script already does this, other people
-will need to ensure that this is the case.
-
-=head2 hddtemp
-
-To get values from B<hddtemp> collectd connects to B<localhost> (127.0.0.1),
-port B<7634/tcp>. The B<Host> and B<Port> options can be used to change these
-default values. See L<collectd.conf(5)> for details. C<hddtemp> has to be
-running to work correctly. If C<hddtemp> is not running timeouts may appear
-which may interfere with other statistics..
-
-The B<hddtemp> homepage can be found at
-L<http://www.guzu.net/linux/hddtemp.php>.
-
-=head2 vserver
-
-B<VServer> support is only available for Linux. It cannot yet be found in a
-vanilla kernel, though. To make use of this plugin you need a kernel that has
-B<VServer> support built in, i.e. you need to apply the patches and compile
-your own kernel, which will then provide the /proc/virtual filesystem that is
-required by this plugin.
-
-The B<VServer> homepage can be found at L<http://linux-vserver.org/>.
-
-=head1 RRD FILES
-
-The RRD files are created automatically. The size of the RRAs depend on the
-compile time settings of I<step> and I<width>. With the default values (I<step>
-= B<10>, I<width> = B<1200>) the following RRAs are created:
-
- RRA:AVERAGE:0.1:1:8640
- RRA:AVERAGE:0.1:50:1210
- RRA:AVERAGE:0.1:223:1202
- RRA:AVERAGE:0.1:2635:1201
- RRA:MIN:0.1:1:8640
- RRA:MIN:0.1:50:1210
- RRA:MIN:0.1:223:1202
- RRA:MIN:0.1:2635:1201
- RRA:MAX:0.1:1:8640
- RRA:MAX:0.1:50:1210
- RRA:MAX:0.1:223:1202
- RRA:MAX:0.1:2635:1201
-
-By default collectd uses a 10 second I<step>. Thus the RRAs contain the
-following timespans. If you've changed the I<step> at compile time you will
-have calculate resolution and timespan yourself.
-
- PDP per CDP | Resolution | Data points | Timespan
- ------------+--------------+-------------+---------
- 1 | 10.0 seconds ! 8640 ! 1 day
- 50 | 8.3 minutes | 1210 | 1 week
- 223 | 37.2 minutes | 1202 | 1 month
- 2635 | 7.3 hours | 1201 | 1 year
-
-The DS'es depend on the module creating the RRD files:
-
-=over 4
-
-=item Apache traffic (F<apache/apache_bytes.rrd>)
-
- DS:count:COUNTER:HEARTBEAT:0:134217728
-
-=item Apache requests (F<apache/apache_requests.rrd>)
-
- DS:count:COUNTER:HEARTBEAT:0:1048576
-
-=item Apache scoreboard (F<apache/apache_scoreboard-I<E<lt>nameE<gt>>.rrd>)
-
- DS:count:GAUGE:HEARTBEAT:0:U
-
-=item Apple temperature sensor (F<apple_sensors/temperature-I<E<lt>nameE<gt>>.rrd>)
-
- DS:value:GAUGE:HEARTBEAT:U:U
-
-=item Apple fanspeed sensor (F<apple_sensors/fanspeed-I<E<lt>nameE<gt>>.rrd>)
-
- DS:value:GAUGE:HEARTBEAT:U:U
-
-=item Battery charge (F<battery-I<E<lt>nameE<gt>>/charge.rrd>)
-
- DS:charge:GAUGE:HEARTBEAT:0:U
-
-=item Battery current (F<battery-I<E<lt>nameE<gt>>/current.rrd>)
-
- DS:current:GAUGE:HEARTBEAT:U:U
-
-=item Battery voltage (F<battery-I<E<lt>nameE<gt>>/voltage.rrd>)
-
- DS:voltage:GAUGE:HEARTBEAT:U:U
-
-=item CPU (F<cpu-I<E<lt>numE<gt>>.rrd>)
-
- DS:user:COUNTER:HEARTBEAT:0:100
- DS:nice:COUNTER:HEARTBEAT:0:100
- DS:syst:COUNTER:HEARTBEAT:0:100
- DS:idle:COUNTER:HEARTBEAT:0:100
- DS:wait:COUNTER:HEARTBEAT:0:100
-
-=item CPU frequency (F<cpufreq-I<E<lt>numE<gt>>.rrd>)
-
- DS:value:GAUGE:HEARTBEAT:0:U
-
-=item Mountpoints (F<df-I<E<lt>pathE<gt>>.rrd>)
-
- DS:used:GAUGE:HEARTBEAT:0:U
- DS:free:GAUGE:HEARTBEAT:0:U
-
-=item Diskstats (F<disk-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
-
- DS:rcount:COUNTER:HEARTBEAT:0:U
- DS:rmerged:COUNTER:HEARTBEAT:0:U
- DS:rbytes:COUNTER:HEARTBEAT:0:U
- DS:rtime:COUNTER:HEARTBEAT:0:U
- DS:wcount:COUNTER:HEARTBEAT:0:U
- DS:wmerged:COUNTER:HEARTBEAT:0:U
- DS:wbytes:COUNTER:HEARTBEAT:0:U
- DS:wtime:COUNTER:HEARTBEAT:0:U
-
-=item Diskstats (F<partition-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
-
- DS:rcount:COUNTER:HEARTBEAT:0:U
- DS:rbytes:COUNTER:HEARTBEAT:0:U
- DS:wcount:COUNTER:HEARTBEAT:0:U
- DS:wbytes:COUNTER:HEARTBEAT:0:U
-
-=item E-Mail count (F<email/email-I<E<lt>typeE<gt>>.rrd>)
-
- DS:count:GAUGE:HEARTBEAT:0:U
-
-=item E-Mail size (F<email/email_size-I<E<lt>typeE<gt>>.rrd>)
-
- DS:size:GAUGE:HEARTBEAT:0:U
-
-=item HDD Temperature (F<hddtemp-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
-
- DS:value:GAUGE:HEARTBEAT:U:U
-
-=item Irq (F<irq-I<E<lt>irqnumberE<gt>>.rrd>)
-
- DS:value:COUNTER:HEARTBEAT:0:65535
-
-=item System load (F<load.rrd>)
-
- DS:shortterm:GAUGE:HEARTBEAT:0:100
- DS:midterm:GAUGE:HEARTBEAT:0:100
- DS:longterm:GAUGE:HEARTBEAT:0:100
-
-=item Memory usage (F<memory.rrd>)
-
- DS:used:GAUGE:HEARTBEAT:0:9223372036854775807
- DS:free:GAUGE:HEARTBEAT:0:9223372036854775807
- DS:buffers:GAUGE:HEARTBEAT:0:9223372036854775807
- DS:cached:GAUGE:HEARTBEAT:0:9223372036854775807
-
-=item MySQL commands and handlers (F<mysql_commands-I<E<lt>commandE<gt>>.rrd> and F<mysql_handler-I<E<lt>handlerE<gt>>.rrd>)
-
- DS:value:COUNTER:HEARTBEAT:0:U
-
-=item MySQL query cache (F<mysql_qcache.rrd>)
-
- DS:hits:COUNTER:HEARTBEAT:0:U
- DS:inserts:COUNTER:HEARTBEAT:0:U
- DS:not_cached:COUNTER:HEARTBEAT:0:U
- DS:lowmem_prunes:COUNTER:HEARTBEAT:0:U
- DS:queries_in_cache:GAUGE:HEARTBEAT:0:U
-
-=item MySQL threads (F<mysql_threads.rrd>)
-
- DS:running:GAUGE:HEARTBEAT:0:U
- DS:connected:GAUGE:HEARTBEAT:0:U
- DS:cached:GAUGE:HEARTBEAT:0:U
- DS:created:COUNTER:HEARTBEAT:0:U
-
-=item NFSv2 Procedures (F<nfs2_procedures-I<(client|server)>.rrd>)
-
- DS:null:COUNTER:HEARTBEAT:0:U
- DS:getattr:COUNTER:HEARTBEAT:0:U
- DS:setattr:COUNTER:HEARTBEAT:0:U
- DS:root:COUNTER:HEARTBEAT:0:U
- DS:lookup:COUNTER:HEARTBEAT:0:U
- DS:readlink:COUNTER:HEARTBEAT:0:U
- DS:read:COUNTER:HEARTBEAT:0:U
- DS:wrcache:COUNTER:HEARTBEAT:0:U
- DS:write:COUNTER:HEARTBEAT:0:U
- DS:create:COUNTER:HEARTBEAT:0:U
- DS:remove:COUNTER:HEARTBEAT:0:U
- DS:rename:COUNTER:HEARTBEAT:0:U
- DS:link:COUNTER:HEARTBEAT:0:U
- DS:symlink:COUNTER:HEARTBEAT:0:U
- DS:mkdir:COUNTER:HEARTBEAT:0:U
- DS:rmdir:COUNTER:HEARTBEAT:0:U
- DS:readdir:COUNTER:HEARTBEAT:0:U
- DS:fsstat:COUNTER:HEARTBEAT:0:U
-
-=item NFSv3 Procedures (F<nfs3_procedures-I<(client|server)>.rrd>)
-
- DS:null:COUNTER:HEARTBEAT:0:U
- DS:getattr:COUNTER:HEARTBEAT:0:U
- DS:setattr:COUNTER:HEARTBEAT:0:U
- DS:lookup:COUNTER:HEARTBEAT:0:U
- DS:access:COUNTER:HEARTBEAT:0:U
- DS:readlink:COUNTER:HEARTBEAT:0:U
- DS:read:COUNTER:HEARTBEAT:0:U
- DS:write:COUNTER:HEARTBEAT:0:U
- DS:create:COUNTER:HEARTBEAT:0:U
- DS:mkdir:COUNTER:HEARTBEAT:0:U
- DS:symlink:COUNTER:HEARTBEAT:0:U
- DS:mknod:COUNTER:HEARTBEAT:0:U
- DS:remove:COUNTER:HEARTBEAT:0:U
- DS:rmdir:COUNTER:HEARTBEAT:0:U
- DS:rename:COUNTER:HEARTBEAT:0:U
- DS:link:COUNTER:HEARTBEAT:0:U
- DS:readdir:COUNTER:HEARTBEAT:0:U
- DS:readdirplus:COUNTER:HEARTBEAT:0:U
- DS:fsstat:COUNTER:HEARTBEAT:0:U
- DS:fsinfo:COUNTER:HEARTBEAT:0:U
- DS:pathconf:COUNTER:HEARTBEAT:0:U
- DS:commit:COUNTER:HEARTBEAT:0:U
-
-=item Network latency / Ping (F<ping-I<E<lt>hostnameE<gt>>.rrd>)
-
- DS:ping:GAUGE:HEARTBEAT:0:65535
-
-=item Processes (F<processes.rrd>)
-
- DS:running:GAUGE:HEARTBEAT:0:65535
- DS:sleeping:GAUGE:HEARTBEAT:0:65535
- DS:zombies:GAUGE:HEARTBEAT:0:65535
- DS:stopped:GAUGE:HEARTBEAT:0:65535
- DS:paging:GAUGE:HEARTBEAT:0:65535
- DS:blocked:GAUGE:HEARTBEAT:0:65535
-
-=item lm_sensors fanspeed sensor (F<sensors-I<E<lt>instE<gt>>.rrd> or F<lm_sensors-I<E<lt>chipE<gt>>/fanspeed-I<E<lt>instE<gt>>.rrd>)
-
- DS:value:GAUGE:HEARTBEAT:U:U
-
-=item lm_sensors temperature sensor (F<sensors-I<E<lt>instE<gt>>.rrd> or F<lm_sensors-I<E<lt>chipE<gt>>/temperature-I<E<lt>instE<gt>>.rrd>)
-
- DS:value:GAUGE:HEARTBEAT:U:U
-
-=item lm_sensors voltage sensor (F<sensors-I<E<lt>instE<gt>>.rrd> or F<lm_sensors-I<E<lt>chipE<gt>>/voltage-I<E<lt>instE<gt>>.rrd>)
-
- DS:voltage:GAUGE:HEARTBEAT:U:U
-
-=item Serial port traffic (F<serial-I<E<lt>numE<gt>>.rrd>)
-
- DS:incoming:COUNTER:HEARTBEAT:0:U
- DS:outgoing:COUNTER:HEARTBEAT:0:U
-
-=item Spam score (F<email/spam_score.rrd>)
-
- DS:score:GAUGE:HEARTBEAT:0:U
-
-=item Spam checks (F<email/spam_check-I<E<lt>typeE<gt>>.rrd>)
-
- DS:hits:GAUGE:HEARTBEAT:0:U
-
-=item Swap usage (F<swap.rrd>)
-
- DS:used:GAUGE:HEARTBEAT:0:1099511627776
- DS:free:GAUGE:HEARTBEAT:0:1099511627776
- DS:cached:GAUGE:HEARTBEAT:0:1099511627776
- DS:resv:GAUGE:HEARTBEAT:0:1099511627776
-
-=item Tape drive usage (F<tape-I<E<lt>nameE<gt>>.rrd>)
-
- DS:rcount:COUNTER:HEARTBEAT:0:
- DS:rmerged:COUNTER:HEARTBEAT:0:U
- DS:rbytes:COUNTER:HEARTBEAT:0:U
- DS:rtime:COUNTER:HEARTBEAT:0:U
- DS:wcount:COUNTER:HEARTBEAT:0:U
- DS:wmerged:COUNTER:HEARTBEAT:0:U
- DS:wbytes:COUNTER:HEARTBEAT:0:U
- DS:wtime:COUNTER:HEARTBEAT:0:U
-
-=item Network traffic (F<traffic-I<E<lt>interfaceE<gt>>.rrd>)
-
- DS:incoming:COUNTER:HEARTBEAT:0:U
- DS:outgoing:COUNTER:HEARTBEAT:0:U
-
-=item Interface packets (F<if_packets-I<E<lt>interfaceE<gt>>.rrd>)
-
- DS:rx:COUNTER:HEARTBEAT:0:U
- DS:tx:COUNTER:HEARTBEAT:0:U
-
-=item Interface errors (F<if_errors-I<E<lt>interfaceE<gt>>.rrd>)
-
- DS:rx:COUNTER:HEARTBEAT:0:U
- DS:tx:COUNTER:HEARTBEAT:0:U
-
-=item Users (F<users.rrd>)
-
- DS:users:GAUGE:HEARTBEAT:0:65535
-
-=item VServer load (F<vserver-I<E<lt>xidE<gt>>/load.rrd>)
-
- DS:shortterm:GAUGE:HEARTBEAT:0:100
- DS:midterm:GAUGE:HEARTBEAT:0:100
- DS:longterm:GAUGE:HEARTBEAT:0:100
-
-=item VServer threads (F<vserver-I<E<lt>xidE<gt>>/threads.rrd>)
-
- DS:total:GAUGE:HEARTBEAT:0:65535
- DS:running:GAUGE:HEARTBEAT:0:65535
- DS:uninterruptible:GAUGE:HEARTBEAT:0:65535
- DS:onhold:GAUGE:HEARTBEAT:0:65535
-
-=item VServer network traffic (F<vserver-I<E<lt>xidE<gt>>/traffic-I<E<lt>nameE<gt>>.rrd>)
-
- DS:incoming:COUNTER:HEARTBEAT:0:9223372036854775807
- DS:outgoing:COUNTER:HEARTBEAT:0:9223372036854775807
- DS:failed:COUNTER:HEARTBEAT:0:9223372036854775807
-
-=item VServer processes (F<vserver-I<E<lt>xidE<gt>>/vs_processes.rrd>)
-
- DS:total:GAUGE:HEARTBEAT:0:65535
-
-=item VServer memory usage (F<vserver-I<E<lt>xidE<gt>>/vs_memory.rrd>)