TYPES.DB(5)

πŸ’– NAME πŸ’–

types.db(5) β€” 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 πŸ¦‹

Okay bestie, so the types.db file is where collectd keeps its metric type specifications. Every line describes exactly one metric type, which collectd calls a data set. Each line has two or more fields, and those fields are delimited by spaces and/or horizontal tabs.

For example, this defines two data sets: bytes and total_bytes.

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

The first field is 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 field and every following field define a named metric value, which is called a 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 β€” 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 for 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.

🌸 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 πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

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

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


okay that’s the whole tea 🫢 source/version 5.12.0.348.g93f9bdcb, date 2024-12-18 β€” bye bestie! πŸ’…βœ¨

πŸ“¦ where this page comes from