DOKK / manpages / debian 12 / collectd-core / types.db.5.en
TYPES.DB(5) collectd TYPES.DB(5)

types.db - Data-set specifications for the system statistics collection daemon collectd

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

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.

  • ds-name is, by convention, a lower-case alphanumeric string. If the data set contains a single data source, it is called "value" by convention. Data source names must be unique within a data set.
  • ds-type may be DERIVE, GAUGE, or COUNTER. For historic reasons a type called ABSOLUTE is also supported, but its use is strongly discouraged, and it should not be used for new metric type definitions.
  • min and max define the range of valid values this data source. Either or both may be unbounded, which is specified by providing "U" instead of a number. For cumulative metric values, min and max apply to the value's rate, not the raw cumulative metric value.

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/.

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.

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

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

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

2023-02-20 5.12.0.git