Module: check_mk
Branch: master
Commit: 0671ac4484215bf09d8e8f670d50a3e858b6cbbb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0671ac4484215b…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Tue Jul 15 15:17:43 2014 +0200
FIX Max Bandwidth for PNP-Graphs of Interface checks corrected
The maximum bandwith of a network interfaces was falsely converted
to the unit MiByte/sec, instead of MByte/sec. Example: 1 GBit/sec was
converted to 119.2 (MiByte/sec), it now is 125 MByte/sec.
---
.werks/634 | 10 ++++++++++
ChangeLog | 1 +
pnp-templates/check_mk-if.php | 4 ++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/634 b/.werks/634
new file mode 100644
index 0000000..1feaf25
--- /dev/null
+++ b/.werks/634
@@ -0,0 +1,10 @@
+Title: Max Bandwidth for PNP-Graphs of Interface checks corrected
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1405429992
+Class: fix
+
+The maximum bandwith of a network interfaces was falsely converted
+to the unit MiByte/sec, instead of MByte/sec. Example: 1 GBit/sec was
+converted to 119.2 (MiByte/sec), it now is 125 MByte/sec.
diff --git a/ChangeLog b/ChangeLog
index 37de5fc..d63f6ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,7 @@
* 1075 FIX: if, if64: Fixed PNP template in order to correctly scale Y axis
* 0631 FIX: fc_port: several fixes for the perfometer to display the right values...
* 0632 FIX: brocade_fcport: fix perfometer output of out bandwidth when averaging is switched on
+ * 0634 FIX: Max Bandwidth for PNP-Graphs of Interface checks corrected...
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/pnp-templates/check_mk-if.php b/pnp-templates/check_mk-if.php
index 71a869d..86f197b 100644
--- a/pnp-templates/check_mk-if.php
+++ b/pnp-templates/check_mk-if.php
@@ -50,7 +50,7 @@ if (!strcmp($MIN[11], "0.0")) {
else {
$unit = "B";
$unit_multiplier = 1;
- $base = 1024; // Megabyte is 1024 * 1024
+ $base = 1000; // Megabyte is 1000 * 1000
}
# Convert bytes to bits if neccessary
@@ -58,7 +58,7 @@ $bandwidth = $MAX[1] * $unit_multiplier;
$warn = $WARN[1] * $unit_multiplier;
$crit = $CRIT[1] * $unit_multiplier;
-# Now choose a conveniant scale, based on the known bandwith of
+# Now choose a convenient scale, based on the known bandwith of
# the interface, and break down bandwidth, warn and crit by that
# scale.
$bwuom = ' ';
Module: check_mk
Branch: master
Commit: 13c465bdef508c6b9e2ec45e54708ce0f00b96d2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=13c465bdef508c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 15 10:30:27 2014 +0200
WATO folder permissions are only exported to NagVis when configured
WATO exports the configured users, roles and permissions to NagVis to make
it possible to restrict access by using the permissions configured within
Multisite. In most cases the folder related permissions are not needed and
might take a lot of time to compute / process. So disabled the export
of the folder related permissions by default and made configurable using
the option {export_folder_permissions}.
---
.werks/1057 | 13 +++++++++++++
ChangeLog | 1 +
web/plugins/config/builtin.py | 3 +++
web/plugins/userdb/hook_auth.py | 10 ++++++++--
web/plugins/wato/check_mk_configuration.py | 15 +++++++++++++++
5 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/.werks/1057 b/.werks/1057
new file mode 100644
index 0000000..3b79771
--- /dev/null
+++ b/.werks/1057
@@ -0,0 +1,13 @@
+Title: WATO folder permissions are only exported to NagVis when configured
+Level: 1
+Component: wato
+Version: 1.2.5i5
+Date: 1405412830
+Class: feature
+
+WATO exports the configured users, roles and permissions to NagVis to make
+it possible to restrict access by using the permissions configured within
+Multisite. In most cases the folder related permissions are not needed and
+might take a lot of time to compute / process. So disabled the export
+of the folder related permissions by default and made configurable using
+the option {export_folder_permissions}.
diff --git a/ChangeLog b/ChangeLog
index 0ab6b7c..3e54b39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@
WATO:
* 0825 WATO: Hover menu of user online state shows the last seen date/time now
+ * 1057 WATO folder permissions are only exported to NagVis when configured...
* 0990 FIX: Fix HTTP error handling in bulk inventory...
* 1004 FIX: Fix exception when saving rules, caused by empty item
* 0947 FIX: WATO snapshots: fixed missing files on restoring nagvis backup domains
diff --git a/web/plugins/config/builtin.py b/web/plugins/config/builtin.py
index bc00a9e..61a8e0b 100644
--- a/web/plugins/config/builtin.py
+++ b/web/plugins/config/builtin.py
@@ -237,3 +237,6 @@ default_user_profile = {
lock_on_logon_failures = False
user_localizations = default_user_localizations
+
+# Write WATO folder permissions to auth.php file
+export_folder_permissions = False
diff --git a/web/plugins/userdb/hook_auth.py b/web/plugins/userdb/hook_auth.py
index 771807c..896ee6b 100644
--- a/web/plugins/userdb/hook_auth.py
+++ b/web/plugins/userdb/hook_auth.py
@@ -207,8 +207,14 @@ function may($username, $need_permission) {
def create_auth_file(callee, users):
make_nagios_directory(g_auth_base_dir)
- import wato # HACK: cleanup!
- create_php_file(callee, users, config.get_role_permissions(), wato.get_folder_permissions_of_users(users))
+
+ if config.export_folder_permissions:
+ import wato # HACK: cleanup!
+ folder_permissions = wato.get_folder_permissions_of_users(users)
+ else:
+ folder_permissions = {}
+
+ create_php_file(callee, users, config.get_role_permissions(), folder_permissions)
hooks.register('users-saved', lambda users: create_auth_file("users-saved", users))
hooks.register('roles-saved', lambda x: create_auth_file("roles-saved", load_users()))
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index b7ea47e..a550b26 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -978,6 +978,21 @@ register_configvar(group,
domain = "multisite"
)
+
+register_configvar(group,
+ "export_folder_permissions",
+ Checkbox(
+ title = _("Export WATO folder permissions"),
+ label = _("Make WATO folder permissions usable e.g. by NagVis"),
+ help = _("It is possible to create maps representing the WATO folder hierarchy within "
+ "NagVis by naming the maps like the folders are named internally. To make the "
+ "restriction of access to the maps as comfortable as possible, the permissions "
+ "configured within WATO can be exported to NagVis."),
+ default_value = False,
+ ),
+ domain = "multisite"
+)
+
#.
# .--Check_MK------------------------------------------------------------.
# | ____ _ _ __ __ _ __ |
Module: check_mk
Branch: master
Commit: db5b4bfb78f04e5f6b6ffcc05d083fb8b1066e94
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=db5b4bfb78f04e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 15 08:55:37 2014 +0200
Minor formating: Fixed styling of WATO hosts table when checkboxes are enabled
---
web/htdocs/wato.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 84854b5..6abf023 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1386,6 +1386,8 @@ def show_hosts(folder):
colspan += 1
if config.may("wato.edit_hosts") and config.may("wato.move_hosts"):
colspan += 1
+ if show_checkboxes:
+ colspan += 1
# Add the bulk action buttons also to the top of the table when this
# list shows more than 10 rows
Module: check_mk
Branch: master
Commit: acd9d79de5c252225dc361004853098e1456b5dc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=acd9d79de5c252…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jul 11 14:30:56 2014 +0200
minor fix in inventory function for cases when no data was found
---
checks/netapp_cluster | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/checks/netapp_cluster b/checks/netapp_cluster
index 58fe351..66f5a52 100644
--- a/checks/netapp_cluster
+++ b/checks/netapp_cluster
@@ -46,15 +46,14 @@
def inventory_netapp_cluster(info):
-
inventory = []
-
- # only inventorizes clusters that dont have takeover disabled.
- cfSettings, cfState, cfCannotTakeoverCause, cfPartnerStatus, cfPartnerName, cfInterconnectStatus = info[0]
- if int(cfSettings) not in [1, 3]:
- # Include the cluster partner name in inventory (value added data)
- inventory.append ((cfPartnerName, None))
- return inventory
+ if info:
+ cfSettings, cfState, cfCannotTakeoverCause, cfPartnerStatus, cfPartnerName, cfInterconnectStatus = info[0]
+ # only inventorizes clusters that dont have takeover disabled.
+ if int(cfSettings) not in [1, 3]:
+ # Include the cluster partner name in inventory (value added data)
+ inventory.append ((cfPartnerName, None))
+ return inventory
def check_netapp_cluster(item, _no_params, info):
Module: check_mk
Branch: master
Commit: 0a28118444d5a79e8fa52ea585c47ad9f8d00b31
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a28118444d5a7…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jul 11 13:54:36 2014 +0200
FIX brocade_fcport: fix perfometer output of out bandwidth when averaging is switched on
---
.werks/632 | 8 ++++++++
ChangeLog | 4 ++--
checks/brocade_fcport | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/632 b/.werks/632
new file mode 100644
index 0000000..03ce64e
--- /dev/null
+++ b/.werks/632
@@ -0,0 +1,8 @@
+Title: brocade_fcport: fix perfometer output of out bandwidth when averaging is switched on
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1405079618
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 6efc856..4b4f3d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -41,10 +41,10 @@
* 1072 FIX: printer_supply: fix colors of Perf-O-Meter on HP OfficeJet...
* 0950 FIX: check_mkevents: now able to resolve the hostname of the remote hosts...
* 0177 FIX: esx_vsphere_hostsystem.multipath: Fixed return state in case of paths in standby...
- * 0631 FIX: fc_port: several fixes for the perfometer to display the right values...
* 1054 FIX: mysql_slave: Only monitor the age of the slave when it is running
* 1075 FIX: if, if64: Fixed PNP template in order to correctly scale Y axis
->>>>>>> bcba05372bed424e874f785cfd1c9c3be896a516
+ * 0631 FIX: fc_port: several fixes for the perfometer to display the right values...
+ * 0632 FIX: brocade_fcport: fix perfometer output of out bandwidth when averaging is switched on
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/checks/brocade_fcport b/checks/brocade_fcport
index 55178cd..b8e9d04 100644
--- a/checks/brocade_fcport
+++ b/checks/brocade_fcport
@@ -109,6 +109,7 @@ def check_brocade_fcport(item, params, info):
summarystate = 0
output = []
perfdata = []
+ perfaverages = []
# Lookup port speed in ISL table for ISL ports (older switches do not provide this
# information in the normal table)
@@ -166,7 +167,7 @@ def check_brocade_fcport(item, params, info):
if average:
timedif, value = get_average("brocade_fcport.%s.%s.avg" % (what, item), this_time, value, average)
output.append("Avg(%dmin): %s/s" % (average, get_bytes_human_readable(value)))
- perfdata.append( ("%s_avg" % what.lower(), value, warn_bytes, crit_bytes, 0, wirespeed))
+ perfaverages.append( ("%s_avg" % what.lower(), value, warn_bytes, crit_bytes, 0, wirespeed))
# handle levels for in/out
if crit_bytes != None and value >= crit_bytes:
@@ -176,6 +177,9 @@ def check_brocade_fcport(item, params, info):
summarystate = max(1, summarystate)
output.append(" >= %s/s(!!)" % (get_bytes_human_readable(warn_bytes)))
+ # put perfdata of averages after perfdata for in and out in order not to confuse the perfometer
+ perfdata.extend(perfaverages)
+
# R X F R A M E S & T X F R A M E S
# Put number of frames into performance data (honor averaging)
timedif, rxframes_rate = get_counter("brocade_fcport.rxframes.%s" % index, this_time, rxframes)