1
0
This repository has been archived on 2025-03-31. You can view files and clone it, but cannot push or open issues or pull requests.
Files
check_mk-plugins/src/snell_iqh/checks/snell_iqh_faults
2017-11-28 15:05:15 +01:00

43 lines
1.4 KiB
Python

#!/usr/bin/python
# -*- coding: utf-8; py-indent-offset: 4 -*-
# _______ __ _ ____ __
# | | \ | |___ \ / /
# | | \| | __) | / /-,_
# | | |\ |/ __/ /__ _|
# |_______|_| \__|_____| |_|
#
# @author Markus Birth <markus.birth@weltn24.de>
# MIBs: ftp://ftp.snellgroup.com/RollCall/SNMP_MIBs/
def inventory_snell_iqh_faults(info):
inventory = [("Faults", None)]
return inventory
def check_snell_iqh_faults(item, _no_params, info):
faults = False
if len(info)>0 and len(info[0])>0:
faults = info[0][1]
if faults:
message = "%s" % (faults)
if faults[:2] == "OK":
status = 0
else:
status = 2
# perfdata = [ ("Sessions", int(sesscount), None, None, 0, 100) ]
return status, message
return 3, "Faults info not found in SNMP data."
check_info["snell_iqh_faults"] = {
"check_function" : check_snell_iqh_faults,
"inventory_function" : inventory_snell_iqh_faults,
"service_description" : "%s",
"snmp_info" : (".1.3.6.1.4.1.7995.1.3.1", [ "429.1.1", "475.1.1" ], [
OID_END,
2028, # Faults ("OK:None")
]),
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.7995.1.3"),
"has_perfdata" : False
}