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.
This commit is contained in:
2
roles/collectd/files/collectd-typesdb.conf
Normal file
2
roles/collectd/files/collectd-typesdb.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
TypesDB "/usr/share/collectd/types.db"
|
||||||
|
TypesDB "/etc/collectd/types.db.local"
|
||||||
1
roles/collectd/files/types.db.local
Normal file
1
roles/collectd/files/types.db.local
Normal file
@@ -0,0 +1 @@
|
|||||||
|
version value:GAUGE:0:1
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user