Module: check_mk
Branch: master
Commit: 7ff918a4e491a0bad49afe7026f83712df8488f5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ff918a4e491a0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Oct 25 14:03:41 2015 +0100
Removed bizarre and incomplete check smbios_sel
This check only worked on CELSIUS M470 workstations and needed special tools and
agent plugins that were not available in the standard distribution anyway.
---
checkman/smbios_sel | 40 ------
checks/smbios_sel | 172 -------------------------
doc/treasures/fsc-celsius-m470-sel-1.2.tar.gz | Bin 10058 -> 0 bytes
3 files changed, 212 deletions(-)
diff --git a/checkman/smbios_sel b/checkman/smbios_sel
deleted file mode 100644
index b4355a0..0000000
--- a/checkman/smbios_sel
+++ /dev/null
@@ -1,40 +0,0 @@
-title: System Event Log from SMBIOS/DMI
-agents: linux
-catalog: os/hardware
-license: GPL
-distribution: check_mk
-description:
- This check reads the entries of the SEL (System Event Log) from
- SMBIOS/DMI on FSC Celsius m470 systems (and maybe others).
-
- The check has been developed to detect ECC single- and multibit
- memory errors on FSC Celsius systems.
-
- This check uses the information of the userspace utility
- {fsc-celsius-m470-sel} which reads the current contents of the SEL
- directly from /dev/mem. To work properly the {dmidecode} and
- {fsc-celsius-m470-sel} binaries need to be installed on the
- system and must be available in the PATH.
-
- Please note that the fsc-celsius-m470-sel is still experimental and
- has not been tested on other systems.
-
- You need to extend your agent on the monitored system
- using a check_mk_agent plugin named {fsc-celsius-m470-sel.sh}. This
- agent plugin can be found in the {fsc-celsius-m470-sel-1.1.tar.gz}
- archive in the {doc} directory of check_mk.
-
- To enable this plugin simply copy it to the plugins directory of
- check_mk_agent on your target machines. By default the directory
- is located here: /usr/lib/check_mk_agent/plugins.
-
- This plugin has been developed on FSC Celsius m470 but may also work
- on other FSC hardware platforms. Please tell us when you find some
- other software where this plugin outputs valid information.
-
- The Nagios service will show the worst state which can be found in the
- SEL. Each known SEL record has a status level which is hardcoded in the
- check_mk check.
-
-inventory:
- One service named {SEL} will be created on all valid systems.
diff --git a/checks/smbios_sel b/checks/smbios_sel
deleted file mode 100644
index 3c38325..0000000
--- a/checks/smbios_sel
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/python
-# -*- encoding: utf-8; py-indent-offset: 4 -*-
-# +------------------------------------------------------------------+
-# | ____ _ _ __ __ _ __ |
-# | / ___| |__ ___ ___| | __ | \/ | |/ / |
-# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
-# | | |___| | | | __/ (__| < | | | | . \ |
-# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
-# | |
-# | Copyright Mathias Kettner 2014 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.
-
-# Example output of agent:
-#<<<smbios_sel>>>
-#1 2010-03-29 09:30:36 Single-bit ECC memory error
-#1 2010-03-29 09:30:36 Single-bit ECC memory error
-#1 2010-03-29 09:30:37 Single-bit ECC memory error
-#1 2010-03-29 09:30:38 Single-bit ECC memory error
-#1 2010-03-29 09:30:38 Single-bit ECC memory error
-#1 2010-03-29 09:30:39 Single-bit ECC memory error
-#1 2010-03-29 09:30:39 Single-bit ECC memory error
-#1 2010-03-29 09:30:40 Single-bit ECC memory error
-#
-# Known message types:
-#struct message messages[] = {
-# {0x00, "Unknown message type" },
-# {0x01, "Single-bit ECC memory error" },
-# {0x02, "Multi-bit ECC memory error" },
-# {0x03, "Parity memory error" },
-# {0x04, "Bus time-out" },
-# {0x05, "I/O Channel Check" },
-# {0x06, "Software NMI" },
-# {0x07, "POST Memory Resize" },
-# {0x08, "POST Error" },
-# {0x09, "PCI Parity Error" },
-# {0x0A, "PCI System Error" },
-# {0x0B, "CPU Failure" },
-# {0x0C, "EISA FailSafe Timer time-out" },
-# {0x0D, "Correctable memory log disabled" },
-# {0x0E, "Logging disabled for a specific Event Type - too many errors of the same
type received in a short amount of time" },
-# {0x0F, "Unknown message type" },
-# {0x10, "System Limit Exceeded (e.g. voltage or temperature threshold)" },
-# {0x11, "Asynchronous hardware timer expired and issued a system reset" },
-# {0x12, "System configuration information" },
-# {0x13, "Hard-disk information" },
-# {0x14, "System reconfigured" },
-# {0x15, "Uncorrectable CPU-complex error" },
-# {0x16, "Log Area Reset/Cleared" },
-# {0x17, "System boot" }
-# 0x18-0x7F Unused, available for assignment by this specification.
-# 0x80-0xFE Available for system- and OEM-specific assignments.
-# 0xFF End-of-Log
-#};
-
-import datetime
-
-smbios_sel_msg_types = {
- #Type: (Number-of-Entries Threshold, Status-Code, Current Count, Last Entry, Alias)
- 0: [1, 1, 0, None, None],
- 1: [5, 2, 0, None, None],
- 2: [1, 2, 0, None, None],
- 3: [1, 2, 0, None, None],
- 4: [1, 2, 0, None, None],
- 5: [1, 1, 0, None, None],
- 6: [1, 0, 0, None, None],
- 7: [1, 0, 0, None, None],
- 8: [1, 2, 0, None, None],
- 9: [1, 2, 0, None, None],
- 10: [1, 2, 0, None, None],
- 11: [1, 2, 0, None, None],
- 12: [1, 0, 0, None, None],
- 13: [1, 2, 0, None, None],
- 14: [1, 1, 0, None, None],
- 15: [1, 0, 0, None, None],
- 16: [1, 2, 0, None, None],
- 17: [1, 1, 0, None, None],
- 18: [1, 0, 0, None, None],
- 19: [1, 0, 0, None, None],
- 20: [1, 0, 0, None, None],
- 21: [1, 2, 0, None, None],
- 22: [1, 0, 0, None, None],
- 23: [1, 0, 0, None, None],
-}
-
-def inventory_smbios_sel(info):
- if len(info) > 0:
- return [(None, "None")]
-
-def check_smbios_sel(_no_item, _no_params, info):
- if len(info) == 0:
- return (0, "The System Event Log is empty")
-
- sum_status = 0
- num_errors = 0
-
- for line in info:
- type = line[0]
- isodate = " ".join(line[1:3])
- msg = " ".join(line[3:])
-
- # Errors reported by the agent result in CRITICAL state
- # Each error will be listed as single log
- if type == "E":
- sum_status = 2
- num_errors += 1;
- smbios_sel_msg_types["E%d"%num_errors] = [1, 2, 1,
datetime.datetime.now(), msg]
- continue
-
- # Informational messages are explicit created by our binary when the
- # sel is empty. This is needed to create the smbios_sel service in Nagios.
- if type == "I":
- sum_status = 0
- smbios_sel_msg_types["I%d"%num_errors] = [1, 0, 1,
datetime.datetime.now(), msg]
- continue
-
- type = int(type)
- if type in smbios_sel_msg_types:
- # Increase counter
- smbios_sel_msg_types[type][2] = smbios_sel_msg_types[type][2]+1;
-
- # Dynamically set the alias if none set yet
- if smbios_sel_msg_types[type][4] == None:
- smbios_sel_msg_types[type][4] = msg
-
- # Check if num threshold reached and set new sum_status
- # when this status is worse than the current sum_status
- if smbios_sel_msg_types[type][0] <= smbios_sel_msg_types[type][2]:
- if smbios_sel_msg_types[type][1] > sum_status:
- sum_status = smbios_sel_msg_types[type][1]
-
- # Save the date when the current entry is newer
- dt = datetime.datetime(*time.strptime(isodate, "%Y-%m-%d
%H:%M:%S")[:6])
- if smbios_sel_msg_types[type][3] == None or smbios_sel_msg_types[type][3]
< dt:
- smbios_sel_msg_types[type][3] = dt;
- else:
- # Unknown types will result in UNKNOWN state
- sum_status = 3
- smbios_sel_msg_types[type] = [1, 3, 1,
- datetime.datetime.now(),
- "Unknown log type (%s)" % type]
-
- sum_output = ""
- for type in smbios_sel_msg_types:
- if smbios_sel_msg_types[type][2] > 0:
- sum_output += "%s (Num: %d Last: %s) " % \
- (smbios_sel_msg_types[type][4],
- smbios_sel_msg_types[type][2],
- smbios_sel_msg_types[type][3])
-
- return (sum_status, sum_output)
-
-
-check_info["smbios_sel"] = {
- 'check_function': check_smbios_sel,
- 'inventory_function': inventory_smbios_sel,
- 'service_description': 'SMBIOS Event Log',
- 'group': 'hw_errors',
-}
diff --git a/doc/treasures/fsc-celsius-m470-sel-1.2.tar.gz
b/doc/treasures/fsc-celsius-m470-sel-1.2.tar.gz
deleted file mode 100644
index 49f2835..0000000
Binary files a/doc/treasures/fsc-celsius-m470-sel-1.2.tar.gz and /dev/null differ