Module: check_mk
Branch: master
Commit: 3a774214a7107074e7680607163351b0716b4615
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3a774214a71070…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Jul 14 12:20:43 2015 +0200
#2404 FIX apache_status: now able to handle BusyServers and IdleServers
The check crashed when the apache_status plugin reported the fields
BusyServer or IdleServers.
---
.werks/2404 | 11 +++++++++++
ChangeLog | 1 +
checks/apache_status | 2 ++
web/plugins/metrics/check_mk.py | 22 ++++++++++++++++++++++
4 files changed, 36 insertions(+)
diff --git a/.werks/2404 b/.werks/2404
new file mode 100644
index 0000000..719be07
--- /dev/null
+++ b/.werks/2404
@@ -0,0 +1,11 @@
+Title: apache_status: now able to handle BusyServers and IdleServers
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1436869147
+Class: fix
+
+The check crashed when the apache_status plugin reported the fields
+BusyServer or IdleServers.
+
diff --git a/ChangeLog b/ChangeLog
index bf957d6..776df4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,6 +49,7 @@
* 1271 FIX: omd_apache: Fixed handling of urls with whitespace
* 2402 FIX: netapp_api_disk: fixed broken WATO and check configuration...
* 2403 FIX: ibm_imm_fan: fixed exception with invalid formatted fan speed
information...
+ * 2404 FIX: apache_status: now able to handle BusyServers and IdleServers...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/apache_status b/checks/apache_status
index de4c4e5..344a5d9 100644
--- a/checks/apache_status
+++ b/checks/apache_status
@@ -53,6 +53,8 @@ _apache_status_fields = {
'ConnsAsyncWriting': (17, int),
'ConnsAsyncKeepAlive': (18, int),
'ConnsAsyncClosing': (19, int),
+ 'BusyServers': (20, int),
+ 'IdleServers': (21, int),
}
_apache_status_stats = {
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 2012840..2df546f 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -1082,6 +1082,18 @@ metric_info["idle_workers"] = {
"color" : "43/b",
}
+metric_info["busy_servers"] = {
+ "title" : _("Busy servers"),
+ "unit" : "count",
+ "color" : "#a080b0",
+}
+
+metric_info["idle_servers"] = {
+ "title" : _("Idle servers"),
+ "unit" : "count",
+ "color" : "43/b",
+}
+
metric_info["open_slots"] = {
"title" : _("Open slots"),
"unit" : "count",
@@ -2934,6 +2946,8 @@ check_metrics["check_mk-apache_status"] = {
"Uptime" : { "name" : "uptime" },
"IdleWorkers" : { "name" : "idle_workers" },
"BusyWorkers" : { "name" : "busy_workers" },
+ "IdleServers" : { "name" : "idle_servers" },
+ "BusyServers" : { "name" : "busy_servers" },
"OpenSlots" : { "name" : "open_slots" },
"TotalSlots" : { "name" : "total_slots" },
"CPULoad" : { "name" : "load1" },
@@ -4074,6 +4088,14 @@ graph_info.append({
})
graph_info.append({
+ "title" : _("Busy and idle servers"),
+ "metrics" : [
+ ( "busy_servers", "area" ),
+ ( "idle_servers", "stack" ),
+ ],
+})
+
+graph_info.append({
"title" : _("Total and open slots"),
"metrics" : [
( "total_slots", "area" ),