Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit fe7a086a authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

cleanup

parents
No related branches found
No related tags found
No related merge requests found
# [CHECKNAME]
Monitors status of Check Point [SHORT DESCRIPTION]
Check Info:
* *service*: [HOW WILL SERVICES BE CREATED]
* *state*: [WHEN WILL THE CHECK be **critical** or **warning** or **ok** or **unknown**]
* *wato*: [SHORT DESCRIPTIONOF WATO OPTIONS or none]
* *perfdata*: [LIST OF PERFDATA]
Testetd with: [short info about testing]
**Note: check with your hardware manual the disk id and disk placement (upper/lower)**
Sample output
![sample output](/doc/sample.png?raw=true "sample [SHORT TITLE]")
title: Cisco WLC: temperatur sensors
agents: snmp
author: Th.L.
catalog: hw/network/cisco
license: GPLv3
distribution: unkown
description:
The Cisco "Wireless LAN Controller" (WLC) has some temperatur sensors.
This check allows to monitor this sensors. Default levels are 60°/70° celsius
for warning/critical.
The check uses the bsnSensorTemperature from the AIRESPACE-WIRELESS-MIB (1.3.6.1.4.1.14179).
The check is tested against WLC2504 devices.
perfdata:
Temperatur
item:
One item per temperatur sensor is generated.
inventory:
The check detects WLC temperatur sensors and saves them.
parameters:
Warning/Critical levels. Default is 60°/70° celsius.
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# created by Th.L.:
# Monitors Cisco WLC temperatur sensors
# tested with WLC2504
# 02.07.2016: fixed crit/warn to >=
# 14.09.2018: workaround for wrong data from Mobility Express Controller --> removed
#
#
# sample info
#
# [[u'1', u'38', u'0', u'65']]
#
cisco_wlc_temp_default_levels = (50, 60)
def inventory_cisco_wlc_temp(info):
environment, temperature, lowlimit, highlimit = info[0]
cisco_wlc_temp_levels = cisco_wlc_temp_default_levels
highlimit = int(highlimit)
lowlimit = int(lowlimit)
if cisco_wlc_temp_levels[1] >= highlimit >= 15:
cisco_wlc_temp_levels = (highlimit - 15, highlimit - 5) # stay on the save side
return [(None, cisco_wlc_temp_levels)]
def check_cisco_wlc_temp(item, params, info):
state = 0
infotext = ''
longoutput = ''
warn, crit = params
environment, temperature, lowlimit, highlimit = info[0]
environment = int(environment)
temperature = int(temperature)
# workarounfd for Mobility Express controller, announces a temperature of 5000
# if temperature > 1000:
# temperature = temperature/100
lowlimit = int(lowlimit)
highlimit = int(highlimit)
infotext += u'%d\xB0C' % temperature
longoutput += u'\nlimits: low/high %d\xB0C/%d\xB0C' % (lowlimit, highlimit )
if environment == 1:
longoutput += u'\ncommercial operating environment (0\xB0C to 40\xB0C)'
elif environment == 2:
longoutput += u'\nindustrial operating environment (-10\xB0C to 70\xB0C)'
perfdata = [('celsius', temperature, warn, crit, lowlimit, highlimit)]
if temperature >= crit:
state = 2
infotext += ' (>= %d)' % crit
elif temperature >= warn:
state = 1
infotext += ' (>= %d)' % warn
return state, infotext + longoutput, perfdata
check_info['cisco_wlc_temp'] = {
'check_function' : check_cisco_wlc_temp,
'inventory_function' : inventory_cisco_wlc_temp,
'service_description': 'Environment: Internal Temperature',
'has_perfdata' : True,
'group' : 'cisco_wlc_temp',
'snmp_scan_function': lambda oid: oid('.1.3.6.1.2.1.1.1.0') == 'Cisco Controller',
'snmp_info' : ('.1.3.6.1.4.1.14179.2.3.1', [ # AIRESPACE-WIRELESS-MIB::bsnGlobalDot11Config
'12', # bsnOperatingTemperatureEnvironment
'13', # bsnSensorTemperature (Current Internal Temperature of the unit in Centigrade)
'14', # bsnTemperatureAlarmLowLimit
'15', # bsnTemperatureAlarmHighLimit
]),
}
File added
doc/sample.png

1.43 KiB

{'author': u'Th.L. (thl-cmk[at]outlook[dot]com)',
'description': u'monitor Cisco WLC temperatur sensor\n\ntested with WLC2504\n',
'download_url': 'https://thl-cmk.hopto.org',
'files': {'checkman': ['cisco_wlc_temp'],
'checks': ['cisco_wlc_temp'],
'web': ['plugins/wato/cisco_wlc_temp.py',
'plugins/metrics/cisco_wlc_temp.py']},
'name': 'cisco_wlc_temp',
'num_files': 4,
'title': u'monitor Cisco WLC temperatur sensor',
'version': '20180805.v.0.0.1',
'version.min_required': '1.2.8b8',
'version.packaged': '1.4.0p35'}
\ No newline at end of file
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# Cisco wlc temperature metrics plugin
#
# Author: Th.L.
# Date : 2018-03-18
#
#
#####################################################################################################################
#
# define units
#
#####################################################################################################################
#####################################################################################################################
#
# define metrics
#
#####################################################################################################################
metric_info['cisco_wlc_temp_celsius'] = {
'title': _('Internal temperature'),
'unit': 'c',
'color': '26/a',
}
######################################################################################################################
#
# map perfdata to metric
#
######################################################################################################################
check_metrics['check_mk-cisco_wlc_temp'] = {
'celsius': {'name': 'cisco_wlc_temp_celsius', },
}
######################################################################################################################
#
# how to graph perdata
#
######################################################################################################################
graph_info.append({
'title': _('WLAN controller internal temperature'),
'metrics': [
('cisco_wlc_temp_celsius', 'area'),
],
'range': (0, 'cisco_wlc_temp_celsius:max'),
'scalars': [
('cisco_wlc_temp_celsius:crit', _('crit level')),
('cisco_wlc_temp_celsius:warn', _('warn level')),
],
})
######################################################################################################################
#
# define perf-o-meter
#
######################################################################################################################
perfometer_info.append({
'type': 'logarithmic',
'metric': 'cisco_wlc_temp_celsius',
'half_value': 150,
'exponent': 2,
})
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
#
# Author : Th.L.
# Content: wato plugin for snmp check 'cisco_wlc_temp'
# to configure waring/critical levels
#
#
register_check_parameters(
subgroup_environment,
'cisco_wlc_temp',
_('Cisco WLC temperatur sensor'),
Tuple(
title=_('Cisco WLC temperatur sensor thresholds'),
elements=[
Integer(title=_('warning at'), unit=_('° celsius'), default_value=50),
Integer(title=_('critical at'), unit=_('° celsius'), default_value=60),
]
),
None,
None
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment