Module: check_mk
Branch: master
Commit: b3a912d3e539dfb659c21783b799e6b15754cddd
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b3a912d3e539df…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jan 22 09:37:04 2014 +0100
Activate inline SNMP per default (if available)
If the inline implementation of SNMP is available (in our subscription
builds) then it is now activated per default. Inline SNMP saves about
50% of the CPU ressources when monitoring hosts via SNMP.
---
.werks/675 | 10 ++++++++++
ChangeLog | 1 +
modules/check_mk.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/675 b/.werks/675
new file mode 100644
index 0000000..da01444
--- /dev/null
+++ b/.werks/675
@@ -0,0 +1,10 @@
+Title: Activate inline SNMP per default (if available)
+Level: 2
+Component: core
+Version: 1.2.5i1
+Date: 1390379776
+Class: feature
+
+If the inline implementation of SNMP is available (in our subscription
+builds) then it is now activated per default. Inline SNMP saves about
+50% of the CPU ressources when monitoring hosts via SNMP.
diff --git a/ChangeLog b/ChangeLog
index 7ea2049..1197778 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* 0386 Added all active checks to check_mk -L output...
* 0452 Speedup generation of configuration...
* 0124 Support multiline plugin output for Check_MK Checks...
+ * 0675 Activate inline SNMP per default (if available)...
* 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 0c03c6a..28a2513 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -239,7 +239,7 @@ max_num_processes = 50
# SNMP communities and encoding
has_inline_snmp = False # is set to True by inline_snmp module, when available
-use_inline_snmp = False
+use_inline_snmp = True
snmp_default_community = 'public'
snmp_communities = []
snmp_timing = []
Module: check_mk
Branch: master
Commit: 59fdcffeb7398adab5858a496f4ebae093f447c8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=59fdcffeb7398a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Jan 21 17:51:19 2014 +0100
FIX Fixed incorrect formatting of checks with long output
Long output in check_mk checks was not formatted accordingly.
Newlines within a checks output are now escaped correctly: \n -> \\n
The incorrect formatting in previous versions could lead to missing long output texts in the monitoring core.
---
.werks/260 | 12 ++++++++++++
ChangeLog | 2 +-
modules/check_mk_base.py | 3 +++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/260 b/.werks/260
new file mode 100644
index 0000000..6e34f34
--- /dev/null
+++ b/.werks/260
@@ -0,0 +1,12 @@
+Title: Fixed incorrect formatting of checks with long output
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1390322620
+
+Long output in check_mk checks was not formatted accordingly.
+Newlines within a checks output are now escaped correctly: \n -> \\n
+
+The incorrect formatting in previous versions could lead to missing long output texts in the monitoring core.
diff --git a/ChangeLog b/ChangeLog
index ff848c2..e0257f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -123,6 +123,7 @@
* 0432 FIX: stulz_humidity: Fixed syntax error...
* 0120 FIX: stulz_humidity, apc_humidity: Fixed bug while processing check params...
* 0460 FIX: endless waiting for printer queues fixed...
+ * 0260 FIX: Fixed incorrect formatting of checks with long output...
Multisite:
* 0371 Added log class filter to hostsvcevents view
@@ -171,7 +172,6 @@
* 0428 Changed user profiles (e.g. pw changes) are now replicated in distributed setups...
* 0114 User Custom Attributes can now be exported to the core...
* 0448 New button in WATO service list for displaying check parameters...
- * 0353 New button in service list for refreshing all services...
* 0057 FIX: Fix exception in WATO host editor on custom tag without topic...
* 0241 FIX: Improved sorting of WATO folders in dropdown menu...
* 0019 FIX: Fixed wording in WATO rule for MSSQL check
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index ea3ea0f..72f7160 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1287,6 +1287,7 @@ def submit_to_core(host, service, state, output):
# Replace \n to enable multiline ouput
output = output.replace('\n', '\\n')
if monitoring_core == "cmc":
+ output = output.replace("\n", "\x01", 1).replace("\n","\\n")
result = "\t%d\t%s\t%s\n" % (state, service, output.replace("\0", "")) # remove binary 0, CMC does not like it
if opt_keepalive:
global total_check_output
@@ -1297,6 +1298,7 @@ def submit_to_core(host, service, state, output):
# Send to Nagios/Icinga command pipe
elif check_submission == "pipe":
+# output = output.replace("\n", "\\n")
open_command_pipe()
if nagios_command_pipe:
nagios_command_pipe.write("[%d] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%d;%s\n" %
@@ -1307,6 +1309,7 @@ def submit_to_core(host, service, state, output):
# Create check result files for Nagios/Icinga
elif check_submission == "file":
+# output = output.replace("\n", "\\n")
open_checkresult_file()
if checkresult_file_fd:
now = time.time()
Module: check_mk
Branch: master
Commit: 094b264a622d85667c0c323381ffb85e63e875a7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=094b264a622d85…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Tue Jan 21 17:47:29 2014 +0100
fileinfo.groups: file groups now allow exclude patterns as well
---
.werks/570 | 8 ++++++++
ChangeLog | 3 ++-
checkman/fileinfo.groups | 27 +++++++++++++++++--------
checks/fileinfo | 13 +++++++-----
web/plugins/wato/check_parameters.py | 37 +++++++++++++++++++++-------------
5 files changed, 60 insertions(+), 28 deletions(-)
diff --git a/.werks/570 b/.werks/570
new file mode 100644
index 0000000..786f94d
--- /dev/null
+++ b/.werks/570
@@ -0,0 +1,8 @@
+Title: fileinfo.groups: file groups now allow exclude patterns as well
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1390322713
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 367c754..dfbe039 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -55,6 +55,7 @@
* 0461 emcvnx_raidgroups.list_luns: New check for EMC VNX storage system...
* 0462 emcvnx_raidgroups.list_disks: New check for EMC VNX storage system...
* 0463 emcvnx_raidgroups.capacity, emcvnx_raidgroups.capacity_contiguous: New Checks for EMC VNX Storage systems...
+ * 0570 fileinfo.groups: file groups now allow exclude patterns as well
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
@@ -154,8 +155,8 @@
* 0425 FIX: Fix login loop bug in distributed environments with different auth secrets
* 0117 FIX: Availability button is now visible for users without the right to edit views
* 0431 FIX: LDAP: Fixed group syncrhonisation when nested group sync is enabled
- * 0569 FIX: recurring updates of serial numbers of disabled ldap users fixed...
* 0122 FIX: Multisite view editor not longer throwing a exception when loading views from other users
+ * 0569 FIX: recurring updates of serial numbers of disabled ldap users fixed...
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/checkman/fileinfo.groups b/checkman/fileinfo.groups
index 1c4eea8..04d3b03 100644
--- a/checkman/fileinfo.groups
+++ b/checkman/fileinfo.groups
@@ -5,28 +5,39 @@ license: GPL
distribution: check_mk
description:
This check monitors the size, age and the count of a group of files
- in the target host's filesystem.
- You can set lower and upper
+ in the target host's filesystem. You can set lower and upper
limits for each: size of files, age of oldest, the newest file
and for the total count of files.
- This check needs some configuration in the agent,
- as the agent needs to know the information about
- which files need to be sent.
+ This check needs some configuration in the agent, as the agent needs to
+ know the information about which files need to be sent. Please refer to
+ fileinfos manpage for information about setting up the agent.
- Please refer to fileinfos manpage for information
- about setting up the agent
+ The check also needs a configured file grouping pattern. File grouping
+ patterns combine a simple pattern based on {*} and {?} to join a subset
+ of the file names send by the agent into a file group. In addition an
+ {exclude} pattern may be define to exclude certain filenames.
+ The name of the file group is referenced in the check configuration
+ as the item.
item:
- Configured name of the filesize group
+ Configured name of the file group
examples:
+# old syntax of file group patterns, still valid
fileinfo_groups = [
([("Auth_group",r"/var/log/auth*")], ALL_HOSTS),
([("Message_group", r"/var/log/messages*")], ['test2'], ALL_HOSTS),
]
+# new syntax of file group patterns, including exclude pattern
+ fileinfo_groups = [
+ ([("Auth_group", ("/var/log/auth*","/var/log/*.debug"))], ALL_HOSTS),
+ ([("Message_group", ("/var/log/messages*",""))], ['test2'], ALL_HOSTS),
+ ]
+
+# syntax of check
check_parameters = [
({
"minsize": (200.0, 300.0),
diff --git a/checks/fileinfo b/checks/fileinfo
index df28a08..7907fdf 100644
--- a/checks/fileinfo
+++ b/checks/fileinfo
@@ -65,7 +65,10 @@ def fileinfo_groups_of_file(check_filename):
groups = []
for line in host_extra_conf(g_hostname, fileinfo_groups):
for group_name, pattern in line:
- if fnmatch.fnmatch(check_filename, pattern):
+ if type(pattern) == str:
+ pattern = ( pattern, '' )
+ if fnmatch.fnmatch(check_filename, pattern[0]) \
+ and not fnmatch.fnmatch(check_filename, pattern[1]):
groups.append(group_name)
return groups
@@ -94,14 +97,13 @@ def check_fileinfo(item, params, info):
# Constructs simple list of patterns and makes them available for the check
def fileinfo_groups_precompile(hostname, item, params):
patterns = []
-
for line in host_extra_conf(hostname, fileinfo_groups):
for group_name, pattern in line:
if group_name == item:
+ if type(pattern) == str:
+ pattern = ( pattern, '' )
patterns.append(pattern)
-
params['precompiled_patterns'] = patterns
-
return params
def check_fileinfo_groups(item, params, info):
@@ -126,7 +128,8 @@ def check_fileinfo_groups(item, params, info):
# Start counting all values
for line in info[1:]:
for pattern in params['precompiled_patterns']:
- if fnmatch.fnmatch(line[0], pattern) and str(line[1]) != 'missing':
+ if fnmatch.fnmatch(line[0], pattern[0]) and str(line[1]) != 'missing' \
+ and not fnmatch.fnmatch(line[0], pattern[1]):
size = int(line[1])
size_all += size
if size_smallest == None:
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index a54a578..5ee83ba 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -899,6 +899,7 @@ register_rule(group + '/' + subgroup_storage,
),
match = 'all',
)
+
register_rule(group + '/' + subgroup_storage,
varname = "fileinfo_groups",
title = _('File Grouping Patterns'),
@@ -915,20 +916,28 @@ register_rule(group + '/' + subgroup_storage,
'of single services for each file. This rule also applies when '
'you use manually configured checks instead of inventorized ones.'),
valuespec = ListOf(
- Tuple(
- help = _("This defines one file grouping pattern"),
- show_titles = True,
- orientation = "horizontal",
- elements = [
- TextAscii(
- title = _("Name of group"),
- ),
- TextAscii(
- title = _("File pattern (using * and ?)"),
- ),
- ]
- ),
- add_label = _("Add pattern"),
+ Tuple(
+ help = _("This defines one file grouping pattern"),
+ show_titles = True,
+ orientation = "horizontal",
+ elements = [
+ TextAscii(
+ title = _("Name of group"),
+ ),
+ Transform(
+ Tuple(
+ show_titles = True,
+ orientation = "vertical",
+ elements = [
+ TextAscii(title = _("Include Pattern")),
+ TextAscii(title = _("Exclude Pattern"))
+ ],
+ ),
+ forth = lambda params: type(params) == str and ( params, '' ) or params
+ ),
+ ],
+ ),
+ add_label = _("Add pattern group"),
),
match = 'all',
)
Module: check_mk
Branch: master
Commit: d14350f81a933d2978f99ebc55bb37de09b33e1f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d14350f81a933d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 18 11:45:17 2013 +0100
New button in service list for refreshing all services
In the list of a hosts's services there is now always a new button <i>Automatic
Refresh (Tabula Rasa)</i>. This button does the same as the bulk inventory
with the Tabula Rasa option, but just for that single host: It removes all
autochecks and reinventorizes the host. This is a conveniant way to reset
network interface checks to OK after some ports have changed from down to
up or vice versa. Also changes in the mount options of Linux filesystems
can thus be acknowledged.
Conflicts:
ChangeLog
web/htdocs/wato.py
---
.bugs/741 | 6 ++++--
.werks/353 | 14 ++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 21 +++++++++------------
4 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/.bugs/741 b/.bugs/741
index c1b68d7..b1b0fb7 100644
--- a/.bugs/741
+++ b/.bugs/741
@@ -1,9 +1,9 @@
Title: Refreshing autochecks in wato
Component: wato
-State: open
+Class: nastiness
+State: done
Date: 2012-09-19 11:58:31
Targetversion: 1.4.0
-Class: nastiness
If for example mount options of a services changes, there is no way in the
wato service section to refresh the autochecks to use the new options
@@ -11,3 +11,5 @@ wato service section to refresh the autochecks to use the new options
Resolution: Make next to [Save manual check configuration] a new button
[Refresh all services], that does a complete reinventory (like cmk -II,
but should only refresh services that are already there!!!)
+
+2013-12-18 11:43:05: changed state open -> done
diff --git a/.werks/353 b/.werks/353
new file mode 100644
index 0000000..7b6426b
--- /dev/null
+++ b/.werks/353
@@ -0,0 +1,14 @@
+Title: New button in service list for refreshing all services
+Level: 2
+Component: wato
+Version: 1.2.4b1
+Date: 1387363388
+Class: feature
+
+In the list of a hosts's services there is now always a new button <i>Automatic
+Refresh (Tabula Rasa)</i>. This button does the same as the bulk inventory
+with the Tabula Rasa option, but just for that single host: It removes all
+autochecks and reinventorizes the host. This is a conveniant way to reset
+network interface checks to OK after some ports have changed from down to
+up or vice versa. Also changes in the mount options of Linux filesystems
+can thus be acknowledged.
diff --git a/ChangeLog b/ChangeLog
index ea44f79..19446f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -170,6 +170,7 @@
* 0428 Changed user profiles (e.g. pw changes) are now replicated in distributed setups...
* 0114 User Custom Attributes can now be exported to the core...
* 0448 New button in WATO service list for displaying check parameters...
+ * 0353 New button in service list for refreshing all services...
* 0057 FIX: Fix exception in WATO host editor on custom tag without topic...
* 0241 FIX: Improved sorting of WATO folders in dropdown menu...
* 0019 FIX: Fixed wording in WATO rule for MSSQL check
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4bc1877..481de8b 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2457,9 +2457,6 @@ def mode_inventory(phase, firsttime):
return
cache_options = html.var("_scan") and [ '@scan' ] or [ '@noscan' ]
- table = check_mk_automation(host[".siteid"], "try-inventory", cache_options + [hostname])
- table.sort()
- active_checks = {}
new_target = "folder"
if html.var("_refresh"):
@@ -2486,16 +2483,15 @@ def mode_inventory(phase, firsttime):
active_checks[(ct, item)] = paramstring
if st == "clustered":
active_checks[(ct, item)] = paramstring
- if st == "clustered":
- active_checks[(ct, item)] = paramstring
- check_mk_automation(host[".siteid"], "set-autochecks", [hostname], active_checks)
- if host.get("inventory_failed"):
- del host["inventory_failed"]
- save_hosts()
- message = _("Saved check configuration of host [%s] with %d services") % \
- (hostname, len(active_checks))
- log_pending(LOCALRESTART, hostname, "set-autochecks", message)
+ check_mk_automation(host[".siteid"], "set-autochecks", [hostname], active_checks)
+ if host.get("inventory_failed"):
+ del host["inventory_failed"]
+ save_hosts()
+ message = _("Saved check configuration of host [%s] with %d services") % \
+ (hostname, len(active_checks))
+ log_pending(LOCALRESTART, hostname, "set-autochecks", message)
+
mark_affected_sites_dirty(g_folder, hostname, sync=False, restart=True)
return new_target, message
return "folder"
@@ -2546,6 +2542,7 @@ def show_service_table(host, firsttime):
if len(checktable) > 0:
html.button("_save", _("Save manual check configuration"))
+ html.button("_refresh", _("Automatic Refresh (Tabula Rasa)"))
html.write(" ")
if parameter_column:
Module: check_mk
Branch: master
Commit: 38976b2f617376da9a34953eb98c827ddec7f519
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=38976b2f617376…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Jan 21 14:33:46 2014 +0100
Support multiline plugin output for Check_MK Checks
Check_MK checks can now return multiline ouput by just using the \n in it ouput.
---
.werks/124 | 8 ++++++++
ChangeLog | 3 ++-
modules/check_mk_base.py | 2 ++
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/124 b/.werks/124
new file mode 100644
index 0000000..dea32bf
--- /dev/null
+++ b/.werks/124
@@ -0,0 +1,8 @@
+Title: Support multiline plugin output for Check_MK Checks
+Level: 2
+Component: core
+Version: 1.2.5i1
+Date: 1390310917
+Class: feature
+
+Check_MK checks can now return multiline ouput by just using the \n in it ouput.
diff --git a/ChangeLog b/ChangeLog
index 82a883e..ea44f79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
Core & Setup:
* 0386 Added all active checks to check_mk -L output...
* 0452 Speedup generation of configuration...
+ * 0124 Support multiline plugin output for Check_MK Checks...
* 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
@@ -155,8 +156,8 @@
* 0425 FIX: Fix login loop bug in distributed environments with different auth secrets
* 0117 FIX: Availability button is now visible for users without the right to edit views
* 0431 FIX: LDAP: Fixed group syncrhonisation when nested group sync is enabled
- * 0569 FIX: recurring updates of serial numbers of disabled ldap users fixed...
* 0122 FIX: Multisite view editor not longer throwing a exception when loading views from other users
+ * 0569 FIX: recurring updates of serial numbers of disabled ldap users fixed...
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index c2522d0..ea3ea0f 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1284,6 +1284,8 @@ def submit_check_result(host, servicedesc, result, sa):
def submit_to_core(host, service, state, output):
# Save data for sending it to the Check_MK Micro Core
+ # Replace \n to enable multiline ouput
+ output = output.replace('\n', '\\n')
if monitoring_core == "cmc":
result = "\t%d\t%s\t%s\n" % (state, service, output.replace("\0", "")) # remove binary 0, CMC does not like it
if opt_keepalive:
Module: check_mk
Branch: master
Commit: 2be1976ee6714ca74a77ab93d99afc6407fd2e26
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2be1976ee6714c…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Jan 21 12:31:44 2014 +0100
New time range filter for Downtimes and Comments
---
.werks/123 | 8 ++++++++
ChangeLog | 1 +
web/plugins/views/filters.py | 3 ++-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/123 b/.werks/123
new file mode 100644
index 0000000..d0dc3dc
--- /dev/null
+++ b/.werks/123
@@ -0,0 +1,8 @@
+Title: New time range filter for Downtimes and Comments
+Level: 1
+Component: multisite
+Version: 1.2.5i1
+Date: 1390303340
+Class: feature
+
+With the two new filters it is possible to filter list of comments or the list of downtimes for a special time range
diff --git a/ChangeLog b/ChangeLog
index 1c1ce3a..9ea09f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -131,6 +131,7 @@
* 0430 It is now possible to define custom time ranges in PNP graph search...
* 0449 Show all custom variables of hosts and services in the detail views...
* 0665 Added mail notificaton method to custom user notification dialog...
+ * 0123 New time range filter for Downtimes and Comments...
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
* 0239 FIX: Fixed incorrect html formatting when displaying host or service comments...
* 0307 FIX: Increased performance of multisite GUI with a large userbase...
diff --git a/web/plugins/views/filters.py b/web/plugins/views/filters.py
index 36663ee..5e00808 100644
--- a/web/plugins/views/filters.py
+++ b/web/plugins/views/filters.py
@@ -606,7 +606,8 @@ declare_filter(251, FilterTime("service", "svc_last_check", _("Last service chec
declare_filter(250, FilterTime("host", "host_last_state_change", _("Last host state change"), "host_last_state_change"))
declare_filter(251, FilterTime("host", "host_last_check", _("Last host check"), "host_last_check"))
-
+declare_filter(253, FilterTime("comment", "comment_entry_time", _("Time of comment"), "comment_entry_time" ))
+declare_filter(253, FilterTime("downtime", "downtime_entry_time", _("Time of Downtime"), "downtime_entry_time" ))
# _
# | | ___ __ _
# | | / _ \ / _` |