Module: check_mk
Branch: master
Commit: 381766192dda669cb01e5f8290228a26cc693dc8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=381766192dda66…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 18 11:35:41 2014 +0100
simple code cleanup
---
modules/check_mk.py | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index c608f2b..e13e6cf 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -5983,7 +5983,7 @@ def read_autochecks_of(hostname, world="config"):
autochecks.append( (ct, it, compute_check_parameters(hostname, ct, it, par)) )
return autochecks
-# Read autochecks, but do not compute final check parameters,
+# Read autochecks, but do not compute final check parameters,
# also return a forth column with the raw string of the parameters.
def parse_autochecks_file(hostname):
def split_python_tuple(line):
@@ -6086,6 +6086,8 @@ def output_profile():
# | Main entry point and option parsing. Here is where all begins. |
# '----------------------------------------------------------------------'
+load_checks()
+
opt_nowiki = False
opt_split_rrds = False
@@ -6107,19 +6109,12 @@ non_config_options = ['-L', '--list-checks', '-P', '--package', '-M', '--notify'
'--man', '-V', '--version' ,'-h', '--help', '--automation',
'--create-rrd', '--convert-rrds', '--keepalive' ]
-non_checks_options = ['--create-rrd', '--convert-rrds', '--help']
-
try:
opts, args = getopt.getopt(sys.argv[1:], short_options, long_options)
except getopt.GetoptError, err:
print str(err)
sys.exit(1)
-# The check files set serveral config vars which might be overwritten
-# later by configuration. So the checks need to be loaded before the config
-if len(set.intersection(set(non_checks_options), [o[0] for o in opts])) == 0:
- load_checks()
-
# Read the configuration files (main.mk, autochecks, etc.), but not for
# certain operation modes that does not need them and should not be harmed
# by a broken configuration
@@ -6378,7 +6373,7 @@ if not done:
except:
print "Cannot resolve hostname '%s'." % hostname
sys.exit(2)
-
+
exit_status = do_check(hostname, ipaddress, check_types)
output_profile()
Module: check_mk
Branch: master
Commit: c2c9f34fea447063ae04af4438d3d85cec794cfa
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c2c9f34fea4470…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Dec 18 10:53:46 2014 +0100
cifsmounts: Added missing manualpage
---
checkman/cifsmounts | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/checkman/cifsmounts b/checkman/cifsmounts
new file mode 100644
index 0000000..bbce592
--- /dev/null
+++ b/checkman/cifsmounts
@@ -0,0 +1,38 @@
+title: Health of CIFS Mounts mountet on UNIX/ Linux
+agents: linux, aix
+catalog: os/services
+license: GPL
+distribution: check_mk
+description:
+ This check probes the availability of CIFS mounts. The agent sends the
+ status of all NFS mounts, if the command line utility {waitmax} is available
+ (it is is used to avoid hanging if the server is not responding). The
+ probe is done by trying a {stat -f} (system call {statfs(2)}) on the mount
+ point. If that lasts longer then 2 seconds, then the server is considered
+ to be not responding.
+
+ When you install the agent manually, please do not forget to also
+ install {waitmax} into {/usr/bin}. That file is shipped together with
+ the agent. When {waitmax} is missing, the agent will silently omit the
+ section {nfsmounts}.
+
+ If the CIFS mount is "stale", then {stat -f} returns immediately but with
+ a size of {0}. The check detects that and results in a warning state.
+
+ Please note, that though this check outputs the current usage of the remote
+ filesystem, no levels can be defined for the used space and no performance
+ data is output. Please do a check for used space directly on the CIFS server.
+
+item:
+ The mount point.
+
+perfdata:
+ This check does not provide performance data. The disk usage is assumedly
+ measured on the file server itself. Duplicating that data on all clients
+ would unneccessarily create redundant RRDs.
+
+inventory:
+ All CIFS mounts are found automatically. This is done
+ by scanning {/proc/mounts} (linux) or using the mount command (aix). The file {/etc/fstab}
+ is irrelevant.
+
Module: check_mk
Branch: master
Commit: f48348bdcdd50ec9fce058cfa94639c68ffecd52
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f48348bdcdd50e…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Dec 18 10:41:57 2014 +0100
removed obsolte users check, is replaced by login check
---
checks/users | 59 ----------------------------------------------------------
1 file changed, 59 deletions(-)
diff --git a/checks/users b/checks/users
deleted file mode 100644
index 71287de..0000000
--- a/checks/users
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/python
-# -*- encoding: utf-8; py-indent-offset: 4 -*-
-# +------------------------------------------------------------------+
-# | ____ _ _ __ __ _ __ |
-# | / ___| |__ ___ ___| | __ | \/ | |/ / |
-# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
-# | | |___| | | | __/ (__| < | | | | . \ |
-# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
-# | |
-# | Copyright Mathias Kettner 2014 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.
-
-
-# Example output from agent:
-# <<<user>>>
-# 3
-
-users_default_levels = (20,30)
-
-def inventory_users(info):
- if info:
- return [ (None, "users_default_levels") ]
-
-def check_users(_no_item, params, info):
- if info:
- users = int(info[0][0])
- warn, crit = params
- state = 0
- if users >= crit:
- state = 2
- elif users >= warn:
- state = 1
-
- infotext = "%d users logged in, levels at %d/%d" % ( users, warn, crit )
- perfdata = [ ( "users", users, warn, crit, 0 ) ]
- yield state, infotext, perfdata
-
-
-check_info["users"] = {
- 'check_function' : check_users,
- 'inventory_function' : inventory_users,
- 'service_description' : 'Users',
- 'has_perfdata' : True,
- 'group' : 'users',
-}
Module: check_mk
Branch: master
Commit: 2118dce8bebc8412b875f8ec9fb7781c102bfcb6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2118dce8bebc84…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 18 10:22:34 2014 +0100
Fixed usage of "active" autochecks in keepalive mode
---
modules/check_mk.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 6f3c0b3..0affbda 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -980,7 +980,7 @@ def get_check_table(hostname, remove_duplicates=False, use_cache=True, world='co
# Now process all entries that are specific to the host
# in search (single host) or that might match the host.
- for entry in read_autochecks_of(hostname):
+ for entry in read_autochecks_of(hostname, world):
handle_entry(entry)
for entry in g_singlehost_checks.get(hostname, []):