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":
Module: check_mk
Branch: master
Commit: 949c412f0e0e57dd7e1114d3ef8c750c7d20707a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=949c412f0e0e57…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 18:07:32 2013 +0100
FIX Generating selection id is hopefully now compatible to more systems
The default mechanism to get a selection id is to generate a UUID by reading
the contents of the file /proc/sys/kernel/random/uuid. This might be not
existing on some special systems. So we use the uuid python module as
fallback now.
---
.werks/368 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/lib.py | 9 ++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/.werks/368 b/.werks/368
new file mode 100644
index 0000000..6232a98
--- /dev/null
+++ b/.werks/368
@@ -0,0 +1,11 @@
+Title: Generating selection id is hopefully now compatible to more systems
+Level: 1
+Component: multisite
+Version: 1.2.5i1
+Date: 1387213529
+Class: fix
+
+The default mechanism to get a selection id is to generate a UUID by reading
+the contents of the file /proc/sys/kernel/random/uuid. This might be not
+existing on some special systems. So we use the uuid python module as
+fallback now.
diff --git a/ChangeLog b/ChangeLog
index 3d34acb..840ead5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,7 @@
* 0327 FIX: Most forms did now work with "Profile Requests" enabled...
* 0333 FIX: Fixed too long page title during performing several actions...
* 0356 FIX: Fixed exception caused by utf8 chars in tooltip text...
+ * 0368 FIX: Generating selection id is hopefully now compatible to more systems...
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/web/htdocs/lib.py b/web/htdocs/lib.py
index ca826af..f219dc2 100644
--- a/web/htdocs/lib.py
+++ b/web/htdocs/lib.py
@@ -126,7 +126,14 @@ def savefloat(f):
# Generates a unique id
def gen_id():
- return file('/proc/sys/kernel/random/uuid').read().strip()
+ try:
+ return file('/proc/sys/kernel/random/uuid').read().strip()
+ except IOError:
+ # On platforms where the above file does not exist we try to
+ # use the python uuid module which seems to be a good fallback
+ # for those systems. Well, if got python < 2.5 you are lost for now.
+ import uuid
+ return str(uuid.uuid4())
# Load all files below share/check_mk/web/plugins/WHAT into a
# specified context (global variables). Also honors the
Module: check_mk
Branch: master
Commit: 345875e41f33398f722badb35dc1e80d8876110c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=345875e41f3339…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 16 17:49:23 2013 +0100
FIX postgres_stat_database: make agent compatible with PostgreSQL 8.4.x
The SQL query that was used in the agent plugin <tt>mk_postgres</tt>
was not compatible with PostgreSQL 8.4.x, because there is not column
<tt>conflicts</tt>. This column is not used by the check anyway, so it has
been removed (thanks to Alexander Keller).
---
.werks/342 | 13 +++++++++++++
ChangeLog | 1 +
agents/plugins/mk_postgres | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/342 b/.werks/342
new file mode 100644
index 0000000..e3416cf
--- /dev/null
+++ b/.werks/342
@@ -0,0 +1,13 @@
+Title: postgres_stat_database: make agent compatible with PostgreSQL 8.4.x
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387212475
+Targetversion: future
+
+The SQL query that was used in the agent plugin <tt>mk_postgres</tt>
+was not compatible with PostgreSQL 8.4.x, because there is not column
+<tt>conflicts</tt>. This column is not used by the check anyway, so it has
+been removed (thanks to Alexander Keller).
diff --git a/ChangeLog b/ChangeLog
index 3d34acb..7edd337 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
* 0365 FIX: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package...
* 0366 FIX: heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9...
* 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...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/agents/plugins/mk_postgres b/agents/plugins/mk_postgres
index a041a9c..97e1865 100755
--- a/agents/plugins/mk_postgres
+++ b/agents/plugins/mk_postgres
@@ -13,5 +13,5 @@ echo '<<<postgres_sessions>>>'
echo "select current_query = '<IDLE>', count(*) from pg_stat_activity group by (current_query = '<IDLE>');" | su - $USER -c "psql -d postgres -A -t -F' '"
echo '<<<postgres_stat_database:sep(59)>>>'
-echo 'select datid, datname, numbackends, xact_commit, xact_rollback, blks_read, blks_hit, tup_returned, tup_fetched, tup_inserted, tup_updated, tup_deleted, conflicts, pg_database_size(datname) "datsize" from pg_stat_database;' \
+echo 'select datid, datname, numbackends, xact_commit, xact_rollback, blks_read, blks_hit, tup_returned, tup_fetched, tup_inserted, tup_updated, tup_deleted, pg_database_size(datname) "datsize" from pg_stat_database;' \
| su - $USER -c "psql -d postgres -A -F';'" | sed '$d'
Module: check_mk
Branch: master
Commit: 23ef5e873f78e5754929753a5431fa763e12f201
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=23ef5e873f78e5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 17:46:23 2013 +0100
FIX Now using /dev/null instead of closing stdin in linux agent
Some programs might not be working when stdin is closed. A more portable
approach seems to use /dev/null as stdin.
---
.werks/367 | 11 +++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/367 b/.werks/367
new file mode 100644
index 0000000..9f14404
--- /dev/null
+++ b/.werks/367
@@ -0,0 +1,11 @@
+Title: Now using /dev/null instead of closing stdin in linux agent
+Level: 2
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387212325
+Targetversion: future
+
+Some programs might not be working when stdin is closed. A more portable
+approach seems to use /dev/null as stdin.
diff --git a/ChangeLog b/ChangeLog
index dc20c59..3d34acb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,7 @@
* 0364 FIX: brocade_mlx*: Several cleanups, fixed bug in brocade_mlx_fan where only the first worst state was shown in output
* 0365 FIX: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package...
* 0366 FIX: heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9...
+ * 0367 FIX: Now using /dev/null instead of closing stdin in linux agent...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 33899d5..28453ad 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -53,7 +53,7 @@ if [ "$1" = -d ]
then
set -xv
else
- exec <&- 2>/dev/null
+ exec </dev/null 2>/dev/null
fi
# Runs a command asynchronous by use of a cache file
Module: check_mk
Branch: master
Commit: 387650d14f58c632a7bb54193befc88b40b271d1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=387650d14f58c6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 17:44:35 2013 +0100
FIX heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9
The paths /var/run/heartbeat/crm/cib_ro or /var/run/crm/cib_ro do not seem
to be existing anymore. Instead testing whether or not crmd is running.
---
.werks/366 | 11 +++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/366 b/.werks/366
new file mode 100644
index 0000000..07e917b
--- /dev/null
+++ b/.werks/366
@@ -0,0 +1,11 @@
+Title: heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387212198
+Targetversion: future
+
+The paths /var/run/heartbeat/crm/cib_ro or /var/run/crm/cib_ro do not seem
+to be existing anymore. Instead testing whether or not crmd is running.
diff --git a/ChangeLog b/ChangeLog
index 0784db0..dc20c59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* 0363 FIX: mysql_capacity: Did use wrong calculated warn / crit thresholds...
* 0364 FIX: brocade_mlx*: Several cleanups, fixed bug in brocade_mlx_fan where only the first worst state was shown in output
* 0365 FIX: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package...
+ * 0366 FIX: heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index ff0eb8d..33899d5 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -386,7 +386,7 @@ fi
# Heartbeat monitoring
# Different handling for heartbeat clusters with and without CRM
# for the resource state
-if [ -S /var/run/heartbeat/crm/cib_ro -o -S /var/run/crm/cib_ro ]; then
+if [ -S /var/run/heartbeat/crm/cib_ro -o -S /var/run/crm/cib_ro ] || pgrep crmd > /dev/null 2>&1; then
echo '<<<heartbeat_crm>>>'
crm_mon -1 -r | grep -v ^$ | sed 's/^ //; /^\sResource Group:/,$ s/^\s//; s/^\s/_/g'
fi
rpmnew file after updating package
Message-ID: <52af2c32.ZmHNWuY4kvauVcfD%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 5ce56b00c3e73fb0a04f516c49402b23ec542a20
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ce56b00c3e73f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 17:36:25 2013 +0100
FIX RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package
These files should not be left there after an RPM update, because they could
be loaded by xinetd. Removing these files now in %post section of RPM package.
---
.werks/365 | 11 +++++++++++
ChangeLog | 1 +
check_mk.spec | 3 +++
3 files changed, 15 insertions(+)
diff --git a/.werks/365 b/.werks/365
new file mode 100644
index 0000000..c6f6465
--- /dev/null
+++ b/.werks/365
@@ -0,0 +1,11 @@
+Title: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387211537
+Targetversion: future
+
+These files should not be left there after an RPM update, because they could
+be loaded by xinetd. Removing these files now in %post section of RPM package.
diff --git a/ChangeLog b/ChangeLog
index d121a2a..faf56cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,7 @@
* 0340 FIX: blade_health: fix check, it was totally broken...
* 0363 FIX: mysql_capacity: Did use wrong calculated warn / crit thresholds...
* 0364 FIX: brocade_mlx*: Several cleanups, fixed bug in brocade_mlx_fan where only the first worst state was shown in output
+ * 0365 FIX: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/check_mk.spec b/check_mk.spec
index dc88a9f..72f6f4b 100644
--- a/check_mk.spec
+++ b/check_mk.spec
@@ -245,6 +245,7 @@ fi
%define reload_xinetd if [ -x /etc/init.d/xinetd ] ; then if pgrep -x xinetd >/dev/null ; then echo "Reloading xinetd..." ; /etc/init.d/xinetd reload ; else echo "Starting xinetd..." ; /etc/init.d/xinetd start ; fi ; fi
%define activate_xinetd if which chkconfig >/dev/null 2>&1 ; then echo "Activating startscript of xinetd" ; chkconfig xinetd on ; fi
+%define cleanup_rpmnew if [ -f /etc/xinetd.d/check_mk.rpmnew ] ; then rm /etc/xinetd.d/check_mk.rpmnew ; fi
%pre agent
if [ ! -x /etc/init.d/xinetd ] ; then
@@ -264,6 +265,7 @@ if [ ! -x /etc/init.d/xinetd ] ; then
fi
%post agent
+%cleanup_rpmnew
%activate_xinetd
%reload_xinetd
@@ -291,6 +293,7 @@ if [ ! -x /etc/init.d/xinetd ] ; then
fi
%post caching-agent
+%cleanup_rpmnew
%activate_xinetd
%reload_xinetd
Module: check_mk
Branch: master
Commit: 51ec145e0e992036e43fa0f3a0b203240025af1c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=51ec145e0e9920…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 16 17:32:49 2013 +0100
FIX Avoid rare exception in WATO when deleting a host
When deleting a host in an environment with distributed WATO under
circumstances that are unclear an exception could happen in a function called
<tt>find_host_sites</tt>. This exception is now handled correctly.
---
.werks/341 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 11 ++++++-----
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/.werks/341 b/.werks/341
new file mode 100644
index 0000000..6d35008
--- /dev/null
+++ b/.werks/341
@@ -0,0 +1,12 @@
+Title: Avoid rare exception in WATO when deleting a host
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387211472
+Targetversion: future
+
+When deleting a host in an environment with distributed WATO under
+circumstances that are unclear an exception could happen in a function called
+<tt>find_host_sites</tt>. This exception is now handled correctly.
diff --git a/ChangeLog b/ChangeLog
index 3ac4b1d..58b5949 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -60,6 +60,7 @@
* 0331 FIX: LDAP diagnostic LOG can now have the $OMD_SITE$ macro configured via WATO...
* 0332 FIX: Own host tag groups without topics resulted in two groups "Host tags" in the rule editor
* 0361 FIX: The page linked by "new rule" can now be bookmarked again
+ * 0341 FIX: Avoid rare exception in WATO when deleting a host...
Notifications:
* 0362 sms: now searching PATH for sendsms and smssend commands...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 77cd9e8..4414320 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8222,11 +8222,12 @@ def global_replication_state():
return "clean"
def find_host_sites(site_ids, folder, hostname):
- host = folder[".hosts"][hostname]
- if "site" in host and host["site"]:
- site_ids.add(host["site"])
- elif folder[".siteid"]:
- site_ids.add(folder[".siteid"])
+ if hostname in folder[".hosts"]:
+ host = folder[".hosts"][hostname]
+ if "site" in host and host["site"]:
+ site_ids.add(host["site"])
+ elif folder[".siteid"]:
+ site_ids.add(folder[".siteid"])
# Scan recursively for references to sites
# in folders and hosts