From 3d41e2b3cada00ff9a13ed2f6d959f74db8c1324 Mon Sep 17 00:00:00 2001 From: luhellma Date: Fri, 20 Mar 2020 15:08:13 +0100 Subject: [PATCH 1/2] Add rules for apache --- _data/rules.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/_data/rules.yml b/_data/rules.yml index 812c630..664efc2 100644 --- a/_data/rules.yml +++ b/_data/rules.yml @@ -742,6 +742,18 @@ groups: - name: Lusitaniae/apache_exporter doc_url: https://github.com/Lusitaniae/apache_exporter rules: + - name: Apache down + description: Apache down + query: 'apache_up = 0' + severity: error + - name: Apache workers load + description: Apache workers in busy state approach the max workers count 80% workers busy on {{ $labels.instance }} + query: '(sum by (instance) (apache_workers{state="busy"}) / sum by (instance) (apache_scoreboard) ) * 100 > 80' + severity: error + - name: Apache restart + description: Apache has just been restarted, less than one minute ago. + query: 'apache_uptime_seconds_total / 60 < 1' + severity: warning - name: HaProxy exporters: From a4fc086b9aedbf2a6905e8961159a7e832918896 Mon Sep 17 00:00:00 2001 From: luhellma Date: Fri, 20 Mar 2020 15:22:20 +0100 Subject: [PATCH 2/2] fix wrong number of equal sign in query --- _data/rules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_data/rules.yml b/_data/rules.yml index 664efc2..38dae95 100644 --- a/_data/rules.yml +++ b/_data/rules.yml @@ -744,7 +744,7 @@ groups: rules: - name: Apache down description: Apache down - query: 'apache_up = 0' + query: 'apache_up == 0' severity: error - name: Apache workers load description: Apache workers in busy state approach the max workers count 80% workers busy on {{ $labels.instance }}