Module: check_mk
Branch: master
Commit: d03e237bea2546aac742ebfd6f9229ce86aede14
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d03e237bea2546…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Wed Jun 14 11:11:59 2017 +0200
4820 smart: Added support for uncommon Descriptions (CRC Error and Uncorrectable errors)
Now checks also stats if the description of this stat is somewhat different
from the standard.
Change-Id: I3cf9911e22bdfad682a6f7a5303dd2292effd450
---
.werks/4820 | 11 +++++++++++
checks/smart | 12 ++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/.werks/4820 b/.werks/4820
new file mode 100644
index 0000000..664ce54
--- /dev/null
+++ b/.werks/4820
@@ -0,0 +1,11 @@
+Title: smart: Added support for uncommon Descriptions (CRC Error and Uncorrectable
errors)
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1497431383
+Class: feature
+
+Now checks also stats if the description of this stat is somewhat different
+from the standard.
diff --git a/checks/smart b/checks/smart
index 6d457e7..d796657 100644
--- a/checks/smart
+++ b/checks/smart
@@ -43,6 +43,10 @@
#/dev/sda ATA WDC_SSC-D0128SC- 173 Unknown_Attribute 0x0012 100 100 000
Old_age Always - 4217788040605
+# TODO: Need to completely rework smart check. Use IDs instead of changing
+# descriptions! But be careful: There is no standard neither for IDs nor for
+# descriptions. Only use those, which are common sense.
+
factory_settings["smart_temp_default_levels"] = {
"levels": (35, 40)
}
@@ -107,7 +111,9 @@ smart_stats_fields = [
'Command_Timeout',
'End-to-End_Error',
'Reported_Uncorrect',
- 'UDMA_CRC_Error_Count', ]
+ 'Uncorrectable_Error_Cnt',
+ 'UDMA_CRC_Error_Count',
+ 'CRC_Error_Count', ]
def inventory_smart_stats(info):
disks = parse_smart_raw_values(info)
@@ -145,7 +151,9 @@ def check_smart_stats(item, params, info):
('', 'Command_Timeout', 'Command
timeouts', ),
('', 'End-to-End_Error', 'End-to-End
errors', ),
('', 'Reported_Uncorrect',
'Uncorrectable errors', ),
- ('', 'UDMA_CRC_Error_Count', 'UDMA CRC
errors', )]:
+ ('', 'Uncorrectable_Error_Cnt',
'Uncorrectable errors', ),
+ ('', 'UDMA_CRC_Error_Count', 'UDMA CRC
errors', ),
+ ('', 'CRC_Error_Count', 'UDMA CRC
errors', )]:
if field in disk:
value = disk[field]
infos.append("%s: %d%s" % (descr, value, unit))