2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
10 # | copyright mathias kettner 2013 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 # ails. 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.
27 # <<<sansymphony_ports>>>
28 # shdesolssy01_FE1 FibreChannel True
29 # Server_FC_Port_2 FibreChannel True
30 # Server_FC_Port_3 FibreChannel False
31 # Server_FC_Port_4 FibreChannel True
32 # Server_iSCSI_Port_1 iSCSI True
33 # Microsoft_iSCSI-Initiator iSCSI True
36 def inventory_sansymphony_ports(info
):
37 for portname
, _porttype
, portstatus
in info
:
38 if portstatus
== "True":
42 def check_sansymphony_ports(item
, _no_params
, info
):
43 for portname
, porttype
, portstatus
in info
:
45 if portstatus
== "True":
46 return 0, "%s Port %s is up" % (porttype
, portname
)
47 return 2, "%s Port %s is down" % (porttype
, portname
)
50 check_info
['sansymphony_ports'] = {
51 "check_function": check_sansymphony_ports
,
52 "inventory_function": inventory_sansymphony_ports
,
53 "service_description": "sansymphony Port %s",