Module: check_mk
Branch: master
Commit: 0614bd0948aa5d50603400a0ea5a072e65b8bb6d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0614bd0948aa5d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat May 25 13:50:01 2013 +0200
New option -B for just generating the configuration
---
ChangeLog | 5 +++++
modules/check_mk.py | 29 +++++++++++++++--------------
2 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7769b01..8d99d24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1.2.3i2:
+ Core:
+ * New option -B for just generating the configuration
+
+
1.2.3i1:
Core:
* Agents can send data for other hosts "piggyback". This is being
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 1776a37..552aa5b 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -3961,10 +3961,11 @@ def usage():
check_mk [-u] -II ... renew inventory, drop old services
check_mk -u, --cleanup-autochecks reorder autochecks files
check_mk -N [HOSTS...] output Nagios configuration
+ check_mk -B create configuration for core
check_mk -C, --compile precompile host checks
- check_mk -U, --update precompile + create Nagios config
- check_mk -O, --reload precompile + config + Nagios reload
- check_mk -R, --restart precompile + config + Nagios restart
+ check_mk -U, --update precompile + create config for core
+ check_mk -O, --reload precompile + config + core reload
+ check_mk -R, --restart precompile + config + core restart
check_mk -D, --dump [H1 H2 ..] dump all or some hosts
check_mk -d HOSTNAME|IPADDRESS show raw information from agent
check_mk --check-inventory HOSTNAME check for items not yet checked
@@ -3990,7 +3991,7 @@ def usage():
OPTIONS:
-v show what's going on
-p also show performance data (use with -v)
- -n do not submit results to Nagios, do not save counters
+ -n do not submit results to core, do not save counters
-c FILE read config file FILE instead of %s
--cache read info from cache file is present and fresh, use TCP
only, if cache file is absent or too old
@@ -4031,7 +4032,7 @@ NOTES:
-d does not work on clusters (such defined in main.mk) but only on
real hosts.
- --check-inventory make check_mk behave as Nagios plugins that
+ --check-inventory make check_mk behave as monitoring plugins that
checks if an inventory would find new services for the host.
--list-hosts called without argument lists all hosts. You may
@@ -4084,7 +4085,7 @@ NOTES:
hosts's parents. It creates the file conf.d/parents.mk which
defines gateway hosts and parent declarations.
- Nagios can call check_mk without options and the hostname and its IP
+ The core can call check_mk without options and the hostname and its IP
address as arguments. Much faster is using precompiled host checks,
though.
@@ -4116,14 +4117,11 @@ def do_precompile_hostchecks():
sys.stdout.write(tty_ok + "\n")
-def do_update():
+def do_update(with_precompile):
try:
do_create_config()
- do_precompile_hostchecks()
- sys.stdout.write(("Successfully created Nagios configuration file %s%s%s.\n\n" +
- "Please make sure that file will be read by Nagios.\n" +
- "You need to restart Nagios in order to activate " +
- "the changes.\n") % (tty_green + tty_bold, nagios_objects_file, tty_normal))
+ if with_precompile:
+ do_precompile_hostchecks()
except Exception, e:
sys.stderr.write("Configuration Error: %s\n" % e)
@@ -4910,7 +4908,7 @@ def output_profile():
# Do option parsing and execute main function -
# if check_mk is not called as module
if __name__ == "__main__":
- short_options = 'SHVLCURODMd:Ic:nhvpXPuN'
+ short_options = 'SHVLCURODMd:Ic:nhvpXPuNB'
long_options = [ "help", "version", "verbose", "compile", "debug",
"list-checks", "list-hosts", "list-tag", "no-tcp", "cache",
"flush", "package", "localize", "donate", "snmpwalk", "snmptranslate",
@@ -4993,11 +4991,14 @@ if __name__ == "__main__":
elif o == '-N':
do_output_nagios_conf(args)
done = True
+ elif o == '-B':
+ do_update(False)
+ done = True
elif o in [ '-C', '--compile' ]:
precompile_hostchecks()
done = True
elif o in [ '-U', '--update' ] :
- do_update()
+ do_update(True)
done = True
elif o in [ '-R', '--restart' ] :
do_restart()
Module: check_mk
Branch: master
Commit: 35d012e14dd3d7b8adfc279881f0d747e33c8221
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=35d012e14dd3d7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 24 14:36:33 2013 +0200
Fixed some typos in comments
---
modules/check_mk.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 1776a37..84f3e4d 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -127,7 +127,7 @@ def verbose(t):
# read in this file first. It tells us where to look for our
# configuration file. In python argv[0] always contains the directory,
# even if the binary lies in the PATH and is called without
-# '/'. This allows us to find our directory by taking everying up to
+# '/'. This allows us to find our directory by taking everything up to
# the first '/'
# Allow to specify defaults file on command line (needed for OMD)
@@ -524,7 +524,7 @@ def host_is_aggregated(hostname):
if not service_aggregations:
return False
- # host might by explicitely configured as not aggregated
+ # host might by explicitly configured as not aggregated
if in_binary_hostlist(hostname, non_aggregated_hosts):
return False
@@ -533,7 +533,7 @@ def host_is_aggregated(hostname):
is_aggr = len(host_extra_conf(hostname, host_conf_list)) > 0
return is_aggr
-# Determines the aggretated service name for a given
+# Determines the aggregated service name for a given
# host and service description. Returns "" if the service
# is not aggregated
def aggregated_service_name(hostname, servicedesc):
@@ -844,7 +844,7 @@ def is_cluster(hostname):
def clusters_of(hostname):
return [ strip_tags(c) for c,n in clusters.items() if hostname in n ]
-# Determine wether a service (found on a physical host) is a clustered
+# Determine weather a service (found on a physical host) is a clustered
# service and - if yes - return the cluster host of the service. If
# no, returns the hostname of the physical host.
def host_of_clustered_service(hostname, servicedesc):
@@ -852,7 +852,7 @@ def host_of_clustered_service(hostname, servicedesc):
if not the_clusters:
return hostname
- # 1. New style: explicitlely assigned services
+ # 1. New style: explicitly assigned services
for cluster, conf in clustered_services_of.items():
nodes = nodes_of(cluster)
if not nodes:
@@ -884,7 +884,7 @@ def host_of_clustered_service(hostname, servicedesc):
# Format: ( checkname, item ) -> (params, description )
# Keep a global cache of per-host-checktables, since this
-# operation is quiet lengty.
+# operation is quite lengthy.
g_check_table_cache = {}
# A further cache splits up all checks into single-host-entries
# and those possibly matching multiple hosts. The single host entries
@@ -1106,7 +1106,7 @@ def service_description(check_type, item):
descr_format = check_info[check_type]["service_description"]
# Note: we strip the service description (remove spaces).
- # One check defines "Pages %s" as a desription, but the item
+ # One check defines "Pages %s" as a description, but the item
# can by empty in some cases. Nagios silently drops leading
# and trailing spaces in the configuration file.
@@ -2201,7 +2201,7 @@ def create_nagios_config_contacts(outfile):
# If the contact is in no contact group or all of the contact groups
# of the contact have neither hosts nor services assigned - in other
# words if the contact is not assigned to any host or service, then
- # we do not create this contact in Nagios. It's useless and wil produce
+ # we do not create this contact in Nagios. It's useless and will produce
# warnings.
cgrs = [ cgr for cgr in contact.get("contactgroups", []) if cgr in contactgroups_to_define ]
if not cgrs:
@@ -2525,7 +2525,7 @@ def check_inventory(hostname):
info = ", ".join([ "%s:%d" % (ct, count) for ct,count in newchecks ])
statustext = { 0 : "OK", 1: "WARNING", 2:"CRITICAL" }.get(inventory_check_severity, "UNKNOWN")
sys.stdout.write("%s - %d unchecked services (%s)\n" % (statustext, total_count, info))
- # Put detailed list into long pluging output
+ # Put detailed list into long plugin output
for hostname, checkname, item in newitems:
sys.stdout.write("%s: %s\n" % (checkname, service_description(checkname, item)))
sys.exit(inventory_check_severity)
@@ -4431,7 +4431,7 @@ def scan_parents_of(hosts, silent=False, settings={}):
sys.stdout.flush()
# Now all run and we begin to read the answers. For each host
- # we add a triple to gateways: the gateway, a scan state and a diagnostig output
+ # we add a triple to gateways: the gateway, a scan state and a diagnostic output
gateways = []
for host, ip, proc in procs:
lines = [l.strip() for l in proc.readlines()]
Module: check_mk
Branch: master
Commit: 744c4fbfde992d587ffaa17dfae916badc5c8436
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=744c4fbfde992d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 23 15:31:35 2013 +0200
Removed some trailing spaces
---
checkman/apache_status | 10 +++++-----
checkman/esx_vsphere_hostsystem.multipath | 4 ++--
checkman/oracle_rman_backups | 2 +-
checkman/winperf_processor.util | 2 +-
checks/apache_status | 2 +-
checks/winperf_tcp_conn | 2 +-
web/plugins/wato/check_mk_configuration.py | 4 ++--
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/checkman/apache_status b/checkman/apache_status
index 8b5aac2..7db72bb 100644
--- a/checkman/apache_status
+++ b/checkman/apache_status
@@ -16,19 +16,19 @@ description:
The plugin tries to autodetect all running apache servers. If that fails
for some reason you need to create the configuration file
{/etc/check_mk/apache_status.cfg} and list your servers here. Write
- a Python list of dicts for protocol, servername and port.
- With the optional item 'page' its posible to change the status page from server-status to a
+ a Python list of dicts for protocol, servername and port.
+ With the optional item 'page' its posible to change the status page from server-status to a
name you want
examples:
- servers = [
+ servers = [
{
- 'protocol' : 'http',
+ 'protocol' : 'http',
'address' : 'localhost',
'port' : 80 ,
},
{
- 'protocol' : 'https',
+ 'protocol' : 'https',
'address' : 'localhost',
'port' : 443 ,
'page' : 'server-status-2',
diff --git a/checkman/esx_vsphere_hostsystem.multipath b/checkman/esx_vsphere_hostsystem.multipath
index 3d9fcb2..0a736bf 100644
--- a/checkman/esx_vsphere_hostsystem.multipath
+++ b/checkman/esx_vsphere_hostsystem.multipath
@@ -6,11 +6,11 @@ distribution: check_mk
description:
This check monitors the state of all Multipath devices
on an ESX host system. It gets critical if at least one
- path is dead or in {unknown} state.
+ path is dead or in {unknown} state.
It gets warning if at least one path is disabled or in standby mode.
inventory:
- One service per multipath device will be created. Paths
+ One service per multipath device will be created. Paths
to local disk are ignored.
item:
diff --git a/checkman/oracle_rman_backups b/checkman/oracle_rman_backups
index 4c58d0a..e0de61e 100644
--- a/checkman/oracle_rman_backups
+++ b/checkman/oracle_rman_backups
@@ -4,7 +4,7 @@ author: Lars Michelsen <lm(a)mathias-kettner.de>
license: GPL
distribution: check_mk
description:
- This check monitors backup jobs configured with RMAN
+ This check monitors backup jobs configured with RMAN
(Recovery Manager) in ORACLE databases. It checks the state
of the last executed backup and outputs the execution times.
diff --git a/checkman/winperf_processor.util b/checkman/winperf_processor.util
index 774a4d1..8f5792c 100644
--- a/checkman/winperf_processor.util
+++ b/checkman/winperf_processor.util
@@ -35,4 +35,4 @@ parameters(dict): A dictionary with the following keys:
{"average"}: A number of minutes for enabling averaging.
[configuration]
-winperf_cpu_default_levels(dict): Default levels, preset to { "levels": (101.0, 101.0) }
+winperf_cpu_default_levels(dict): Default levels, preset to { "levels": (101.0, 101.0) }
diff --git a/checks/apache_status b/checks/apache_status
index a1db19d..991aebf 100644
--- a/checks/apache_status
+++ b/checks/apache_status
@@ -135,7 +135,7 @@ def check_apache_status(item, params, info):
display_value = '%0.2f' % value
else:
display_value = '%d' % value
-
+
extra_info = ""
extra_perf = []
if params.get(key) and len(apache_status_fields[key]) > 2:
diff --git a/checks/winperf_tcp_conn b/checks/winperf_tcp_conn
index 14a9ce4..8d4b7af 100644
--- a/checks/winperf_tcp_conn
+++ b/checks/winperf_tcp_conn
@@ -60,7 +60,7 @@ def check_winperf_tcp_conn(item, params, info):
infotext += "(!) (warning at %d)" % warn
infotext += ", "
perfdata.append( (name, value, warn, crit) )
-
+
infotext = infotext[:-2]
return worst_state, infotext, perfdata
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 1bc5f19..1f5992b 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1275,7 +1275,7 @@ register_rule(group,
default_value = [ "d", "u", "r", "f", "s" ],
),
title = _("Notified events for hosts"),
- help = _("This ruleset allows you to restrict notifications of host problems to certain "
+ help = _("This ruleset allows you to restrict notifications of host problems to certain "
"states, e.g. only notify on DOWN, but not on UNREACHABLE. Please select the types "
"of events that should initiate notifications. Please note that several other "
"filters must also be passed in order for notifications to finally being sent out."),
@@ -1299,7 +1299,7 @@ register_rule(group,
default_value = [ "w", "u", "c", "r", "f", "s" ],
),
title = _("Notified events for services"),
- help = _("This ruleset allows you to restrict notifications of service problems to certain "
+ help = _("This ruleset allows you to restrict notifications of service problems to certain "
"states, e.g. only notify on CRIT, but not on WARN. Please select the types "
"of events that should initiate notifications. Please note that several other "
"filters must also be passed in order for notifications to finally being sent out."),
Module: check_mk
Branch: master
Commit: 04d5a0b1c6d34e4c4e1fcc55d3698fb12b288981
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=04d5a0b1c6d34e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 22 16:21:04 2013 +0200
FIX: LDAP configuration: allow DNs without DC=
---
ChangeLog | 7 ++++---
web/htdocs/valuespec.py | 4 ----
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0ebc35f..58e4ac7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -155,6 +155,7 @@
WATO:
* FIX: convert editing of global setting to POST. This avoid URL-too-long
when defining lots of Event Console actions
+ * FIX: LDAP configuration: allow DNs without DC=
Event Console:
* FIX: fix icon in events check if host specification is by IP address
@@ -288,7 +289,7 @@
user/kernel percentages. (thanks to William Baum)
* FIX: UPS checks support Eaton Evolution
* FIX: windows agent plugin: mssql now exits after 10 seconds
-
+
Notifications:
* FIX: fixed crash on host notification when contact had explicit services set
@@ -302,12 +303,12 @@
Multisite:
* FIX: Avoid duplicate "Services" button in host detail views
* FIX: fix rescheduling icon for services with non-ASCII characters
- * New filter for IP address of a host
+ * New filter for IP address of a host
* Quicksearch: allow searching for complete IP addresses and IP
address prefixes
* Add logentry class filter to view 'Host- and Service events'
- BI:
+ BI:
* FIX: fix exception with expansion level being 'None'
* FIX: speedup for single host tables joined by hostname (BI-Boxes)
* FIX: avoid closing BI subtree while tree is being loaded
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 84c0c99..a3866cb 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -2340,10 +2340,6 @@ class LDAPDistinguishedName(TextAscii):
def validate_value(self, value, varprefix):
TextAscii.validate_value(self, value, varprefix)
- # At least one DC= must be in distinguished name
- if value and 'dc=' not in value.lower():
- raise MKUserError(varprefix, _('Found no "dc=" (Domain Component).'))
-
# Check wether or not the given DN is below a base DN
if self.enforce_suffix and value and not value.lower().endswith(self.enforce_suffix.lower()):
raise MKUserError(varprefix, _('Does not ends with "%s".') % self.enforce_suffix)
Module: check_mk
Branch: master
Commit: 753c2b255f0c740650b704e7ade46526232493d0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=753c2b255f0c74…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 22 16:02:29 2013 +0200
FIX: free_ipmi: fix name of sensor cache file if hostname contains domain part
Conflicts:
ChangeLog
---
ChangeLog | 4 ++++
agents/check_mk_agent.linux | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 43328f4..0ebc35f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -146,6 +146,7 @@
* FIX: zfsget: do not assume that devices begin with /, but mountpoints
* FIX: ipmi_sensors: handle two cases for DELL correctly (thanks to Sebastian Talmon)
* FIX: check_dns: enable performance data
+ * FIX: free_ipmi: fix name of sensor cache file if hostname contains domain part
Multisite:
* List of views: Output the alias of a datasource instead of internal name
@@ -180,6 +181,9 @@
* FIX: Fixed exception during initial page rendering in python 2.6 in special cases
(Internal error: putenv() argument 2 must be string, not list)
+ Livestatus:
+ * livestatus.log: show utf-8 decoding problems only with debug logging >=2
+
Notifications:
* FIX: HTML mails: Handle the case where plugin argument is not set
* FIX: HTML mails: remove undefinded placeholders like $GRAPH_CODE$
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 9c80562..335ba79 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -243,7 +243,7 @@ fi
# for the first run (where the cache is created). If ipmi-sensors runs into
# that timeout, it leaves and empty cache file. We skip this check forever
# if we find that empty cache file.
-sdrcache=/var/cache/.freeipmi/sdr-cache/sdr-cache-$(hostname).127.0.0.1
+sdrcache=/var/cache/.freeipmi/sdr-cache/sdr-cache-$(hostname | cut -d. -f1).127.0.0.1
if type ipmi-sensors >/dev/null && [ ! -e "$sdrcache" -o -s "$sdrcache" ]
then
echo '<<<ipmi_sensors>>>'