Module: check_mk
Branch: master
Commit: 55c5056b215cdc268fc38dedd45dc514137d1cc2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=55c5056b215cdc…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Tue Jul 1 18:33:41 2014 +0200
added wato_hook_cleanup_folders.py in treasures: a script to delete e. g. folders of other customers on slave sites directly after the replication
---
doc/treasures/wato_hook_cleanup_folders.py | 49 ++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/doc/treasures/wato_hook_cleanup_folders.py b/doc/treasures/wato_hook_cleanup_folders.py
new file mode 100644
index 0000000..8ab534c
--- /dev/null
+++ b/doc/treasures/wato_hook_cleanup_folders.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# put this script into local/share/check_mk/web/plugins/wato
+# of a slave site
+# this deletes all WATO folders immediatelly after sync except one
+# folder with the same name as the site name of the slave site
+#
+# it can be used to avoid a customer to see config of other customers
+# for this to work you need to have one folder per customer on the top
+# level and one site per customer with exactly the same name
+def pre_activate_changes_cleanup(_unused):
+ log = open('%s/tmp/hook.log' % defaults.omd_root,'w')
+ log.write('omd_site: %s, omd_root: %s\n' % (defaults.omd_site, defaults.omd_root))
+ confd = "%s/etc/check_mk/conf.d/wato/" % defaults.omd_root
+ for dirname, dirnames, filenames in os.walk(confd):
+ for subdirname in dirnames:
+ if subdirname == defaults.omd_site:
+ log.write("keeping subdir: %s\n" % subdirname)
+ else:
+ log.write("deletinging subdir: %s\n" % subdirname)
+ shutil.rmtree(confd + subdirname)
+ break
+ log.close()
+
+api.register_hook('pre-activate-changes', pre_activate_changes_cleanup)
Module: check_mk
Branch: master
Commit: a12291264ba00edb82f5e39d7f24e23b6f8949b1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a12291264ba00e…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Wed Jul 2 10:14:56 2014 +0200
notify_multitech.py: Added a hint about passwords to use
---
doc/treasures/notify_multitech.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/treasures/notify_multitech.py b/doc/treasures/notify_multitech.py
index ba3f949..4d57b35 100755
--- a/doc/treasures/notify_multitech.py
+++ b/doc/treasures/notify_multitech.py
@@ -42,6 +42,9 @@
# * Under
# SMS Services > Send SMS Users
# create a user for Check_MK. This one needs to be entered below.
+# Make sure you choose a password, which is not longer than 8 characters.
+# On the device it is possible to set a longer password, but authentication
+# with it is impossible!! :-(
#
# * Do not forget to go to the "Save & Restart" tab and click "save" there.
# This writes your changes into the flash memory of the device. Otherwise
Module: check_mk
Branch: master
Commit: 6dfcbb60e3be64dcd701aa6abbc1378d4f4a1f3e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6dfcbb60e3be64…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jul 2 10:09:02 2014 +0200
FIX Avoid sporadic errors when checking event state in Event Console
When you add the check for checking the current event state of a host
in the Event Console than under heavy load it could sometimes happen
that the check would run into an error (<tt>Ressource temporarily unavailable</tt>).
This has been fixed by switching from the Python version of <tt>check_mkevents</tt>
to the C version. This also saves CPU ressources if you have a larger
number of hosts.
---
.werks/1040 | 14 ++++++++++++++
ChangeLog | 3 +++
mkeventd/lib/.gitignore | 2 +-
mkeventd/lib/Makefile | 8 ++++----
mkeventd/lib/{check_mkevents => check_mkevents.py} | 3 +++
5 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/.werks/1040 b/.werks/1040
new file mode 100644
index 0000000..7e294dd
--- /dev/null
+++ b/.werks/1040
@@ -0,0 +1,14 @@
+Title: Avoid sporadic errors when checking event state in Event Console
+Level: 2
+Component: ec
+Class: fix
+State: unknown
+Version: 1.2.5i5
+Date: 1404288443
+
+When you add the check for checking the current event state of a host
+in the Event Console than under heavy load it could sometimes happen
+that the check would run into an error (<tt>Ressource temporarily unavailable</tt>).
+This has been fixed by switching from the Python version of <tt>check_mkevents</tt>
+to the C version. This also saves CPU ressources if you have a larger
+number of hosts.
diff --git a/ChangeLog b/ChangeLog
index 81f7bad..1d3eb28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,9 @@
Reporting & Availability:
* 0991 FIX: Availability: optionally show time stamps as UNIX epoch time...
+ Event Console:
+ * 1040 FIX: Avoid sporadic errors when checking event state in Event Console...
+
Livestatus:
* 0988 FIX: livedump: Fix exception in case no contact groups are defined for a service
diff --git a/mkeventd/lib/.gitignore b/mkeventd/lib/.gitignore
index eb18566..d921ff9 100644
--- a/mkeventd/lib/.gitignore
+++ b/mkeventd/lib/.gitignore
@@ -1 +1 @@
-check_mkevents_c
+check_mkevents
diff --git a/mkeventd/lib/Makefile b/mkeventd/lib/Makefile
index fc6cfd7..1b433bc 100644
--- a/mkeventd/lib/Makefile
+++ b/mkeventd/lib/Makefile
@@ -22,10 +22,10 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-all: check_mkevents_c
+all: check_mkevents
-check_mkevents_c: check_mkevents.cc
- g++ -O2 -o check_mkevents_c check_mkevents.cc
+check_mkevents: check_mkevents.cc
+ g++ -O2 -s -o check_mkevents check_mkevents.cc
clean:
- rm -f check_mkevents_c
+ rm -f check_mkevents
diff --git a/mkeventd/lib/check_mkevents b/mkeventd/lib/check_mkevents.py
similarity index 98%
rename from mkeventd/lib/check_mkevents
rename to mkeventd/lib/check_mkevents.py
index 8d745d9..08b0b40 100755
--- a/mkeventd/lib/check_mkevents
+++ b/mkeventd/lib/check_mkevents.py
@@ -1,5 +1,8 @@
#!/usr/bin/python
+# Old, outdated Python version of check_mkevents. Do not use
+# anymore...
+
import os, socket, sys
try: