2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
10 # | Copyright Mathias Kettner 2015 mk@mathias-kettner.de |
11 # +------------------------------------------------------------------+
13 # This file is part of Check_MK.
14 # The official homepage is at http://mathias-kettner.de/check_mk.
16 # check_mk is free software; you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License as published by
18 # the Free Software Foundation in version 2. check_mk is distributed
19 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
20 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
21 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
22 # tails. You should have received a copy of the GNU General Public
23 # License along with GNU Make; see the file COPYING. If not, write
24 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
25 # Boston, MA 02110-1301 USA.
28 # Agent section is empty
30 # From https://docs.oracle.com/cd/E23824_01/html/821-1451/glisy.html
32 # <<<solaris_fmadm:sep(58)>>>
33 # --------------- ------------------------------------ -------------- ---------
34 # TIME EVENT-ID MSG-ID SEVERITY
35 # --------------- ------------------------------------ -------------- ---------
36 # Aug 24 17:56:03 7b83c87c-78f6-6a8e-fa2b-d0cf16834049 SUN4V-8001-8H Minor
39 # Platform : SUNW,T5440 Chassis_id : BEL07524BN
40 # Product_sn : BEL07524BN
42 # Fault class : fault.cpu.ultraSPARC-T2plus.ireg
43 # Affects : cpu:///cpuid=0/serial=1F95806CD1421929
44 # faulted and taken out of service
45 # FRU : "MB/CPU0" (hc://:product-id=SUNW,T5440:server-id=bur419-61:\
46 # serial=3529:part=541255304/motherboard=0/cpuboard=0)
51 # Description : The number of integer register errors associated with this thread
52 # has exceeded acceptable levels.
54 # Response : The fault manager will attempt to remove the affected thread from
57 # Impact : System performance may be affected.
59 # Action : Use 'fmadm faulty' to provide a more detailed view of this event.
60 # Please refer to the associated reference document at
61 # http://sun.com/msg/SUN4V-8001-8H for the latest service
62 # procedures and policies regarding this diagnosis.
65 # <<<solaris_fmadm:sep(58)>>>
66 # --------------- ------------------------------------ -------------- -------
67 # TIME EVENT-ID MSG-ID SEVERITY
68 # --------------- ------------------------------------ -------------- -------
69 # Sep 21 10:01:36 d482f935-5c8f-e9ab-9f25-d0aaafec1e6c PCIEX-8000-5Y Major
71 # Fault class : fault.io.pci.device-invreq
72 # Affects : dev:///pci@0,0/pci1022,7458@11/pci1000,3060@0
73 # dev:///pci@0,0/pci1022,7458@11/pci1000,3060@1
75 # dev:///pci@0,0/pci1022,7458@11/pci1000,3060@2
76 # dev:///pci@0,0/pci1022,7458@11/pci1000,3060@3
77 # faulty and taken out of service
78 # FRU : "SLOT 2" (hc://.../pciexrc=3/pciexbus=4/pciexdev=0)
80 # "SLOT 3" (hc://.../pciexrc=3/pciexbus=4/pciexdev=1)
82 # "SLOT 4" (hc://.../pciexrc=3/pciexbus=4/pciexdev=2)
84 # "SLOT 5" (hc://.../pciexrc=3/pciexbus=4/pciexdev=3)
87 # Description : The transmitting device sent an invalid request.
89 # Response : One or more device instances may be disabled
91 # Impact : Possible loss of services provided by the device instances
92 # associated with this fault
94 # Action : Use 'fmadm faulty' to provide a more detailed view of this event.
95 # Please refer to the associated reference document at
96 # http://sun.com/msg/PCIEX-8000-5Y for the latest service
97 # procedures and policies regarding this diagnosis.
100 # <<<solaris_fmadm:sep(58)>>>
101 # --------------- ------------------------------------ -------------- ---------
102 # TIME EVENT-ID MSG-ID SEVERITY
103 # --------------- ------------------------------------ -------------- ---------
104 # Jun 05 22:11:06 66b65c7f-33c4-4625-94dc-b35e1926ab47 PCIEX-8000-YJ Major
106 # Problem Status : isolated
107 # Diag Engine : eft / 1.16
109 # Manufacturer : unknown
110 # Name : SPARC-Enterprise-M4000-Server
111 # Part_Number : unknown
112 # Serial_Number : BCF1030049
115 # ----------------------------------------
117 # Problem class : fault.io.pciex.device-pcie-ce
119 # Affects : dev:////pci@0,600000/pci@0/pci@9/SUNW,emlxs@0
120 # Status : faulted and taken out of service
124 # Location : "/SYS/iou#0-pci#1"
125 # Manufacturer : unknown
127 # Part_Number : unknown
129 # Serial_Number : unknown
131 # Manufacturer : unknown
132 # Name : SPARC-Enterprise-M4000-Server
133 # Part_Number : unknown
134 # Serial_Number : BCF1030049
135 # ----------------------------------------
137 # Problem class : fault.io.pciex.device-pcie-ce
139 # Affects : dev:////pci@0,600000/pci@0/pci@9
140 # Status : faulted and taken out of service
144 # FMRI : "hc:///compon"nt=iou#0"
145 # Manufacturer : unknown
147 # Part_Number : unknown
149 # Serial_Number : unknown
151 # Manufacturer : unknown
153 # Part_Number : unknown
154 # Serial_Number : unknown
156 # Location : "iou#0-pci#1"
160 def parse_solaris_fmadm(info
):
165 for entry
in ":".join(info
[3]).split():
171 "time": " ".join(event
[:-3]),
174 "severity": event
[-1].lower(),
180 for line
in info
[4:]:
181 stripped
= [x
.strip() for x
in line
]
182 if stripped
[0] in ["Problem class", "Fault class"]:
183 parsed
["problems"].append(":".join(stripped
[1:]))
188 def inventory_solaris_fmadm(parsed
):
189 return [(None, None)]
192 def check_solaris_fmadm(_no_item
, params
, parsed
):
194 yield 0, "No faults detected"
198 "minor": (1, "minor"),
199 "major": (2, "major"),
200 "critical": (2, "critical"),
203 event
= parsed
["event"]
204 state
, state_readable
= map_state
.get(event
["severity"], (3, "unknown"))
205 yield state
, "Severity: %s (%s)" % (state_readable
, event
["time"])
207 problems
= parsed
["problems"]
209 yield 0, "Problems: %s" % ", ".join(problems
)
212 check_info
['solaris_fmadm'] = {
213 'parse_function': parse_solaris_fmadm
,
214 'inventory_function': inventory_solaris_fmadm
,
215 'check_function': check_solaris_fmadm
,
216 'service_description': 'FMD Status',