improved manpage
Message-ID: <52d7f559.kiD0k3pzIja327n3%bs(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: e8b8e57bf964d90503a0ea030dadecffceef9ce9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e8b8e57bf964d9…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Jan 16 16:05:56 2014 +0100
hitachi_hnas_span: fixed logic error, improved manpage
---
checkman/hitachi_hnas_span | 8 ++++----
checks/hitachi_hnas_span | 4 +++-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/checkman/hitachi_hnas_span b/checkman/hitachi_hnas_span
index fad2362..08643de 100644
--- a/checkman/hitachi_hnas_span
+++ b/checkman/hitachi_hnas_span
@@ -13,8 +13,8 @@ item:
The ID of a Span plus it's label, separated by a space, e. g. 3 SP_91
perfdata:
- Three values: The first value is the used space of the filesystem
- in MB. Also the minimum (0 MB), maximum (size of the filesystem) and the
+ Three values: The first value is the used space of the span
+ in MB. Also the minimum (0 MB), maximum (size of the span) and the
warning and critical levels in MB are provided.
The second is the change of the usage in MB per range since the last check
(e.g. in MB per 24 hours) and the 3rd is the averaged change (so called
@@ -26,7 +26,7 @@ inventory:
Finds one item per Span.
[parameters]
- See man page of {df}.
+parameters (dict): See man page of {df}.
[configuration]
- See man page of {df}.
+filesystem_default_levels: And other, see man page of {df}.
diff --git a/checks/hitachi_hnas_span b/checks/hitachi_hnas_span
index f6421fe..6f044d2 100644
--- a/checks/hitachi_hnas_span
+++ b/checks/hitachi_hnas_span
@@ -41,7 +41,9 @@ def check_hitachi_hnas_span(item, params, info):
avail_mb = size_mb - used_mb
fslist.append((item, size_mb, avail_mb))
- return df_check_filesystem_list(item, params, fslist)
+ return df_check_filesystem_list(item, params, fslist)
+
+ return 3, "Span %s not found" % item
check_info["hitachi_hnas_span"] = {
"check_function" : check_hitachi_hnas_span,
Module: check_mk
Branch: master
Commit: 8e4a71bbe7cb2e021ad9776c19e4b3de2f54ad20
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8e4a71bbe7cb2e…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Jan 16 16:01:34 2014 +0100
hitachi_hnas_volume: New check for Usage and Status of Volumes in Hitachi HNAS storage systems
---
.werks/457 | 8 ++++
ChangeLog | 1 +
checkman/hitachi_hnas_volume | 39 +++++++++++++++++
checks/hitachi_hnas_volume | 82 ++++++++++++++++++++++++++++++++++++
web/plugins/perfometer/check_mk.py | 1 +
5 files changed, 131 insertions(+)
diff --git a/.werks/457 b/.werks/457
new file mode 100644
index 0000000..c4a08c4
--- /dev/null
+++ b/.werks/457
@@ -0,0 +1,8 @@
+Title: hitachi_hnas_volume: New check for Usage and Status of Volumes in Hitachi HNAS storage systems
+Level: 2
+Component: checks
+Version: 1.2.5i1
+Date: 1389884457
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index a1353bd..199368b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,7 @@
* 0566 services.summary: new check to monitor stopped services of mode autostart in windows
* 0568 f5_big_ip_conns: check now supports predictive monitoring and both connections types are merged in one check
* 0257 windows_agent: now reports extended process information (obsoletes psperf.bat plugin)...
+ * 0457 hitachi_hnas_volume: New check for Usage and Status of Volumes in Hitachi HNAS storage systems
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/checkman/hitachi_hnas_volume b/checkman/hitachi_hnas_volume
new file mode 100644
index 0000000..1475129
--- /dev/null
+++ b/checkman/hitachi_hnas_volume
@@ -0,0 +1,39 @@
+title: Hitachi HNAS: Usage and Status of Volumes
+agents: snmp
+catalog: hw/storagehw/hitachi
+license: GPL
+distribution: check_mk
+description:
+ Checks the Usage and Status of Volumes in Hitachi HNAS storage systems.
+
+ For usage it uses the check logic of the {df} check, so for configuration
+ parameters and examples please refer to the man page of {df}.
+
+ If the status of a volume is reported to be "mounted", the check may
+ return {OK}, on status "unformatted" or "formatted", the check returns
+ at least {WARN}, on "needsChecking" it returns {CRIT} and {UNKN} on
+ every other status.
+
+ The worst status of both (usage levels and status) is returned by the check.
+
+item:
+ The ID of a Volume plus it's label, separated by a space, e. g. 1025 data
+
+perfdata:
+ Three values: The first value is the used space of the volume
+ in MB. Also the minimum (0 MB), maximum (size of the volume) and the
+ warning and critical levels in MB are provided.
+ The second is the change of the usage in MB per range since the last check
+ (e.g. in MB per 24 hours) and the 3rd is the averaged change (so called
+ trend), also in MB per range. Please note, that performance data for
+ trends is enabled per default. You can globally disable that in {main.mk}
+ with {filesystem_default_levels["trend_perfdata"] = False}.
+
+inventory:
+ Finds one item per Volume.
+
+[parameters]
+parameters (dict): See man page of {df}.
+
+[configuration]
+filesystem_default_levels: And other, see man page of {df}.
diff --git a/checks/hitachi_hnas_volume b/checks/hitachi_hnas_volume
new file mode 100644
index 0000000..6eb9b7d
--- /dev/null
+++ b/checks/hitachi_hnas_volume
@@ -0,0 +1,82 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+
+check_includes["hitachi_hnas_volume"] = [ "df.include" ]
+
+def inventory_hitachi_hnas_volume(info):
+ mplist = []
+ for id, label, volume_status, total, free, evs in info:
+ mplist.append(id + " " + label)
+ return df_inventory(mplist)
+
+def check_hitachi_hnas_volume(item, params, info):
+ # use checks from df.include
+ fslist = []
+ for id, label, volume_status, total, free, evs in info:
+ if id + " " + label == item:
+ size_mb = int(total) / 1048576.0
+ avail_mb = int(free) / 1048576.0
+ fslist.append((item, size_mb, avail_mb))
+
+ status, message, perfdata = df_check_filesystem_list(item, params, fslist)
+
+ # evaluate volumeStatus
+ statusmap = (("", 3),
+ ("unformatted", 1),
+ ("mounted", 0),
+ ("formatted", 1),
+ ("needsChecking", 2),
+ )
+
+ error_string = ( "", " (!)", " (!!)", "" )
+ volume_status=int(volume_status)
+
+ if volume_status == 0 or volume_status >= len(statusmap):
+ message += ", Volume reports unidentified status %s" % volume_status
+ status = max(status, 3)
+ else:
+ message += ", Status %s%s" % (statusmap[volume_status][0], error_string[statusmap[volume_status][1]])
+ status = max(status, statusmap[volume_status][1])
+
+ # report evs
+ message += ", assigned to EVS %s" % evs
+ return status, message, perfdata
+
+ return 3, "Volume %s not found" % item
+
+
+check_info["hitachi_hnas_volume"] = {
+ "check_function" : check_hitachi_hnas_volume,
+ "inventory_function" : inventory_hitachi_hnas_volume,
+ "service_description" : "Volume %s",
+ "has_perfdata" : True,
+ "snmp_info" : (".1.3.6.1.4.1.11096.6.1.1.1.3.5.2.1", [1, 3, 4, 5, 6, 7]),
+ # volumeSysDriveIndex, volumeLabel, volumeStatus, volumeCapacity,
+ # volumeFreeCapacity, volumeEnterpriseVirtualServer
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.11096.6"),
+ "group" : "filesystem",
+ "default_levels_variable": "filesystem_default_levels",
+}
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index a6bf931..b3a9933 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -72,6 +72,7 @@ perfometers["check_mk-oracle_asm_diskgroup"] = perfometer_check_mk_df
perfometers["check_mk-mysql_capacity"] = perfometer_check_mk_df
perfometers["check_mk-esx_vsphere_counters.ramdisk"] = perfometer_check_mk_df
perfometers["check_mk-hitachi_hnas_span"] = perfometer_check_mk_df
+perfometers["check_mk-hitachi_hnas_volume"] = perfometer_check_mk_df
def perfometer_esx_vsphere_datastores(row, check_command, perf_data):
used_mb = perf_data[0][1]
Module: check_mk
Branch: master
Commit: baa1b066b3dff23086ebb89178e99755d8d4ef9d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=baa1b066b3dff2…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jan 16 14:41:26 2014 +0100
fixed werk description
---
.werks/257 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.werks/257 b/.werks/257
index 84167e8..f8a9f7d 100644
--- a/.werks/257
+++ b/.werks/257
@@ -18,6 +18,6 @@ Additional fixes and features
<ul>
<li>The agent now also reports its build date, apart from its version</li>
<li>Bugfix: The virtual and resident memory shown in the check output is now correct.
-There were problems whenever there were multiple processes with the same name<li>
+There were problems whenever there were multiple processes with the same name</li>
</ul>
Module: check_mk
Branch: master
Commit: 253f77c5c794accd66bb0aaa509f3f85fb87e4b7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=253f77c5c794ac…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jan 16 14:39:27 2014 +0100
windows_agent: now reports extended process information (obsoletes psperf.bat plugin)
The ps section of the windows agent now provides additional information regarding processes.<br>
# (user, virtual_size, resident_size, %cpu, processID, pagefile_usage, usermodetime, kernelmodetime, openHandles, threadCount) processName<br>
#(\\KLAPPRECHNER\ab,29284,2948,0,3124,904,400576,901296,35,1) NOTEPAD.EXE<br>
<br>
Previously you had to use the windows agent plugin psperf.bat to achieve the same amount of data.<br>
Since this data is now reported by the agent itself, the psperf.bat plugin becomes obsolete.<br>
In fact any data from psperf.bat will now be ignored in the ps check whenever the windows agent reports extended process information.<br>
<br>
Additional fixes and features
<ul>
<li>The agent now also reports its build date, apart from its version</li>
<li>Bugfix: The virtual and resident memory shown in the check output is now correct.
There were problems whenever there were multiple processes with the same name<li>
</ul>
---
.werks/257 | 23 +++
ChangeLog | 1 +
agents/windows/check_mk_agent.cc | 292 +++++++++++++++++++++++++++++++++----
agents/windows/check_mk_agent.exe | Bin 153088 -> 158208 bytes
agents/windows/crash.exe | Bin 20024 -> 20024 bytes
agents/windows/install_agent.exe | Bin 147635 -> 150334 bytes
agents/windows/nowin.exe | Bin 22511 -> 22511 bytes
checks/ps | 50 +++++--
8 files changed, 323 insertions(+), 43 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=253f77c5c7…
Module: check_mk
Branch: master
Commit: 8dab74ce289fd3ad78d3298f88446e050623dfeb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8dab74ce289fd3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 16 11:29:58 2014 +0100
Updated bug entries #1087
---
.bugs/1087 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/1087 b/.bugs/1087
new file mode 100644
index 0000000..6b4d2fb
--- /dev/null
+++ b/.bugs/1087
@@ -0,0 +1,10 @@
+Title: Omit the "Service " from column headers for service views
+Component: multisite
+State: open
+Date: 2014-01-16 11:29:06
+Targetversion: future
+Class: nastiness
+
+In a view that just show details of a service (like the "service" view),
+we should simply remove the "Service " from the column title and upper
+case the next character.
Module: check_mk
Branch: master
Commit: 5e7f4cceb66db14025cff9eb1abfaa7faea6a939
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5e7f4cceb66db1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 16 10:53:20 2014 +0100
New button in WATO service list for displaying check parameters
In WATO the service list of a host has now a new button <i>Show Check Parameters</i>. That button
adds a new column to the list that shows the check parameters of that service directly in the
table - not just as a tooltip to the triangle icon.
---
.werks/448 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 21 ++++++++++++++++++++-
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/.werks/448 b/.werks/448
new file mode 100644
index 0000000..bc83c34
--- /dev/null
+++ b/.werks/448
@@ -0,0 +1,10 @@
+Title: New button in WATO service list for displaying check parameters
+Level: 2
+Component: wato
+Version: 1.2.5i1
+Date: 1389865905
+Class: feature
+
+In WATO the service list of a host has now a new button <i>Show Check Parameters</i>. That button
+adds a new column to the list that shows the check parameters of that service directly in the
+table - not just as a tooltip to the triangle icon.
diff --git a/ChangeLog b/ChangeLog
index ee4c4d2..88526b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -150,6 +150,7 @@
* 0437 Convert WATO rule for debug_log into simple Checkbox...
* 0428 Changed user profiles (e.g. pw changes) are now replicated in distributed setups...
* 0114 User Custom Attributes can now be exported to the core...
+ * 0448 New button in WATO service list for displaying check parameters...
* 0057 FIX: Fix exception in WATO host editor on custom tag without topic...
* 0241 FIX: Improved sorting of WATO folders in dropdown menu...
* 0019 FIX: Fixed wording in WATO rule for MSSQL check
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index db695c7..77c8f69 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2445,6 +2445,17 @@ def mode_inventory(phase, firsttime):
config.need_permission("wato.services")
check_host_permissions(hostname)
if html.check_transaction():
+
+ # Settings for showing parameters
+ if html.var("_show_parameters"):
+ parameter_column = True
+ config.save_user_file("parameter_column", True)
+ return
+ elif html.var("_hide_parameters"):
+ parameter_column = False
+ config.save_user_file("parameter_column", False)
+ return
+
cache_options = html.var("_scan") and [ '@scan' ] or [ '@noscan' ]
table = check_mk_automation(host[".siteid"], "try-inventory", cache_options + [hostname])
table.sort()
@@ -2498,6 +2509,7 @@ def show_service_table(host, firsttime):
# Read current check configuration
cache_options = html.var("_scan") and [ '@scan' ] or [ '@noscan' ]
+ parameter_column = config.load_user_file("parameter_column", False)
# We first try using the Cache (if the user has not pressed Full Scan).
# If we do not find any data, we omit the cache and immediately try
@@ -2535,6 +2547,14 @@ def show_service_table(host, firsttime):
if len(checktable) > 0:
html.button("_save", _("Save manual check configuration"))
+ html.write(" ")
+ if parameter_column:
+ html.button("_hide_parameters", _("Hide Check Parameters"))
+ else:
+ html.button("_show_parameters", _("Show Check Parameters"))
+
+
+
html.hidden_fields()
if html.var("_scan"):
html.hidden_field("_scan", "on")
@@ -2542,7 +2562,6 @@ def show_service_table(host, firsttime):
table.begin(css ="data", searchable = False)
# This option will later be switchable somehow
- parameter_column = False
for state_name, state_type, checkbox in [
( _("Available (missing) services"), "new", firsttime ),