From ee0e6873addfa959d3b3608daaf333dca7192460 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Thu, 21 Jul 2022 13:13:13 -0500 Subject: [PATCH] r/collectd-sensors: Install collectd sensors plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The *sensors* plugin for collectd reads temperature information from the I²C/SMBus using *lm_sensors*. Naturally, it is only useful on physical machines, so it is not installed or enabled by default. --- collectd.yml | 7 +++++++ hosts | 2 ++ hosts.offline | 4 ++++ roles/collectd-sensors/tasks/main.yml | 8 ++++++++ 4 files changed, 21 insertions(+) create mode 100644 roles/collectd-sensors/tasks/main.yml diff --git a/collectd.yml b/collectd.yml index 102a389..da3b79d 100644 --- a/collectd.yml +++ b/collectd.yml @@ -7,6 +7,13 @@ tags: - collectd-version +- hosts: collectd-sensors + roles: + - role: collectd-sensors + tags: + - collectd + - collectd-sensors + - hosts: collectd-prometheus roles: - role: collectd-prometheus diff --git a/hosts b/hosts index aee3590..34acc47 100644 --- a/hosts +++ b/hosts @@ -24,6 +24,8 @@ pyrocufflink [collectd-prometheus:children] collectd +[collectd-sensors] + [dch-proxy] [dch-vpn] diff --git a/hosts.offline b/hosts.offline index e511c2a..babec26 100644 --- a/hosts.offline +++ b/hosts.offline @@ -7,6 +7,10 @@ pyrocufflink [collectd-prometheus:children] collectd +[collectd-sensors] +vmhost0.pyrocufflink.blue +vmhost1.pyrocufflink.blue + [dhcpcd:children] vm-hosts diff --git a/roles/collectd-sensors/tasks/main.yml b/roles/collectd-sensors/tasks/main.yml new file mode 100644 index 0000000..abb3d24 --- /dev/null +++ b/roles/collectd-sensors/tasks/main.yml @@ -0,0 +1,8 @@ +- name: ensure collectd-sensors is installed + package: + name: collectd-sensors + state: present + tags: + - install + notify: + - restart collectd