Module: check_mk
Branch: master
Commit: aeae56c376a5dcd0b722ed44fec1e7db8a97765f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aeae56c376a5dc…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Jul 23 10:58:28 2018 +0200
6315 FIX mssql_backup: Fixed missing default levels
Change-Id: I1b3a13251dd8c03e2f737df514cadb7e2099701b
---
.werks/6315 | 14 ++++++++++++++
checks/mssql_backup | 16 ++++++++++++++--
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/.werks/6315 b/.werks/6315
new file mode 100644
index 0000000..9945d69
--- /dev/null
+++ b/.werks/6315
@@ -0,0 +1,14 @@
+Title: mssql_backup: Fixed missing default levels
+Level: 2
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1532171572
+
+Werk 6143 removed the empty default levels. The consequence was that
+all passive checks were gone because the default levels variable name
+was unknown to Check_MK und therefore the autochecks could not be read.
+This was introduced in Check_MK version in 1.5.0b8.
diff --git a/checks/mssql_backup b/checks/mssql_backup
index b431173..961dd66 100644
--- a/checks/mssql_backup
+++ b/checks/mssql_backup
@@ -47,6 +47,18 @@
# MSSQL_SQL0x msdb 2016-07-11 20:20:07 I
+factory_settings["mssql_backup_default_levels"] = {
+ "database": (None, None),
+ "database_diff": (None, None),
+ "log": (None, None),
+ "file_or_filegroup": (None, None),
+ "file_diff": (None, None),
+ "partial": (None, None),
+ "partial_diff": (None, None),
+ "unspecific": (None, None),
+}
+
+
def parse_mssql_backup(info):
def _parse_date_and_time(backup_date, backup_time):
try:
@@ -150,10 +162,10 @@ def check_mssql_backup(item, params, parsed):
check_info['mssql_backup'] = {
'parse_function' : parse_mssql_backup,
- 'inventory_function' : inventory_mssql_backup,
'check_function' : check_mssql_backup,
- 'default_levels_variable' : 'mssql_backup_default_levels',
+ 'inventory_function' : inventory_mssql_backup,
'service_description' : 'MSSQL %s Backup',
'has_perfdata' : True,
'group' : 'mssql_backup',
+ 'default_levels_variable' : 'mssql_backup_default_levels',
}