Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FlorianHeigl/f4d91cc74ffd80fbe1f3bdad9d8b4dbe to your computer and use it in GitHub Desktop.
Save FlorianHeigl/f4d91cc74ffd80fbe1f3bdad9d8b4dbe to your computer and use it in GitHub Desktop.
Check_MK Check for Aruba Instant
title: Aruba Networks Instnat Wireless: Status of WLAN Accesspoints
agents: snmp
catalog: hw/network/aruba
license: GPL
distribution: check_mk
description:
This check automatically detects all accesspoints of an
Aruba Networks WLAN Controller which are up.
If an accesspoint goes down, the checks triggers a CRITICAL state.
Otherwise the check is OK.
item:
The accesspoint name.
inventory:
One service for each access point is created.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# check for aruba "instant" wireless via aiMib
# http://oid-info.com/cgi-bin/display?tree=1.3.6.1.4.1.14823.2.3.3.1.2(1.1,2.1,3.1#focus
# <fhe@deepthink.ag>
# used and unused oids are listed below for reference/extensions
# FYI: there's one more table with radio properties
def inventory_aruba_instant_aps(info):
print(info)
return [ (line[0], None) for line in info \
if line[1] == "1" ]
def check_aruba_instant_aps(item, params, info):
map_state = {
"1": (0, "up"),
"2": (2, "down"),
}
for ap_name, ap_status in info:
if item == ap_name:
state, state_readable = map_state[ap_status]
infotext = "Status: %s" % state_readable
yield state, infotext
check_info["aruba_instant_aps"] = {
'inventory_function': inventory_aruba_instant_aps,
'check_function': check_aruba_instant_aps,
'service_description': 'Access Point %s',
'snmp_info': ('.1.3.6.1.4.1.14823.2.3.3.1.2.1.1', [
#'1', # aiAPMADAddress
'2', # aiAPName
#'3', # aiAPIPAddress
#'4', # aiAPSerialNum
#'5', # aiAPModel
#'6', # aiAPModelName
#'7', # aiAPCPUUtilization
#'8', # aiAPMemoryFree
#'9', # aiAPUptime
#'10', # aiAPTotalMemory
'11', # aiAPStatus
]),
'snmp_scan_function': lambda oid: oid('.1.3.6.1.2.1.1.2.0').startswith('.1.3.6.1.4.1.14823.1.2'),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment