From 3e08588d9898ad1ee1c43b6dd6c67bec6487d3a5 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 16 Oct 2021 16:25:02 -0500 Subject: [PATCH] collectd: Configure the processes plugin The *processes* plugin for collectd can be configured to monitor additional information about specific processes. By specifying one or more `Process` or `ProcessMatch` directives in the plugin configuration, collectd will start monitoring the listed processes in detail. The `collectd_processes` Ansible variable can contain a list of processes to monitor. Each item must at least have a `name` property, and may also have a `regex` property. If the latter is present, a `ProcessMatch` directive will be emitted instead of a `Process` directive. --- roles/collectd/tasks/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/collectd/tasks/main.yml b/roles/collectd/tasks/main.yml index 07c775f..e90d1ac 100644 --- a/roles/collectd/tasks/main.yml +++ b/roles/collectd/tasks/main.yml @@ -33,6 +33,16 @@ tags: - collectd-config - collectd-network +- name: ensure colelctd processes plugin is configured + template: + src: collectd-processes.conf.j2 + dest: /etc/collectd.d/processes.conf + mode: '0644' + notify: + - restart collectd + tags: + - collectd-config + - collectd-processes - name: ensure collectd starts at boot service: