From 41c1ed5a70defb9bfab6b1f6d346b151dd97fc71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Tue, 1 Jan 2019 21:08:51 +0100 Subject: [PATCH] apache: add Munin configuration for Apache server-status URL --- CHANGELOG.md | 3 ++- apache/tasks/server_status.yml | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11a80bc9..a534bed5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The **patch** part changes incrementally at each release. ## [Unreleased] ### Added +* apache: add Munin configuration for Apache server-status URL * evomaintenance: database variables must be set or the task fails * redis: Configure munin when working in instance mode * redis: add a variable to disable the restart handler @@ -22,7 +23,7 @@ The **patch** part changes incrementally at each release. ### Fixed * nginx: Munin url config is now a template to insert the server-status prefix * redis: In instance mode, ensure to replace the nrpe check_redis with the instance check script -* redis: Don't set the owner of /var/{lib,log}/redis to a redis instance account +* redis: Don't set the owner of /var/{lib,log}/redis to a redis instance account * nagios-nrpe: check_process now return the error code (making the check more usefull than /bin/true) ### Security diff --git a/apache/tasks/server_status.yml b/apache/tasks/server_status.yml index f9e1aed8..80dbe590 100644 --- a/apache/tasks/server_status.yml +++ b/apache/tasks/server_status.yml @@ -39,3 +39,17 @@ dest: /var/www/index.html regexp: '__SERVERSTATUS_SUFFIX__' replace: "{{ apache_serverstatus_suffix }}" + +- name: Munin configuration has a section for apache + lineinfile: + dest: /etc/munin/plugin-conf.d/munin-node + line: "[apache_*]" + create: no + +- name: apache-status URL is configured for Munin + lineinfile: + dest: /etc/munin/plugin-conf.d/munin-node + line: "env.url http://127.0.0.1/server-status-{{ apache_serverstatus_suffix }}?auto" + regexp: "env.url http://127.0.0.1/server-status" + insertafter: "[apache_*]" + create: no