r/collectd: Add custom types database

All values sent to *collectd* must have an associated type.  The type
defines the acceptable range of values.  Types are defined in a simple
text file database.  *collectd* loads all of the databases specified by
`TypesDB` directives in its configuration file.  When configuring a
custom types database, the default database needs to be specified
explicitly; it will not be loaded automatically if there are any
`TypesDB` directives in the configuration.
ntfy
Dustin 2021-10-30 16:47:29 -05:00
parent 32d1e0ff6f
commit 12c3fb950b
3 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,2 @@
TypesDB "/usr/share/collectd/types.db"
TypesDB "/etc/collectd/types.db.local"

View File

@ -0,0 +1 @@
version value:GAUGE:0:1

View File

@ -23,6 +23,33 @@
tags: tags:
- collectd-config - collectd-config
- name: ensure collectd directory exists
file:
path: /etc/collectd
mode: 'u=rwx,go=rx'
state: directory
tags:
- collectd-config
- collectd-typesdb
- name: ensure collectd local types.db exists
copy:
src: types.db.local
dest: /etc/collectd/
mode: 'u=rw,go=r'
notify: restart collectd
tags:
- collectd-config
- collectd-typesdb
- name: ensure collectd types.db is configured
copy:
src: collectd-typesdb.conf
dest: /etc/collectd.d/typesdb.conf
mode: 'u=rw,go=r'
notify: restart collectd
tags:
- collectd-config
- collectd-typesdb
- name: ensure collectd unixsock plugin is configured - name: ensure collectd unixsock plugin is configured
template: template:
src: collectd-unixsock.conf.j2 src: collectd-unixsock.conf.j2