Skip to content
Permalink
Browse files

added checks for AKCP securityProbes with daisy chained expansion boa…

…rds and moved some common AKCP functionality to akcp_sensor.include, akcp_sensor_drycontact service description has changed from Device to Dry Contact
  • Loading branch information
Lutz Helwing
Lutz Helwing committed Feb 3, 2015
1 parent 443eba9 commit 02aecf9b57a9eb02a16aac89a26eeb285d64da01

This file was deleted.

@@ -6,13 +6,13 @@ distribution:
description:
This check monitors the temperature of sensors attached
to AKCP daisyTemp sensor chain. The first attached sensor will be irgnored,
because this sensor is already represented by the the check akc_sensor_temp.
because this sensor is already represented by the the check akcp_sensor_temp.

item:
The item is the sensor description of the sensor as string.
The description of the sensor as string as specified by the user during board configuration.

perfdata:
the current temperature in degree celsius
The current temperature in degree celsius.

inventory:
All available (without the first, see description) temperature sensors are automatically inventorized.
@@ -0,0 +1,36 @@
title: AKCP Expansion Sensor Humidity
agents: snmp
catalog: hw/environment/akcp
license: GPL
distribution: check_mk
description:
This check monitors all online humidity sensors on AKCP securityProbe environment monitoring boards which have expansion boards
daisy chained to them.

item:
The description of the sensor as string as specified by the user during board configuration.

perfdata:
The current humidity in percent, lower crit, lower warn, upper warn, upper crit.

inventory:
All online humidity sensors are automatically detected and inventorized.

examples:
# set default levels for all akcp humidity sensors
akcp_sensor_humidity_defaultlevels = (35, 40, 60, 65)

# to Overwrite the default levels for a sensor
checks += [
( 'hostname', "akcp_expansion_sensor_humidity", 'sensor description', ( lower crit, lower warn, upper warn, upper crit ) ),
]

[parameters]
critical low (int): lower border for triggering critical level
warning low (int): lower border for warning level
warning high (int): upper border for triggering warning level
critical high (int): upper border for critical level

[configuration]
akcp_expansion_sensor_humidity (int, int, int, int): default levels for lower critical lower warning
and upper warning, upper critical. Preset to ( 35, 40, 60, 65 ).
@@ -0,0 +1,16 @@
title: AKCP Expansion Smoke Sensor
agents: snmp
catalog: hw/envirnoment/akcp
license: GPL
distribution: check_mk
description:
This check monitors the state of all online smoke sensors on AKCP securityProbe environment monitoring boards which have expansion boards
daisy chained to them.
If the sensors's state is 'normal' or 'relay off' the check results in OK. The sensor states 'no status', or 'sensor is offline' lead
to an UNKN result. When the sensor state is one of 'high critical', 'low critical', 'sensor error' or 'relay on' the check results in CRIT.

item:
The description of the sensor as string as specified by the user during board configuration.

inventory:
All online smoke sensors are automatically detected and inventorized.
@@ -0,0 +1,31 @@
title: AKCP Expansion Sensor Temperature
agents: snmp
catalog: hw/environment/akcp
license: GPL
distribution:
description:
This check monitors all online temperature sensors on AKCP securityProbe environment monitoring boards which have expansion boards
daisy chained to them.

item:
The description of the sensor as string as specified by the user during board configuration.

perfdata:
The current temperature in degree celsius.

inventory:
All online temperature sensors are automatically detected and inventorized.

examples:
# set default levels for all akcp temperature sensors
akcp_sensor_temp_defaultlevels = (32, 35)

[parameters]
critical low (int): lower border for triggering critical level
warning low (int): lower border for warning level
warning high (int): upper border for triggering warning level
critical high (int): upper border for critical level

[configuration]
akcp_sensor_temperature_defaultlevels (int, int): Default levels. This is
preset to {(32, 35)}.
@@ -0,0 +1,16 @@
title: AKCP Expansion Water Sensor
agents: snmp
catalog: hw/envirnoment/akcp
license: GPL
distribution: check_mk
description:
This check monitors the state of all online water sensors on AKCP securityProbe environment monitoring boards which have expansion boards
daisy chained to them.
If the sensors's state is 'normal' or 'relay off' the check results in OK. The sensor states 'no status', or 'sensor is offline' lead
to an UNKN result. When the sensor state is one of 'high critical', 'low critical', 'sensor error' or 'relay on' the check results in CRIT.

item:
The description of the sensor as string as specified by the user during board configuration.

inventory:
All online water sensors are automatically detected and inventorized.
@@ -9,8 +9,7 @@ description:
this states.

item:
The item is the sensor description of the sensor as string.

The description of the sensor as string as specified by the user during board configuration.

inventory:
All available sensors are automatically inventorized.
@@ -8,10 +8,10 @@ description:
to AKCP SensorProbe.

item:
The item is the sensor description of the sensor as string.
The description of the sensor as string as specified by the user during board configuration.

perfdata:
the current humidity in percent, lower crit, lower warn, upper warn, upper crit
The current humidity in percent, lower crit, lower warn, upper warn, upper crit.

inventory:
All available humidity sensors are automatically inventorized.
@@ -8,10 +8,10 @@ description:
to AKCP SensorProbe.

item:
The item is the sensor description of the sensor as string.
The description of the sensor as string as specified by the user during board configuration.

perfdata:
the current temperature in degree celsius
The current temperature in degree celsius.

inventory:
All available temperature sensors are automatically inventorized.
@@ -62,7 +62,7 @@ check_info["akcp_daisy_temp"] = {
]
),
'snmp_scan_function': lambda oid: oid(".1.3.6.1.2.1.1.2.0") in \
[ ".1.3.6.1.4.1.3854.1.2.2.1.1", ".1.3.6.1.4.1.3854.1" ],
[ ".1.3.6.1.4.1.3854.1.2.2.1.1", ".1.3.6.1.4.1.3854.1" ] and not oid('.1.3.6.1.4.1.3854.2.*'),
'group' : 'room_temperature',
'includes' : [ 'temperature.include' ],
}
@@ -0,0 +1,54 @@
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
# +------------------------------------------------------------------+
#
# This file is part of Check_MK.
# The official homepage is at http://mathias-kettner.de/check_mk.
#
# check_mk is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation in version 2. check_mk is distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more de-
# ails. You should have received a copy of the GNU General Public
# License along with GNU Make; see the file COPYING. If not, write
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.


# Example for contents of info
# description percent status online
# ['Port 8 Feuchte USV Raum A', '38', '5', '1']

def inventory_akcp_expansion_sensor_humidity(info):
return inventory_akcp_sensor(info, 'akcp_sensor_humidity_defaultlevels')


def check_akcp_expansion_sensor_humidity(item, params, info):
return check_akcp_sensor_humid(item, params, info)


check_info['akcp_expansion_sensor_humidity'] = {
'check_function' : check_akcp_expansion_sensor_humidity,
'inventory_function' : inventory_akcp_expansion_sensor_humidity,
'service_description' : 'Humidity %s',
'has_perfdata' : True,
'snmp_scan_function' : snmp_scan_akcp_expansion_sensor,
'snmp_info' : ( '.1.3.6.1.4.1.3854.2.3.3.1', [
2, # SPAGENT-MIB::sensorHumidityDescription
4, # SPAGENT-MIB::sensorHumidityPercent
6, # SPAGENT-MIB::sensorHumidityStatus
8, # SPAGENT-MIB::sensorHumidityGoOffline
] ),
'group' : 'humidity',
'includes' : [ 'akcp_sensor.include' ],
}
@@ -24,45 +24,28 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.

# Example for contents of info
# description state
# ['Port 4 Rauchmelder USV Raum A', '2'],
# ['Port 5 Rauchmelder USV Raum B', '2'],
# ['Port 5 Rauchmelder Warmgang links', '2'],
# ['Port 4 Rauchmelder Warmgang rechts', '2'],
# ['Port 6 Rauchmelder RZ Klima', '2']


def inventory_akcp_daisy_smoke(info):
for line in info:
yield line[0], None
# Example for contents of info
# description state online
# ['Port 4 Rauchmelder USV Raum A', '2', '1']

def inventory_akcp_expansion_sensor_smoke(info):
return inventory_akcp_sensor(info)

def check_akcp_daisy_smoke(item, _no_params, info):
# States as they are defined in corresponding MIB: SPAGENT-MIB
states = {
'1' : (3, 'no status' ),
'2' : (0, 'normal' ),
'4' : (2, 'high critical' ),
'6' : (2, 'low critical' ),
'7' : (2, 'sensor error' ),
'8' : (3, 'relay on' ),
'9' : (3, 'relay off' ),
}

for sensor_description, state_id in info:
if item == sensor_description:
state, state_name = states[state_id]
return state, 'State: %s' % state_name
def check_akcp_expansion_sensor_smoke(item, _no_params, info):
return check_akcp_sensor_relay(item, info)


check_info['akcp_daisy_smoke'] = {
'check_function' : check_akcp_daisy_smoke,
'inventory_function' : inventory_akcp_daisy_smoke,
check_info['akcp_expansion_sensor_smoke'] = {
'check_function' : check_akcp_expansion_sensor_smoke,
'inventory_function' : inventory_akcp_expansion_sensor_smoke,
'service_description' : 'Smoke %s',
'snmp_scan_function' : lambda oid: oid('.1.3.6.1.2.1.1.2.0').startswith('.1.3.6.1.4.1.3854.1') and oid('.1.3.6.1.4.1.3854.2.*'),
'snmp_scan_function' : snmp_scan_akcp_expansion_sensor,
'snmp_info' : ( '.1.3.6.1.4.1.3854.2.3.14.1', [
2, # SPAGENT-MIB:sensorSmokeDescription
6, # SPAGENT-MIB:sensorSmokeStatus
2, # SPAGENT-MIB:sensorSmokeDescription
6, # SPAGENT-MIB:sensorSmokeStatus
8, # SPAGENT-MIB::sensorSmokeGoOffline
] ),
'includes' : [ 'akcp_sensor.include' ],
}
@@ -0,0 +1,61 @@
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | "_ \ / _ \/ __| |/ / | |\/| | " / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
# +------------------------------------------------------------------+
#
# This file is part of Check_MK.
# The official homepage is at http://mathias-kettner.de/check_mk.
#
# check_mk is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation in version 2. check_mk is distributed
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more de-
# ails. You should have received a copy of the GNU General Public
# License along with GNU Make; see the file COPYING. If not, write
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.


# Example for contents of info
# description degree unit status low_crit low_warn high_warn high_crit degreeraw online
# ["Port 8 Temperatur CL Lager", "20", "C", "5", "10", "20", "30", "40", "0", 1]

def inventory_akcp_expansion_sensor_temp(info):
return inventory_akcp_sensor(info)


def check_akcp_expansion_sensor_temp(item, params, info):
return check_akcp_sensor_temperature(item, params, info)


check_info["akcp_expansion_sensor_temp"] = {
"check_function" : check_akcp_expansion_sensor_temp,
"inventory_function" : inventory_akcp_expansion_sensor_temp,
"service_description" : "Temperature %s",
"has_perfdata" : True,
"default_levels_variable" : "akcp_sensor_temp_default_levels",
"snmp_scan_function" : snmp_scan_akcp_expansion_sensor,
"snmp_info" : ( ".1.3.6.1.4.1.3854.2.3.2.1", [
2, # SPAGENT-MIB::sensorTemperatureDescription
4, # SPAGENT-MIB::sensorTemperatureDegree
5, # SPAGENT-MIB::sensorTemperatureUnit
6, # SPAGENT-MIB::sensorTemperatureStatus
9, # SPAGENT-MIB::sensorTemperatureLowCritical
10, # SPAGENT-MIB::sensorTemperatureLowWarning
11, # SPAGENT-MIB::sensorTemperatureHighWarning
12, # SPAGENT-MIB::sensorTemperatureHighCritical
19, # SPAGENT-MIB::sensorTemperatureRaw - SP Only: The raw degree data from the temperature sensor, slightly hig
8, # SPAGENT-MIB::sensorTemperatureGoOffline
] ),
"group" : "temperature",
"includes" : [ "temperature.include", "akcp_sensor.include" ],
}

0 comments on commit 02aecf9

Please sign in to comment.
You can’t perform that action at this time.