| 1 |
=encoding UTF-8 |
| 2 |
|
| 3 |
=head1 NAME |
| 4 |
|
| 5 |
types.db - Data-set specifications for the system statistics collection daemon |
| 6 |
B<collectd> |
| 7 |
|
| 8 |
=head1 SYNOPSIS |
| 9 |
|
| 10 |
bitrate value:GAUGE:0:4294967295 |
| 11 |
counter value:COUNTER:U:U |
| 12 |
if_octets rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295 |
| 13 |
|
| 14 |
=head1 DESCRIPTION |
| 15 |
|
| 16 |
The C<types.db> file contains collectd's metric type specifications. Each line |
| 17 |
describes one metric type, which is called "data set" in collectd. Each line |
| 18 |
consists of two or more fields delimited by spaces and/or horizontal tabs. |
| 19 |
|
| 20 |
For example, the following defines two data sets, "bytes" and "total_bytes". |
| 21 |
|
| 22 |
bytes value:GAUGE:0:U |
| 23 |
total_bytes value:DERIVE:0:U |
| 24 |
|
| 25 |
The first field defines the name of the data set. By convention, data set names |
| 26 |
use lower-case alphanumeric characters and underscores (C<_>) only. Also by |
| 27 |
convention, if a metric makes sense both as a cumulative metric (e.g. |
| 28 |
C<DERIVE>) I<and> a non-cumulative metric (i.e. C<GAUGE>), the cumulative |
| 29 |
metric gets a C<total_> prefix. For example, C<bytes> is a C<GAUGE> and |
| 30 |
C<total_bytes> is a C<DERIVE>. |
| 31 |
|
| 32 |
The second and each following field defines a named metric value, called "data |
| 33 |
source". New data sets with multiple data sources are strongly discouraged. |
| 34 |
Each field is a colon-separated tuple of the data source name, value type, |
| 35 |
minimum and maximum values: I<ds-name>B<:>I<ds-type>B<:>I<min>B<:>I<max>. |
| 36 |
|
| 37 |
=over 4 |
| 38 |
|
| 39 |
=item |
| 40 |
|
| 41 |
I<ds-name> is, by convention, a lower-case alphanumeric string. If the data set |
| 42 |
contains a single data source, it is called "value" by convention. Data source |
| 43 |
names must be unique within a data set. |
| 44 |
|
| 45 |
=item |
| 46 |
|
| 47 |
I<ds-type> may be B<DERIVE>, B<GAUGE>, or B<COUNTER>. For historic reasons a |
| 48 |
type called B<ABSOLUTE> is also supported, but its use is strongly discouraged, |
| 49 |
and it should not be used for new metric type definitions. |
| 50 |
|
| 51 |
=item |
| 52 |
|
| 53 |
I<min> and I<max> define the range of valid values this data source. Either or |
| 54 |
both may be unbounded, which is specified by providing C<U> instead of a |
| 55 |
number. For cumulative metric values, I<min> and I<max> apply to the value's |
| 56 |
rate, not the raw cumulative metric value. |
| 57 |
|
| 58 |
=back |
| 59 |
|
| 60 |
=head1 FILES |
| 61 |
|
| 62 |
The location of the types.db file is defined by the B<TypesDB> configuration |
| 63 |
option (see L<collectd.conf(5)>). It defaults to collectd's shared data |
| 64 |
directory, i.E<nbsp>e. F<I<prefix>/share/collectd/>. |
| 65 |
|
| 66 |
=head1 CUSTOM TYPES |
| 67 |
|
| 68 |
If you want to specify custom types, you should do so by specifying a custom |
| 69 |
file in addition to the default one (see L<FILES>) above. You can do that by |
| 70 |
having multiple B<TypesDB> statements in your configuration file or by |
| 71 |
specifying more than one file in one line. |
| 72 |
|
| 73 |
For example: |
| 74 |
|
| 75 |
TypesDB "/opt/collectd/share/collectd/types.db" |
| 76 |
TypesDB "/opt/collectd/etc/types.db.custom" |
| 77 |
|
| 78 |
B<Note>: Make sure to make this file available on all systems if you're |
| 79 |
sending values over the network. |
| 80 |
|
| 81 |
=head1 SEE ALSO |
| 82 |
|
| 83 |
L<collectd(1)>, |
| 84 |
L<collectd.conf(5)>, |
| 85 |
L<rrdcreate(1)> |
| 86 |
|
| 87 |
=head1 AUTHOR |
| 88 |
|
| 89 |
B<collectd> has been written by Florian Forster |
| 90 |
E<lt>octoE<nbsp>atE<nbsp>collectd.orgE<gt>. |
| 91 |
|
| 92 |
This manpage has been written by Sebastian Harl |
| 93 |
E<lt>shE<nbsp>atE<nbsp>tokkee.orgE<gt>. |
| 94 |
|
| 95 |
=cut |
| 96 |
|