Module: check_mk
Branch: master
Commit: 5ca1f935c6b7d231cd9115746d946b92375a50f9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ca1f935c6b7d2…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Nov 7 09:03:13 2014 +0100
#1448 domino_info: check is extended to also show and monitor the lnNotesServerState
---
.werks/1448 | 9 +++++++++
ChangeLog | 1 +
checkman/domino_info | 15 +++++++++++----
checks/domino_info | 28 +++++++++++++++++++++++-----
4 files changed, 44 insertions(+), 9 deletions(-)
diff --git a/.werks/1448 b/.werks/1448
new file mode 100644
index 0000000..c83b530
--- /dev/null
+++ b/.werks/1448
@@ -0,0 +1,9 @@
+Title: domino_info: check is extended to also show and monitor the lnNotesServerState
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1415347315
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index bd15e6a..eb99d58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
* 1432 agent_vsphere: now able to monitor virtual machines snapshots...
* 1507 New optional parse_function for check API...
* 1445 quantum_libsmall_door, quantum_libsmall_status: Two new checks for monitoring small Quantum tape libraries
+ * 1448 domino_info: check is extended to also show and monitor the lnNotesServerState
* 1478 FIX: kernel.util, statgrab_cpu: fix computation of utilization...
* 1480 FIX: brocade_vdx_status: disable check on some devices that do not support it...
* 1485 FIX: dell_om_disks, dell_om_esmlog, dell_om_mem, dell_om_processors, dell_om_sensors: detect more devices...
diff --git a/checkman/domino_info b/checkman/domino_info
index 6464205..d790d22 100644
--- a/checkman/domino_info
+++ b/checkman/domino_info
@@ -4,7 +4,14 @@ catalog: app/lotusnotes
license: GPL
distribution: check_mk
description:
- This check uses snmp to extract the following informational data about a
- Lotus Notes Server: {lnServerName} the server name, {lnMailDomain} the server
- domain, {lnServerNotesVersion} the Lotus Notes version. No configuration and
- no limits can be set in this check.
+
+ This check uses snmp to extract the following information about a Lotus
+ Domino Server from the Notes-MIB: {lnNotesServerState} the overall
+ state, {lnServerName} the server name, {lnMailDomain} the server domain,
+ {lnServerNotesVersion} the Lotus Domino version.
+
+ The state of the check is determined from the {lnNotesServerState}. A state of
+ 1:{up} leads to an OK state, states 2-4:{down, not_responding, crashed}
+ lead to a critical state, otherwise the state is warning.
+
+ No configuration and no limits can be set in this check.
diff --git a/checks/domino_info b/checks/domino_info
index 4055dbc..8754b0a 100644
--- a/checks/domino_info
+++ b/checks/domino_info
@@ -27,20 +27,37 @@
# Example SNMP walk:
#
+# .1.3.6.1.4.1.334.72.2.2.0 1
# .1.3.6.1.4.1.334.72.1.1.4.8.0 MEDEMA
# .1.3.6.1.4.1.334.72.1.1.6.2.1.0 CN=HH-BK4/OU=SRV/O=MEDEMA/C=DE
# .1.3.6.1.4.1.334.72.1.1.6.2.4.0 Release 8.5.3FP5 HF89
+domino_info_states = {
+ '1' : 'up',
+ '2' : 'down',
+ '3' : 'not-responding',
+ '4' : 'crashed',
+ '5' : 'unknown'
+}
+
def inventory_domino_info(info):
- if info and len(info) == 3:
+ if info and len(info[0]) != 0:
yield None, None
def check_domino_info(_no_item, _no_params, info):
- if len(info) == 3:
- domain, name, release = info
- infotext = "Name: %s, Domain: %s, %s" % ( domain[0][0], name[0][0], release[0][0] )
- yield 0, infotext
+ serverstate, domain, name, release = info
+ if int(serverstate[0][0]) > 4:
+ state = 1
+ infotext = "Server is %s" % ( domino_info_states[serverstate[0][0]] )
+ elif int(serverstate[0][0]) > 1:
+ state = 2
+ infotext = "Server is %s" % ( domino_info_states[serverstate[0][0]] )
+ else:
+ state = 0
+ infotext = "Server is %s. Domain: %s, Name: %s, %s" \
+ % ( domino_info_states[serverstate[0][0]], domain[0][0], name[0][0], release[0][0] )
+ yield state, infotext
check_info['domino_info'] = {
"check_function" : check_domino_info,
@@ -49,6 +66,7 @@ check_info['domino_info'] = {
"service_description" : "Domino Info",
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.311.1.1.3.1.2",
"snmp_info" : [
+ [ ".1.3.6.1.4.1.334.72.2", [ 2 ] ], # lnNotesServerState
[ ".1.3.6.1.4.1.334.72.1.1.4", [ 8 ] ], # lnMailDomain
[ ".1.3.6.1.4.1.334.72.1.1.6.2", [ 1 ] ], # lnServerName
[ ".1.3.6.1.4.1.334.72.1.1.6.2", [ 4 ] ], # lnServerNotesVersion
Module: check_mk
Branch: master
Commit: 7f60654e4d11e5bc5fad5515e531d630d1c783c9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7f60654e4d11e5…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Nov 6 17:32:54 2014 +0100
Updated bug entries #1011
---
.bugs/1011 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.bugs/1011 b/.bugs/1011
index acb15f4..916b26d 100644
--- a/.bugs/1011
+++ b/.bugs/1011
@@ -5,6 +5,7 @@ Date: 2014-11-05 22:49:22
Targetversion: future
Class: nastiness
-logging behaviour can be configured in several places in wato (e.g. global settings), however it is neven mentioned where the actual logfiles can be found, and
+logging behaviour can be configured in several places in wato (e.g. global settings),
+however it is often not mentioned where the actual logfiles can be found, and
paths are not at all intuitive. It would be of great benefit to the users to
mention the location of the log whenever logging behaviour can be configured.
Module: check_mk
Branch: master
Commit: bf031c0bf4980c0c6ba4c2d8e3894ef433140a32
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bf031c0bf4980c…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Nov 6 17:31:19 2014 +0100
Updated bug entries #1014
---
.bugs/1014 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.bugs/1014 b/.bugs/1014
new file mode 100644
index 0000000..e080d40
--- /dev/null
+++ b/.bugs/1014
@@ -0,0 +1,9 @@
+Title: some global settings show a help text when hovering over them, some dont
+Component: wato
+State: open
+Date: 2014-11-06 17:28:13
+Targetversion: future
+Class: nastiness
+
+most of the global settings show a help text when clicking on the settings line, however only some of these
+also show the help text when hovering over the line. hovering should work for all the global settings.
Module: check_mk
Branch: master
Commit: 18edaf3e80936ec35a1f7b1338ea2baf46797fe1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=18edaf3e80936e…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Nov 6 17:14:08 2014 +0100
Updated bug entries #1012, #1013
---
.bugs/1012 | 9 +++++++++
.bugs/1013 | 8 ++++++++
2 files changed, 17 insertions(+)
diff --git a/.bugs/1012 b/.bugs/1012
new file mode 100644
index 0000000..4a765fa
--- /dev/null
+++ b/.bugs/1012
@@ -0,0 +1,9 @@
+Title: wato list of rules: display used rulesets in different color
+Component: wato
+State: open
+Date: 2014-11-06 17:04:46
+Targetversion: future
+Class: feature
+
+In the various rule listings it would be extremly useful if used rules sets
+are shown in a different color than unused rulesets.
diff --git a/.bugs/1013 b/.bugs/1013
new file mode 100644
index 0000000..87a85d2
--- /dev/null
+++ b/.bugs/1013
@@ -0,0 +1,8 @@
+Title: make search in global settings possible
+Component: wato
+State: open
+Date: 2014-11-06 17:12:22
+Targetversion: future
+Class: feature
+
+a search feature for global settings would be very helpful
quantum_libsmall_status:
Two new checks for monitoring small Quantum
tape libraries
Message-ID: <545b96c5.drR3YGrRZ8DzD2M2%kb(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Module: check_mk
Branch: master
Commit: 5305c7df5992cf36ee10b90550305fe6ac128574
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5305c7df5992cf…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Nov 6 16:41:47 2014 +0100
#1445 quantum_libsmall_door, quantum_libsmall_status: Two new checks for monitoring small Quantum tape libraries
---
.werks/1445 | 9 +++++
ChangeLog | 1 +
checkman/quantum_libsmall_door | 11 ++++++
checkman/quantum_libsmall_status | 13 +++++++
checks/quantum_libsmall_door | 50 ++++++++++++++++++++++++
checks/quantum_libsmall_status | 78 ++++++++++++++++++++++++++++++++++++++
modules/catalog.py | 1 +
7 files changed, 163 insertions(+)
diff --git a/.werks/1445 b/.werks/1445
new file mode 100644
index 0000000..71a0392
--- /dev/null
+++ b/.werks/1445
@@ -0,0 +1,9 @@
+Title: quantum_libsmall_door, quantum_libsmall_status: Two new checks for monitoring small Quantum tape libraries
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1415288440
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 066e6cb..bd15e6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
NOTE: Please refer to the migration notes!
* 1432 agent_vsphere: now able to monitor virtual machines snapshots...
* 1507 New optional parse_function for check API...
+ * 1445 quantum_libsmall_door, quantum_libsmall_status: Two new checks for monitoring small Quantum tape libraries
* 1478 FIX: kernel.util, statgrab_cpu: fix computation of utilization...
* 1480 FIX: brocade_vdx_status: disable check on some devices that do not support it...
* 1485 FIX: dell_om_disks, dell_om_esmlog, dell_om_mem, dell_om_processors, dell_om_sensors: detect more devices...
diff --git a/checkman/quantum_libsmall_door b/checkman/quantum_libsmall_door
new file mode 100644
index 0000000..a75e832
--- /dev/null
+++ b/checkman/quantum_libsmall_door
@@ -0,0 +1,11 @@
+title: Door status of small Quantum tape libraries
+agents: snmp
+catalog: hw/storagehw/quantum
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the main door of small Quantum tape libraries.
+ An open door triggers a critical status.
+
+inventory:
+ One service for each small Quantum tape library is created.
diff --git a/checkman/quantum_libsmall_status b/checkman/quantum_libsmall_status
new file mode 100644
index 0000000..d44c109
--- /dev/null
+++ b/checkman/quantum_libsmall_status
@@ -0,0 +1,13 @@
+title: Status of small Quantum tape libraries
+agents: snmp
+catalog: hw/storagehw/quantum
+license: GPL
+distribution: check_mk
+description:
+ This check monitors several status variables of small Quantum tape libraries.
+ Currently supported are:
+ Power, Cooling, Control, Connectivity, Robotics, Media, Drive and Operator action request.
+ Operator action request goes critical if flagged and OK otherwise.
+
+inventory:
+ One service for each small Quantum tape library is created.
diff --git a/checks/quantum_libsmall_door b/checks/quantum_libsmall_door
new file mode 100644
index 0000000..cd4d1ea
--- /dev/null
+++ b/checks/quantum_libsmall_door
@@ -0,0 +1,50 @@
+#!/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.
+
+
+def inventory_quantum_libsmall_door(info):
+ if info:
+ return [ (None, None) ]
+
+
+def check_quantum_libsmall_door(_no_item, _no_params, info):
+ if info[0][0] == "1":
+ return 2, "Library door open"
+ elif info[0][0] == "2":
+ return 0, "Library door closed"
+ else:
+ return 3, "Library door status unknown"
+
+
+
+check_info['quantum_libsmall_door'] = {
+ "check_function" : check_quantum_libsmall_door,
+ "inventory_function" : inventory_quantum_libsmall_door,
+ "service_description" : "Tape library door",
+ "snmp_info" : (".1.3.6.1.4.1.3697.1.10.10.1.15.2", [ "0" ]),
+ "snmp_scan_function" : lambda oid: "library" in oid(".1.3.6.1.2.1.1.1.0").lower(),
+}
+
diff --git a/checks/quantum_libsmall_status b/checks/quantum_libsmall_status
new file mode 100644
index 0000000..abe9377
--- /dev/null
+++ b/checks/quantum_libsmall_status
@@ -0,0 +1,78 @@
+#!/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.
+
+
+def inventory_quantum_libsmall_status(info):
+ if info:
+ return [ (None, None) ]
+
+
+def check_quantum_libsmall_status(_no_item, _no_params, info):
+
+ ras_status = {
+ 1 : (0, "good"),
+ 2 : (2, "failed"),
+ 3 : (2, "degraded"),
+ 4 : (1, "warning"),
+ 5 : (0, "informational"),
+ 6 : (3, "unknown"),
+ 7 : (3, "invalid"),
+ }
+
+ opneed_status = {
+ 0 : (0, "no"),
+ 1 : (2, "yes"),
+ }
+
+ oidtothing = {
+ "1" : (ras_status, "Power"),
+ "2" : (ras_status, "Cooling"),
+ "3" : (ras_status, "Control"),
+ "4" : (ras_status, "Connectivity"),
+ "5" : (ras_status, "Robotics"),
+ "6" : (ras_status, "Media"),
+ "7" : (ras_status, "Drive"),
+ "8" : (opneed_status, "Operator action request"),
+ }
+
+ for oidend, devstate in info:
+ stateint = int(devstate)
+ interpret, thing = oidtothing[oidend[0]]
+ status, statname = interpret[stateint]
+ yield status, thing + ": " + statname
+
+
+check_info['quantum_libsmall_status'] = {
+ "check_function" : check_quantum_libsmall_status,
+ "inventory_function" : inventory_quantum_libsmall_status,
+ "service_description" : "Tape library status",
+ "snmp_info" : (".1.3.6.1.4.1.3697.1.10.10.1.15", [
+ OID_END,
+ "10",
+ ]),
+ "snmp_scan_function" : lambda oid: "library" in oid(".1.3.6.1.2.1.1.1.0").lower(),
+}
+
diff --git a/modules/catalog.py b/modules/catalog.py
index c62e5d7..7362bb9 100644
--- a/modules/catalog.py
+++ b/modules/catalog.py
@@ -82,6 +82,7 @@ manpage_catalog_titles = {
"hitachi" : "Hitachi",
"emc" : "EMC",
"qlogic" : "QLogic",
+ "quantum" : "Quantum",
"phone" : "Telephony",
"app" : "Applications",
Module: check_mk
Branch: master
Commit: 3d79c7b0728702f8d3b2d243118b74ac2d884e10
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d79c7b0728702…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Nov 6 15:46:36 2014 +0100
#1203 FIX veeam_client: Now supports multiple Backups for one host
Before the check only supported one backup per host, so no item was needed. Now the check supports multiple Backups.
This means, now a item is in used. A reinventory is now necessary. Also you need to renew you Wato rule (if one).
---
.werks/1203 | 11 ++++++++
ChangeLog | 2 ++
checks/veeam_client | 46 ++++++++++++++++++++++++++--------
web/plugins/wato/check_parameters.py | 4 +--
4 files changed, 51 insertions(+), 12 deletions(-)
diff --git a/.werks/1203 b/.werks/1203
new file mode 100644
index 0000000..0b49f6c
--- /dev/null
+++ b/.werks/1203
@@ -0,0 +1,11 @@
+Title: veeam_client: Now supports multiple Backups for one host
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.5i7
+Date: 1415285052
+Class: fix
+
+Before the check only supported one backup per host, so no item was needed. Now the check supports multiple Backups.
+This means, now a item is in used. A reinventory is now necessary. Also you need to renew you Wato rule (if one).
+
diff --git a/ChangeLog b/ChangeLog
index 38274fb..7e7e81d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,8 @@
* 1485 FIX: dell_om_disks, dell_om_esmlog, dell_om_mem, dell_om_processors, dell_om_sensors: detect more devices...
* 1202 FIX: cisco_power, cisco_temp_perf: Both checks now using a new service description...
NOTE: Please refer to the migration notes!
+ * 1203 FIX: veeam_client: Now supports multiple Backups for one host...
+ NOTE: Please refer to the migration notes!
Multisite:
* 1164 FIX: Fixed links from servicegroup overviews to single servicegroups
diff --git a/checks/veeam_client b/checks/veeam_client
index af6671d..92f3cdc 100644
--- a/checks/veeam_client
+++ b/checks/veeam_client
@@ -28,14 +28,38 @@ factory_settings["veeam_client"] = {
"age": ( 108000, 172800 ), # 30h/2d
}
-def inventory_veeam_client(info):
- if info[0][0] == "Status":
- return [ (None, {} ) ]
-
-def check_veeam_client(item, params, info):
- if not info[0][0] == "Status":
- return 3, "No status data found in first line of agent data"
- data = dict(info[:-1])
+def parse_veeam_client(info):
+ data = {}
+ for line in info:
+ if line[0] == "Status":
+ if len(line) == 2:
+ last_status = line[1]
+ else:
+ # Prevent empty entries
+ last_status = False
+ elif line[0] == 'JobName':
+ if last_status:
+ last_found = line[1]
+ data[last_found] = {}
+ data[last_found]['Status'] = last_status
+ else:
+ if last_status and len(line) == 2:
+ data[last_found][line[0]] = line[1]
+ return data
+
+
+def inventory_veeam_client(parsed):
+ for job in parsed.keys():
+ yield job, {}
+
+def check_veeam_client(item, params, parsed):
+ # Fallback for old None item version
+ #FIXME Can be remvoed in CMK 2.0
+ if item == None:
+ key = parsed.keys()[0]
+ data = parsed[key]
+ else:
+ data = parsed[item]
perfdata = []
infotexts = []
@@ -49,7 +73,8 @@ def check_veeam_client(item, params, info):
infotexts.append("Status: %s" % data['Status'] )
# Only output the Job name
- infotexts.append("Job: %s" % data['JobName'] )
+ if data.get('JobName'):
+ infotexts.append("Job: %s" % data['JobName'] )
@@ -122,7 +147,8 @@ check_info["veeam_client"] = {
'inventory_function': inventory_veeam_client,
'service_description': 'VEEAM Client',
'group': 'veeam_backup',
- "default_levels_variable" : "veeam_client",
+ 'parse_function': parse_veeam_client,
+ 'default_levels_variable' : 'veeam_client',
'has_perfdata': True,
}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 020ee90..22551c8 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3691,8 +3691,8 @@ register_check_parameters(
)
)]
),
- None,
- None
+ TextAscii(title=_("Jobname")),
+ "first"
)
register_check_parameters(
Module: check_mk
Branch: master
Commit: 53c8d096cfe712ca92ea887ed8a9058dfd09f8f4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=53c8d096cfe712…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 15:16:44 2014 +0100
Fixed path for storing status files of check_mail_loop check
---
doc/treasures/active_checks/check_mail_loop | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/treasures/active_checks/check_mail_loop b/doc/treasures/active_checks/check_mail_loop
index 47a8010..25d341a 100755
--- a/doc/treasures/active_checks/check_mail_loop
+++ b/doc/treasures/active_checks/check_mail_loop
@@ -67,7 +67,7 @@ OPTIONS:
--connect-timeout Timeout in seconds for network connects (defaults to 10)
--status-dir PATH This plugin needs a file to store information about
sent, received and expected mails. Defaults to either
- /tmp/ or /omd/sites/<sitename>/var/tmp when executed
+ /tmp/ or /omd/sites/<sitename>/var/check_mk when executed
from within an OMD site
--status-suffix SUFFIX Concantenated with "check_mail_loop.SUFFIX.status" to
generate the name of the status file. Empty by default
@@ -181,7 +181,7 @@ if fetch_port == None:
if not status_dir:
status_dir = os.environ.get('OMD_ROOT')
if status_dir:
- status_dir += '/var/tmp'
+ status_dir += '/var/check_mk'
else:
status_dir = '/tmp'
if status_suffix:
Module: check_mk
Branch: master
Commit: ebf9b5d7bda110887edbb6c8961aaec8fc7ded75
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ebf9b5d7bda110…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 6 14:59:48 2014 +0100
#1493 Added config option "Default filter group" to set the initial network topology view filter
The new "Network Topology: Default Filter Group" option can be used to initially render a filtered
network topology view when opening it instead of a view which shows all hosts.
---
.werks/1493 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/config/builtin.py | 3 +++
web/plugins/dashboard/builtin.py | 12 ++++++++----
web/plugins/wato/check_mk_configuration.py | 23 +++++++++++++++++++++++
5 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/.werks/1493 b/.werks/1493
new file mode 100644
index 0000000..84fc6ee
--- /dev/null
+++ b/.werks/1493
@@ -0,0 +1,10 @@
+Title: Added config option "Default filter group" to set the initial network topology view filter
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.5i7
+Date: 1415282309
+Class: feature
+
+The new "Network Topology: Default Filter Group" option can be used to initially render a filtered
+network topology view when opening it instead of a view which shows all hosts.
diff --git a/ChangeLog b/ChangeLog
index e60f40c..ef702d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
+ * 1493 Added config option "Default filter group" to set the initial network topology view filter...
* 1164 FIX: Fixed links from servicegroup overviews to single servicegroups
* 1166 FIX: Also prevting stylesheet update issues during version updates (just like for JS files)
* 1481 FIX: Fix broken layout of Host-, Service- and Contactgroup filters
diff --git a/web/plugins/config/builtin.py b/web/plugins/config/builtin.py
index 6e98986..d1054da 100644
--- a/web/plugins/config/builtin.py
+++ b/web/plugins/config/builtin.py
@@ -242,3 +242,6 @@ user_localizations = default_user_localizations
# Write WATO folder permissions to auth.php file
export_folder_permissions = False
+
+# Name of the hostgroup to filter the network topology view by default
+topology_default_filter_group = None
diff --git a/web/plugins/dashboard/builtin.py b/web/plugins/dashboard/builtin.py
index 5d6dd0a..a7f6672 100644
--- a/web/plugins/dashboard/builtin.py
+++ b/web/plugins/dashboard/builtin.py
@@ -187,6 +187,13 @@ builtin_dashboards["main"] = {
#Only work in OMD installations
if defaults.omd_site:
+ def topology_url():
+ return defaults.url_prefix + 'nagvis/frontend/nagvis-js/index.php?' + \
+ 'mod=Map&header_template=on-demand-filter&header_menu=1&label_show=1' + \
+ '&sources=automap&act=view&backend_id=' + defaults.omd_site + \
+ '&render_mode=undirected&url_target=main&filter_group=' + \
+ (config.topology_default_filter_group or '')
+
builtin_dashboards["topology"] = {
"single_infos": [],
"context" : {},
@@ -199,10 +206,7 @@ if defaults.omd_site:
{
"type" : "url",
"title" : "Topology of Site " + defaults.omd_site,
- "url" : defaults.url_prefix + 'nagvis/frontend/nagvis-js/index.php?' + \
- 'mod=Map&header_template=on-demand-filter&header_menu=1&label_show=1' + \
- '&sources=automap&act=view&backend_id=' + defaults.omd_site + \
- '&render_mode=undirected&url_target=main',
+ "urlfunc" : 'topology_url',
"reload_on_resize" : True,
"position" : (1, 1),
"size" : (GROW, GROW),
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 9d86a84..1792534 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -466,6 +466,29 @@ register_configvar(group,
domain = "multisite",
)
+# Helper that retrieves the list of hostgroups via Livestatus
+# use alias by default but fallback to name if no alias defined
+def list_hostgroups():
+ groups = dict(html.live.query("GET hostgroups\nCache: reload\nColumns: name alias\n"))
+ return [ (name, groups[name] or name) for name in groups.keys() ]
+
+register_configvar(group,
+ "topology_default_filter_group",
+ Optional(DropdownChoice(
+ choices = list_hostgroups,
+ sorted = True,
+ ),
+ title = _("Network Topology: Default Filter Group"),
+ help = _("By default the network topology view shows you the parent / child relations "
+ "of all hosts within your local site. The list can be filtered based on hostgroup "
+ "memberships by the users. You can define a default group to use for filtering "
+ "which is used when a user opens the network topology view."),
+ none_label = _("Show all hosts when opening the network topology view"),
+ default_value = None,
+ ),
+ domain = "multisite"
+)
+
#.
# .--WATO----------------------------------------------------------------.
# | __ ___ _____ ___ |