Module: check_mk
Branch: master
Commit: a60379cae2184510efb934e7535c33283726f6a9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a60379cae21845…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 4 17:16:14 2014 +0100
#1653 FIX megaraid_pdisks: Resulting states are now hard coded within the check
The megaraid_pdisks check was using the state the device had during initial
inventory as expected OK state. When a device was failed during inventory,
the state never changed to CRITICAL, even if the device is failed.
This has been fixed by hard coding the resulting states now.
Online, Hotspare -> OK
Failed -> CRITICAL
---
.werks/1653 | 15 +++++++++++++++
ChangeLog | 1 +
checkman/megaraid_pdisks | 7 +------
checks/megaraid_pdisks | 26 +++++++++++++-------------
4 files changed, 30 insertions(+), 19 deletions(-)
diff --git a/.werks/1653 b/.werks/1653
new file mode 100644
index 0000000..7e9505f
--- /dev/null
+++ b/.werks/1653
@@ -0,0 +1,15 @@
+Title: megaraid_pdisks: Resulting states are now hard coded within the check
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417709673
+Class: fix
+
+The megaraid_pdisks check was using the state the device had during initial
+inventory as expected OK state. When a device was failed during inventory,
+the state never changed to CRITICAL, even if the device is failed.
+This has been fixed by hard coding the resulting states now.
+
+Online, Hotspare -> OK
+Failed -> CRITICAL
diff --git a/ChangeLog b/ChangeLog
index 3a35158..3093406 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -105,6 +105,7 @@
* 1598 FIX: bluecat_dhcp: Check is not longer found in inventory if dhcp service is not activated
* 1635 FIX: multipath: fix parsing output of multipath on RedHat6 with space in alias
* 1652 FIX: kaspersky_av_quarantine: Fixed exception when a file was found in quarantine
+ * 1653 FIX: megaraid_pdisks: Resulting states are now hard coded within the check...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/checkman/megaraid_pdisks b/checkman/megaraid_pdisks
index 8ed296b..e348b08 100644
--- a/checkman/megaraid_pdisks
+++ b/checkman/megaraid_pdisks
@@ -19,10 +19,5 @@ item:
A combination of the enclosure and the slot number, separated by a slash, for
example {"0/4"} for enclosure {0} and slot {4}.
-parameter:
- targetstate (string): The target state of the disk as output
- by {MegaCli}.
-
inventory:
- All disks are automatically inventorized. The current state is
- taken as the target state.
+ One service is created for each found disk.
diff --git a/checks/megaraid_pdisks b/checks/megaraid_pdisks
index 9ffcd7a..61b3937 100644
--- a/checks/megaraid_pdisks
+++ b/checks/megaraid_pdisks
@@ -86,7 +86,7 @@ def megaraid_pdisks_parse(info):
elif line[0] == "Slot":
slot = int(line[-1])
elif line[0] == "Firmware" and line[1] == "state:":
- state = line[2]
+ state = line[2].rstrip(',')
elif line[0] == "Inquiry" and line[1] == "Data:":
name = " ".join(line[2:])
#Adapter, Enclosure, Encolsure Device ID, Slot, State, Name
@@ -96,31 +96,31 @@ def megaraid_pdisks_parse(info):
return return_var
-
def inventory_megaraid_pdisks(info):
-
info = megaraid_pdisks_parse(info)
inventory = []
for adapter, enclosure, enc_dev_id, slot, state, name in info:
- inventory.append(("%s%s/%s" % (adapter, enclosure, slot), repr(state)))
+ inventory.append(("%s%s/%s" % (adapter, enclosure, slot), None))
return inventory
-def check_megaraid_pdisks(item, target_state, info):
+megaraid_pdisks_states = {
+ 'Online' : 0,
+ 'Hotspare' : 0,
+ 'Failed' : 2,
+}
+
+def check_megaraid_pdisks(item, _no_params, info):
info = megaraid_pdisks_parse(info)
for adapter, enclosure, enc_dev_id, slot, state, name in info:
if "%s%s/%s" % (adapter, enclosure, slot) == item:
- infotext = "%s (%s)" % (state, name)
- if state == target_state:
- return (0, infotext)
- else:
- return (2, infotext)
- return (3, "No disk in encl/slot %s found" % item)
-
+ print state
+ return megaraid_pdisks_states.get(state, 3), "%s (%s)" % (state, name)
+ return 3, "No disk in encl/slot %s found" % item
check_info["megaraid_pdisks"] = {
'check_function': check_megaraid_pdisks,
'inventory_function': inventory_megaraid_pdisks,
'service_description': 'RAID PDisk Adapt/Enc/Sl %s',
- 'has_perfdata': True,
+ 'has_perfdata': False,
'group': 'raid_disk',
}
Module: check_mk
Branch: master
Commit: 82afff89b1719b6268141e5244a404ba59de6262
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=82afff89b1719b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 4 16:34:01 2014 +0100
#1651 FIX Consolidated painters of service list views
The painters (columns) of views which are listing multiple services were
using different orders of the painters. We consolidatet the columns now
to have a better consistent feeling.
---
.werks/1651 | 11 ++++
ChangeLog | 1 +
web/plugins/views/builtin.py | 134 ++++++++++--------------------------------
3 files changed, 43 insertions(+), 103 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=82afff89b1…
Module: check_mk
Branch: master
Commit: ff3f09526f6fde567ecfc01b56dfc4fcbd424a1c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ff3f09526f6fde…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 4 15:59:30 2014 +0100
#1634 FIX Fix editing of cluster hosts in WATO: cluster-property no longer goes lost
When editing a cluster host in WATO the list of nodes (and thereore the cluster
property) got list. This bug was probably introduced while creating the new WATO
webservice. This has been fixed.
---
.werks/1634 | 11 +++++++++++
ChangeLog | 7 ++++---
web/htdocs/wato.py | 6 +++++-
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/.werks/1634 b/.werks/1634
new file mode 100644
index 0000000..f60c99a
--- /dev/null
+++ b/.werks/1634
@@ -0,0 +1,11 @@
+Title: Fix editing of cluster hosts in WATO: cluster-property no longer goes lost
+Level: 2
+Component: wato
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417705023
+Class: fix
+
+When editing a cluster host in WATO the list of nodes (and thereore the cluster
+property) got list. This bug was probably introduced while creating the new WATO
+webservice. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 800838e..20dd62c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,11 +48,11 @@
* 1616 drbd: Added support for Ahead/Behind cluster states (DRBD >= 8.3.10)
* 1626 Renamed service descriptions of filesystem, process and logwatch checks...
* 1627 megaraid_ldisks: Warn if current cache or write policy differs from logical drive default policy...
- * 1597 bluecat_dhcp, bluecat_dns: Checks can now be used in Check_MK Cluster Mode
* 1629 check_mk_agent.freebsd: several new features and improvements, now only use statgrab...
* 1630 smart: update in plugin that also outputs information about disks attached to a MegaRAID controller...
* 1631 juniper_bgp_state: check now detects and supports more differen device models...
* 1645 Added basic kernel section to FreeBSD agent...
+ * 1597 bluecat_dhcp, bluecat_dns: Checks can now be used in Check_MK Cluster Mode
* 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...
@@ -95,12 +95,12 @@
* 1617 FIX: lnx_if: Deal with data provided by cluster host
* 1618 FIX: ad_replication: Output of timeLastSuccess and timeLastFailure was inverted...
* 1623 FIX: hp_proliant_mem: support for some yet unhandled status situations
- * 1598 FIX: bluecat_dhcp: Check is not longer found in inventory if dhcp service is not activated
* 1640 FIX: check_jolokia_metrics_serv_req: Fixed wrong levels shown for upper thresholds
- * 1453 FIX: drbd.stats: tried to send non-numeric write order parameter to rrd...
* 1632 FIX: hr_fs: remove ugly "mounted on:" information appearing on Juniper devices
* 1646 FIX: hyperv_vms: Plugin garbles following plugin output when no VMs exist...
* 1647 FIX: agent_ipmi: Check_MK service gets critical now when ipmi-sensors command fails
+ * 1453 FIX: drbd.stats: tried to send non-numeric write order parameter to rrd...
+ * 1598 FIX: bluecat_dhcp: Check is not longer found in inventory if dhcp service is not activated
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
@@ -183,6 +183,7 @@
* 1637 FIX: Fixed exception in notification analysis when notifications have not NOTIFICATIONTYPE set
* 1639 FIX: Interfaces with speed more than 10GBit/s can now be configured correctly
* 1633 FIX: Fix problem that attributes of new WATO folders have not been saved...
+ * 1634 FIX: Fix editing of cluster hosts in WATO: cluster-property no longer goes lost...
Notifications:
* 1512 Bulk notification can now be grouped according to custom macro values...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index c213df8..5563842 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -17474,7 +17474,11 @@ def update_hosts_in_folder(folder, hosts):
updated_hosts = {}
for hostname, attributes in hosts.items():
- cleaned_attr = dict([(k, v) for (k, v) in attributes.get("set", {}).iteritems() if not k.startswith('.') ])
+ cleaned_attr = dict([
+ (k, v) for
+ (k, v) in
+ attributes.get("set", {}).iteritems()
+ if (not k.startswith('.') or k == ".nodes") ])
# unset keys
for key in attributes.get("unset", []):
if key in cleaned_attr:
Module: check_mk
Branch: master
Commit: ea09ae0948c8bbb8a1d66ff2accbae67764aa25a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ea09ae0948c8bb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Dec 4 15:43:28 2014 +0100
#1633 FIX Fix problem that attributes of new WATO folders have not been saved
When you created a new folder then only its name and title would be saved,
not any further attributes. This problem seems to exist from the very
beginning of WATO but nobody noticed...
---
.werks/1633 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 5 ++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/1633 b/.werks/1633
new file mode 100644
index 0000000..ffbf275
--- /dev/null
+++ b/.werks/1633
@@ -0,0 +1,11 @@
+Title: Fix problem that attributes of new WATO folders have not been saved
+Level: 2
+Component: wato
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417704150
+Class: fix
+
+When you created a new folder then only its name and title would be saved,
+not any further attributes. This problem seems to exist from the very
+beginning of WATO but nobody noticed...
diff --git a/ChangeLog b/ChangeLog
index dbae9ed..26b41ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -178,6 +178,7 @@
* 1625 FIX: Safely handle characters that have a special meaning in regexes when creating service-specific rules...
* 1637 FIX: Fixed exception in notification analysis when notifications have not NOTIFICATIONTYPE set
* 1639 FIX: Interfaces with speed more than 10GBit/s can now be configured correctly
+ * 1633 FIX: Fix problem that attributes of new WATO folders have not been saved...
Notifications:
* 1512 Bulk notification can now be grouped according to custom macro values...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 76ff350..c213df8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1804,8 +1804,11 @@ def mode_editfolder(phase, new):
if new:
check_folder_permissions(g_folder, "write")
check_user_contactgroups(attributes.get("contactgroups", (False, [])))
-
create_wato_folder(g_folder, name, title)
+ g_folder["attributes"] = attributes
+ save_folder(g_folder)
+ log_audit(g_folder, "new-folder", _("Created new folder %s") % title)
+
else:
# TODO: migrate this block into own function edit_wato_folder(..)
cgs_changed = get_folder_cgconf_from_attributes(attributes) != \