Module: check_mk
Branch: master
Commit: 7ae86839324bebdd03b4c73cb11e6f021b8b62cd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ae86839324beb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 23 16:34:41 2014 +0100
Remove obsolete option -u, --cleanup-autochecks
The option <tt>-u</tt> / <tt>--cleanup-autochecks</tt> has been
removed.
Autocheck files in <tt>var/check_mk/autochecks</tt> are now always
cleaned up (i.e. one file per host).
---
.bugs/2100 | 6 ++++--
.werks/695 | 10 ++++++++++
ChangeLog | 2 ++
modules/check_mk.py | 24 +++++-------------------
web/plugins/wato/check_mk_configuration.py | 8 --------
5 files changed, 21 insertions(+), 29 deletions(-)
diff --git a/.bugs/2100 b/.bugs/2100
index 6d1602b..a0a76ae 100644
--- a/.bugs/2100
+++ b/.bugs/2100
@@ -1,8 +1,10 @@
Title: OpenLDAP: Group sync seems broken
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2013-12-17 13:38:38
Targetversion: 1.2.4
-Class: bug
Groups are not synced anymore. The search-filter on the distinguishedName does not work
in Openldap, nor can "dn" be used in a searchfilter.
+
+2014-01-23 16:13:08: changed state open -> done
diff --git a/.werks/695 b/.werks/695
new file mode 100644
index 0000000..dbb0529
--- /dev/null
+++ b/.werks/695
@@ -0,0 +1,10 @@
+Title: Remove obsolete option -u, --cleanup-autochecks
+Level: 1
+Component: core
+Version: 1.2.5i1
+Date: 1390491224
+Class: incomp
+
+The option <tt>-u</tt> / <tt>--cleanup-autochecks</tt> has been
removed.
+Autocheck files in <tt>var/check_mk/autochecks</tt> are now always
+cleaned up (i.e. one file per host).
diff --git a/ChangeLog b/ChangeLog
index f8cb1d0..0d49002 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
* 0452 Speedup generation of configuration...
* 0124 Support multiline plugin output for Check_MK Checks...
* 0675 Activate inline SNMP per default (if available)...
+ * 0695 Remove obsolete option -u, --cleanup-autochecks...
+ NOTE: Please refer to the migration notes!
* 0087 FIX: Fixed possible locking issue when using datasource program with long
output...
* 0313 FIX: Avoid duplicate reading of configuration file on --create-rrd...
* 0379 FIX: check_mk -c: Now also rewrites the location of conf.d directory
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 28a2513..2d64184 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -252,7 +252,7 @@ inventory_check_severity = 1 # warning
inventory_check_do_scan = True # include SNMP scan for SNMP devices
inventory_max_cachefile_age = 120 # secs.
inventory_check_autotrigger = True # Automatically trigger inv-check after
automation-inventory
-always_cleanup_autochecks = True
+always_cleanup_autochecks = None # For compatiblity with old configuration
# Nagios templates and other settings concerning generation
# of Nagios configuration files. No need to change these values.
@@ -4508,9 +4508,8 @@ Copyright (C) 2009 Mathias Kettner
def usage():
print """WAYS TO CALL:
cmk [-n] [-v] [-p] HOST [IPADDRESS] check all services on HOST
- cmk [-u] -I [HOST ..] inventory - find new services
- cmk [-u] -II ... renew inventory, drop old services
- cmk -u, --cleanup-autochecks reorder autochecks files
+ cmk -I [HOST ..] inventory - find new services
+ cmk -II ... renew inventory, drop old services
cmk -N [HOSTS...] output Nagios configuration
cmk -B create configuration for core
cmk -C, --compile precompile host checks
@@ -4572,10 +4571,6 @@ NOTES:
-II does the same as -I but deletes all existing checks of the
specified types and hosts.
- -u, --cleanup-autochecks resorts all checks found by inventory
- into per-host files. It can be used as an options to -I or as
- a standalone operation.
-
-N outputs the Nagios configuration. You may optionally add a list
of hosts. In that case the configuration is generated only for
that hosts (useful for debugging).
@@ -5665,7 +5660,7 @@ def output_profile():
# Do option parsing and execute main function -
# if check_mk is not called as module
if __name__ == "__main__":
- short_options = 'SHVLCURODMmd:Ic:nhvpXPuNB'
+ short_options = 'SHVLCURODMmd:Ic:nhvpXPNB'
long_options = [ "help", "version", "verbose",
"compile", "debug",
"list-checks", "list-hosts",
"list-tag", "no-tcp", "cache",
"flush", "package", "localize",
"donate", "snmpwalk", "snmptranslate",
@@ -5673,7 +5668,7 @@ if __name__ == "__main__":
"snmpget=", "profile", "keepalive",
"keepalive-fd=", "create-rrd",
"no-cache", "update", "restart",
"reload", "dump", "fake-dns=",
"man", "nowiki", "config-check",
"backup=", "restore=",
- "check-inventory=", "paths",
"cleanup-autochecks", "checks=",
+ "check-inventory=", "paths",
"checks=",
"cmc-file=", "browse-man", "list-man",
"update-dns-cache" ]
non_config_options = ['-L', '--list-checks', '-P',
'--package', '-M', '--notify',
@@ -5713,8 +5708,6 @@ if __name__ == "__main__":
opt_showperfdata = True
elif o == '-n':
opt_dont_submit = True
- elif o in [ '-u', '--cleanup-autochecks' ]:
- opt_cleanup_autochecks = True
elif o == '--fake-dns':
fake_dns = a
elif o == '--keepalive':
@@ -5928,14 +5921,7 @@ if __name__ == "__main__":
for checkname in checknames:
make_inventory(checkname, hostnames, False)
- # -u, --cleanup-autochecks called in stand alone mode
- if opt_cleanup_autochecks or always_cleanup_autochecks:
- do_cleanup_autochecks()
- done = True
-
- if not done and opt_cleanup_autochecks: # -u as standalone option
do_cleanup_autochecks()
- done = True
if done:
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index c71c642..162fd60 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1256,14 +1256,6 @@ register_configvar(group,
need_restart = True
)
-register_configvar(group,
- "always_cleanup_autochecks",
- Checkbox(title = _("Always cleanup autochecks"),
- help = _("When switched on, Check_MK will always cleanup the autochecks
files "
- "after each inventory, i.e. create one file per host. This is
the same "
- "as adding the option <tt>-u</tt> to each call of
<tt>-I</tt> on the "
- "command line.")))
-
group = _("Check configuration")