Module: check_mk
Branch: master
Commit: 6ca251e0d43e95e815463e90f07ef50ebc9dbcfc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6ca251e0d43e95…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jun 7 15:09:39 2016 +0200
Start experimental lib module cmk.render
---
lib/{fmt.py => render.py} | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/lib/fmt.py b/lib/render.py
similarity index 69%
rename from lib/fmt.py
rename to lib/render.py
index adfafd8..2f31f7b 100644
--- a/lib/fmt.py
+++ b/lib/render.py
@@ -23,3 +23,24 @@
# 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.
+
+"""This module contains functions that transform Python values into
+text representations optimized for human beings - with optional localization.
+The resulting strings are not ment to be parsed into values again later. They
+are just for optical output purposes."""
+
+# THIS IS STILL EXPERIMENTAL
+
+import time
+
+# TODO: Clean this up one day by using the way recommended by gettext.
+# (See https://docs.python.org/2/library/gettext.html). For this we
+# need the path to the locale files here.
+try:
+ _
+except NameError:
+ _ = lambda x: x # Fake i18n when not available
+
+
+def date(timestamp):
+ return time.strftime("%Y-%m-%d", time.localtime(timestamp))
Module: check_mk
Branch: master
Commit: e9c8344f24e18bbfca433ab13048896f2e77cdc1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e9c8344f24e18b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jun 7 10:48:29 2016 +0200
3590 FIX mssql.vbs: Completely removed plugin output
The timeout / async handling of agent plugins should be handled in
the agent configuration.
---
.werks/3590 | 11 +++++++++++
ChangeLog | 1 +
agents/windows/plugins/mssql.vbs | 6 ------
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/.werks/3590 b/.werks/3590
new file mode 100644
index 0000000..ebfd76a
--- /dev/null
+++ b/.werks/3590
@@ -0,0 +1,11 @@
+Title: mssql.vbs: Completely removed plugin output
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1465289261
+
+The timeout / async handling of agent plugins should be handled in
+the agent configuration.
diff --git a/ChangeLog b/ChangeLog
index 9fcc98d..8da0093 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -261,6 +261,7 @@
* 3633 FIX: check_sql: minor cleanup in active check_sql, fixed performance data handling
* 3540 FIX: Fixed exception on reading cachefiles...
* 3541 FIX: esx_vsphere_hostsystem.state: no longer crashes when data is missing...
+ * 3590 FIX: mssql.vbs: Completely removed plugin output...
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/agents/windows/plugins/mssql.vbs b/agents/windows/plugins/mssql.vbs
index b3932ad..75052df 100644
--- a/agents/windows/plugins/mssql.vbs
+++ b/agents/windows/plugins/mssql.vbs
@@ -36,12 +36,6 @@ Dim cfg_dir, cfg_file, hostname
Const HKLM = &H80000002
-' Don't make this timeout too low. We saw the "sp_spaceused" stored procedure
-' to sometimes come back instantly but sometimes it takes several seconds to
-' come back. If this is needed to be changed, please make it configurable using
-' the plugins mssql*.ini config files.
-WScript.Timeout = 30
-
' Directory of all database instance names
Set instances = CreateObject("Scripting.Dictionary")
Set FSO = CreateObject("Scripting.FileSystemObject")
Module: check_mk
Branch: master
Commit: 6d57ef82922b456f5843a4c7c69dfd7f50d820e3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6d57ef82922b45…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Jun 7 10:02:19 2016 +0200
3541 FIX esx_vsphere_hostsystem.state: no longer crashes when data is missing
Sometimes ESX systems decide not report any data at all.
This check no longer crashes when this happens, it simply reports UNKNOWN.
An upcoming update will change this behaviour so that the checks will go stale
in case the data is missing.
---
.werks/3541 | 15 +++++++++++++++
ChangeLog | 1 +
checks/esx_vsphere_hostsystem | 3 +++
3 files changed, 19 insertions(+)
diff --git a/.werks/3541 b/.werks/3541
new file mode 100644
index 0000000..8485117
--- /dev/null
+++ b/.werks/3541
@@ -0,0 +1,15 @@
+Title: esx_vsphere_hostsystem.state: no longer crashes when data is missing
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1465286242
+
+Sometimes ESX systems decide not report any data at all.
+This check no longer crashes when this happens, it simply reports UNKNOWN.
+
+An upcoming update will change this behaviour so that the checks will go stale
+in case the data is missing.
+
diff --git a/ChangeLog b/ChangeLog
index e3e8e5c..9fcc98d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -260,6 +260,7 @@
* 2238 FIX: postfix_mailq: Fixed incorrect creation of RRDs, Fixed graphs of size and length of queues...
* 3633 FIX: check_sql: minor cleanup in active check_sql, fixed performance data handling
* 3540 FIX: Fixed exception on reading cachefiles...
+ * 3541 FIX: esx_vsphere_hostsystem.state: no longer crashes when data is missing...
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/esx_vsphere_hostsystem b/checks/esx_vsphere_hostsystem
index 11fbf4a..3e88dd5 100644
--- a/checks/esx_vsphere_hostsystem
+++ b/checks/esx_vsphere_hostsystem
@@ -295,6 +295,9 @@ def inventory_esx_vsphere_hostsystem_state(info):
def check_esx_vsphere_hostsystem_state(_no_item, _no_params, info):
data = esx_vsphere_hostsystem_convert(info)
state = 0
+ if "overallStatus" not in data:
+ return
+
overallStatus = str(data['overallStatus'][0])
if overallStatus == "yellow":
state = 1
Module: check_mk
Branch: master
Commit: a7c256b3ec4f1c860e0d34c7629fd26bc985ad1b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a7c256b3ec4f1c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jun 6 20:59:59 2016 +0200
Tried to fix headrify script a bit; but it is still broken
---
doc/helpers/headrify | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/doc/helpers/headrify b/doc/helpers/headrify
index 6c39ca9..c6e383b 100755
--- a/doc/helpers/headrify
+++ b/doc/helpers/headrify
@@ -26,7 +26,7 @@ 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
+tails. 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.
@@ -44,8 +44,8 @@ headrify ()
return
fi
- if [ "${file##*/}" = README ] ; then
- echo "skipping README file."
+ if [[ "${file##*/}" =~ ^[A-Z]+$ ]]; then
+ echo "skipping $file. It's a documentation file."
return
fi
@@ -82,7 +82,7 @@ headrify ()
*.h|*.c|*.cc|*.h.in|*.js) comment="// " ;;
*.conf|*.cfg) comment="# " ;;
*.spec|Makefile*) comment="# " ;;
- *.py|*) comment="# " ; bangpath="#!/usr/bin/python
+ *.py|*) comment="# " ; bangpath="#!/usr/bin/env python
# -*- encoding: utf-8; py-indent-offset: 4 -*-"; ;;
esac
fi
@@ -137,8 +137,22 @@ else
-name "*.php" -or \
-name "*.sh" -or \
-name "*.spec" \) ; \
- rm -f checks/*~ ; ls checks/* ; echo agents/plugins/* agents/special/* agents/* | tr ' ' \\n | grep -vx agents/waitmax | fgrep -v windows | fgrep -v .exe | fgrep -v windows/plugins ; ls agents/windows/*.cc ; echo agents/windows/Makefile ; } \
- | egrep -v 'livestatus/nagios4?/' | grep -vx '' | \
+ rm -f checks/*~ ; ls checks/* ; \
+ echo agents/plugins/* agents/special/* agents/* \
+ | tr ' ' \\n \
+ | grep -vx agents/waitmax \
+ | fgrep -v windows \
+ | fgrep -v .exe \
+ | fgrep -v .deb \
+ | fgrep -v .rpm \
+ | fgrep -v windows/plugins ; \
+ ls agents/windows/*.cc ;
+ echo agents/windows/Makefile ;
+ } \
+ | egrep -v 'livestatus/nagios4?/' \
+ | grep -v 'agents/cfg_examples' \
+ | grep -vx '' \
+ | \
while read file
do
headrify "$file" &