Module: check_mk
Branch: master
Commit: 23fb87409fad7e0f07d63c73de3a522c24d653c8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=23fb87409fad7e…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Aug 31 09:02:35 2015 +0200
fixed plural->singular names of new checks
---
agents/special/agent_hp_msa | 8 ++++----
checks/hp_msa_disks | 14 +++++++-------
checks/hp_msa_volumes | 26 +++++++++++++-------------
3 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/agents/special/agent_hp_msa b/agents/special/agent_hp_msa
index cd7a53f..e5a5055 100755
--- a/agents/special/agent_hp_msa
+++ b/agents/special/agent_hp_msa
@@ -110,8 +110,8 @@ api_get_objects = [
property_to_section = {
"controller-statistics" : "controller",
"controller" : "controller",
- "disk-statistics" : "disks",
- "drives" : "disks",
+ "disk-statistics" : "disk",
+ "drives" : "disk",
"enclosure-fru" : "fru",
"port" : "if",
"fc-port" : "if",
@@ -120,8 +120,8 @@ property_to_section = {
"fan" : "fan",
"system" : "system",
"redundancy" : "system",
- "volumes" : "volumes",
- "volume-statistics" : "volumes",
+ "volumes" : "volume",
+ "volume-statistics" : "volume",
}
# Debug parameter. Contains full list of variables
diff --git a/checks/hp_msa_disks b/checks/hp_msa_disks
index 7e23d48..d259128 100644
--- a/checks/hp_msa_disks
+++ b/checks/hp_msa_disks
@@ -164,7 +164,7 @@
# | main check |
# '----------------------------------------------------------------------'
-check_info['hp_msa_disks'] = {
+check_info['hp_msa_disk'] = {
'parse_function' : parse_hp_msa,
'inventory_function' : inventory_hp_msa_health,
'check_function' : check_hp_msa_health,
@@ -182,7 +182,7 @@ check_info['hp_msa_disks'] = {
# | |
# '----------------------------------------------------------------------'
-check_info['hp_msa_disks.io'] = {
+check_info['hp_msa_disk.io'] = {
'inventory_function' : inventory_hp_msa_io,
'check_function' : check_hp_msa_io,
'service_description' : 'Disks IO %s',
@@ -201,11 +201,11 @@ check_info['hp_msa_disks.io'] = {
# | |_| |
# '----------------------------------------------------------------------'
-def inventory_hp_msa_disks_temp(parsed):
+def inventory_hp_msa_disk_temp(parsed):
return [ ("Disks", {}) ]
-def check_hp_msa_disks_temp(item, params, parsed):
+def check_hp_msa_disk_temp(item, params, parsed):
disks = []
for key, values in parsed.items():
disks.append( (key, float( values["temperature-numeric"] )) )
@@ -213,9 +213,9 @@ def check_hp_msa_disks_temp(item, params, parsed):
return check_temperature_list( disks, params )
-check_info['hp_msa_disks.temp'] = {
- 'inventory_function' : inventory_hp_msa_disks_temp,
- 'check_function' : check_hp_msa_disks_temp,
+check_info['hp_msa_disk.temp'] = {
+ 'inventory_function' : inventory_hp_msa_disk_temp,
+ 'check_function' : check_hp_msa_disk_temp,
'service_description' : 'Temperature %s',
'group' : 'temperature',
'has_perfdata' : True,
diff --git a/checks/hp_msa_volumes b/checks/hp_msa_volumes
index 702cd7a..597dd94 100644
--- a/checks/hp_msa_volumes
+++ b/checks/hp_msa_volumes
@@ -24,7 +24,7 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-# <<<hp_msa_volumes>>>
+# <<<hp_msa_volume>>>
# volumes 1 durable-id V0
# volumes 1 virtual-disk-name IMSAKO2B1_U1_B01-04
# volumes 1 storage-pool-name IMSAKO2B1_U1_B01-04
@@ -134,7 +134,7 @@
# | main check |
# '----------------------------------------------------------------------'
-def parse_hp_msa_volumes(info):
+def parse_hp_msa_volume(info):
parsed = {}
for line in info:
if line[0] == "volumes":
@@ -154,8 +154,8 @@ def parse_hp_msa_volumes(info):
return parsed
-check_info['hp_msa_volumes'] = {
- 'parse_function' : parse_hp_msa_volumes,
+check_info['hp_msa_volume'] = {
+ 'parse_function' : parse_hp_msa_volume,
'inventory_function' : inventory_hp_msa_health,
'check_function' : check_hp_msa_health,
'service_description' : 'Volumes Health',
@@ -172,12 +172,12 @@ check_info['hp_msa_volumes'] = {
# | |
# +----------------------------------------------------------------------+
-def inventory_hp_msa_volumes_df(parsed):
+def inventory_hp_msa_volume_df(parsed):
for key in parsed.keys():
yield key, {}
-def check_hp_msa_volumes_df(item, params, parsed):
+def check_hp_msa_volume_df(item, params, parsed):
if item in parsed:
yield 0, "%s (%s)" % (parsed[item]["virtual-disk-name"],
parsed[item]["raidtype"])
@@ -188,9 +188,9 @@ def check_hp_msa_volumes_df(item, params, parsed):
yield df_check_filesystem(g_hostname, item, size_mb, avail_mb, 0, params)
-check_info['hp_msa_volumes.df'] = {
- 'inventory_function' : inventory_hp_msa_volumes_df,
- 'check_function' : check_hp_msa_volumes_df,
+check_info['hp_msa_volume.df'] = {
+ 'inventory_function' : inventory_hp_msa_volume_df,
+ 'check_function' : check_hp_msa_volume_df,
'service_description' : 'Filesystem %s',
'has_perfdata' : True,
"group" : "filesystem",
@@ -208,7 +208,7 @@ check_info['hp_msa_volumes.df'] = {
# | |
# '----------------------------------------------------------------------'
-def check_hp_msa_volumes_io(item, params, parsed):
+def check_hp_msa_volume_io(item, params, parsed):
disks = {}
for key, values in parsed.items():
now = time.time()
@@ -219,15 +219,15 @@ def check_hp_msa_volumes_io(item, params, parsed):
states, outputs, perfdatas = check_diskstat_dict(item, params, disks)
if item != "SUMMARY":
- yield 0, parsed[item]["virtual-disk-name"]
+ yield 0, "%s (%s)" % (parsed[item]["virtual-disk-name"],
parsed[item]["raidtype"])
for state, output, perfdata in [states, outputs, perfdatas]:
yield state, output, perfdata
-check_info['hp_msa_volumes.io'] = {
+check_info['hp_msa_volume.io'] = {
'inventory_function' : inventory_hp_msa_io,
- 'check_function' : check_hp_msa_volumes_io,
+ 'check_function' : check_hp_msa_volume_io,
'service_description' : 'Volume IO %s',
'has_perfdata' : True,
'group' : 'diskstat',