types.db - Man Page

Data-set specifications for the system statistics collection daemon collectd

Synopsis

  bitrate    value:GAUGE:0:4294967295
  counter    value:COUNTER:U:U
  if_octets  rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295

Description

The types.db file contains collectd's metric type specifications. Each line describes one metric type, which is called “data set” in collectd. Each line consists of two or more fields delimited by spaces and/or horizontal tabs.

For example, the following defines two data sets, “bytes” and “total_bytes”.

  bytes        value:GAUGE:0:U
  total_bytes  value:DERIVE:0:U

The first field defines the name of the data set. By convention, data set names use lower-case alphanumeric characters and underscores (_) only. Also by convention, if a metric makes sense both as a cumulative metric (e.g. DERIVE) and a non-cumulative metric (i.e. GAUGE), the cumulative metric gets a total_ prefix. For example, bytes is a GAUGE and total_bytes is a DERIVE.

The second and each following field defines a named metric value, called “data source”.  New data sets with multiple data sources are strongly discouraged. Each field is a colon-separated tuple of the data source name, value type, minimum and maximum values: ds-name:ds-type:min:max.

Files

The location of the types.db file is defined by the TypesDB configuration option (see collectd.conf(5)). It defaults to collectd's shared data directory, i. e. prefix/share/collectd/.

Custom Types

If you want to specify custom types, you should do so by specifying a custom file in addition to the default one (see Files) above. You can do that by having multiple TypesDB statements in your configuration file or by specifying more than one file in one line.

For example:

 TypesDB "/opt/collectd/share/collectd/types.db"
 TypesDB "/opt/collectd/etc/types.db.custom"

Note: Make sure to make this file available on all systems if you're sending values over the network.

See Also

collectd(1), collectd.conf(5), rrdcreate(1)

Author

collectd has been written by Florian Forster <octo at collectd.org>.

This manpage has been written by Sebastian Harl <sh at tokkee.org>.

Referenced By

collectd(1), collectd.conf(5), collectdctl(1), collectd-exec(5), collectd-java(5), collectd-perl(5), collectd-python(5), collectd-snmp(5).

2020-09-03 5.12.0 collectd