Module: check_mk
Branch: master
Commit: cede101c08feafef766b4e3298fcf7acec7d3910
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cede101c08feaf…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 16 19:36:27 2013 +0100
FIX Fix semantics of columns num_services_hard_*
In the tables <tt>hosts</tt> and <tt>servicegroups</tt> the columns
<tt>num_services_hard_warn</tt>, <tt>num_services_hard_crit</tt> and
<tt>num_services_hard_unknown<tt> did not correctly reflect the
hard status but in most cases just the soft status - effectively
ignoring the <tt>_hard_</tt>. This has now been fixed.
---
.werks/344 | 14 ++++++++++++++
ChangeLog | 1 +
livestatus/src/ServicelistStateColumn.cc | 8 +++++---
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/.werks/344 b/.werks/344
new file mode 100644
index 0000000..36054cf
--- /dev/null
+++ b/.werks/344
@@ -0,0 +1,14 @@
+Title: Fix semantics of columns num_services_hard_*
+Level: 1
+Component: livestatus
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387218771
+Targetversion: future
+
+In the tables <tt>hosts</tt> and <tt>servicegroups</tt> the columns
+<tt>num_services_hard_warn</tt>, <tt>num_services_hard_crit</tt> and
+<tt>num_services_hard_unknown<tt> did not correctly reflect the
+hard status but in most cases just the soft status - effectively
+ignoring the <tt>_hard_</tt>. This has now been fixed.
diff --git a/ChangeLog b/ChangeLog
index fc739f0..f49b2a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -90,6 +90,7 @@
* 0337 New header for limiting the execution time of a query...
* 0335 FIX: Parse state of downtime notification log entries correctly...
* 0336 FIX: Limit the number of lines read from a single logfile...
+ * 0344 FIX: Fix semantics of columns num_services_hard_*...
1.2.3i7:
diff --git a/livestatus/src/ServicelistStateColumn.cc b/livestatus/src/ServicelistStateColumn.cc
index a4f9064..7565091 100644
--- a/livestatus/src/ServicelistStateColumn.cc
+++ b/livestatus/src/ServicelistStateColumn.cc
@@ -51,22 +51,24 @@ int32_t ServicelistStateColumn::getValue(int logictype, servicesmember *mem, Que
{
contact *auth_user = query->authUser();
int32_t result = 0;
+ int lt;
while (mem) {
service *svc = mem->service_ptr;
if (!auth_user || g_table_services->isAuthorized(auth_user, svc)) {
+ int lt = logictype;
int state;
int has_been_checked;
if (logictype >= 60) {
state = svc->last_hard_state;
- logictype -= 64;
+ lt -= 64;
}
else
state = svc->current_state;
has_been_checked = svc->has_been_checked;
- switch (logictype) {
+ switch (lt) {
case SLSC_WORST_STATE:
if (svcStateIsWorse(state, result))
result = state;
@@ -79,7 +81,7 @@ int32_t ServicelistStateColumn::getValue(int logictype, servicesmember *mem, Que
result++;
break;
default:
- if (has_been_checked && state == logictype)
+ if (has_been_checked && state == lt)
result++;
break;
}
Module: check_mk
Branch: master
Commit: 4ebf185ee1a1144f9df6dcf9e8d911351f439c0c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ebf185ee1a114…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 18:36:01 2013 +0100
FIX cups_queues: Fixed bug checking the last queue reported by agent
An exception occured when checking the last queue reported by the agent.
---
.werks/369 | 10 ++++++++++
ChangeLog | 1 +
checks/cups_queues | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/369 b/.werks/369
new file mode 100644
index 0000000..f382b2c
--- /dev/null
+++ b/.werks/369
@@ -0,0 +1,10 @@
+Title: cups_queues: Fixed bug checking the last queue reported by agent
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387215298
+Targetversion: future
+
+An exception occured when checking the last queue reported by the agent.
diff --git a/ChangeLog b/ChangeLog
index 7b7dc50..6fbc7e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* 0367 FIX: Now using /dev/null instead of closing stdin in linux agent...
* 0342 FIX: postgres_stat_database: make agent compatible with PostgreSQL 8.4.x...
* 0343 FIX: postgres_sessions: make agent plugin compatible with PostgreSQL 9.2...
+ * 0369 FIX: cups_queues: Fixed bug checking the last queue reported by agent...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/checks/cups_queues b/checks/cups_queues
index 3af5cb9..fa1a092 100644
--- a/checks/cups_queues
+++ b/checks/cups_queues
@@ -67,7 +67,7 @@ def check_cups_queues(item, params, info):
status = ' '.join(line[2:4])
# If the next line does not start with "printer" append it as additional output
- if not info[num+1][0] in [ 'printer', '---' ]:
+ if len(info) > num+1 and not info[num+1][0] in [ 'printer', '---' ]:
statusoutput += " (%s)" % " ".join(info[num+1])
if status == "disabled since":