The LANCOM Large Scale Monitor (LSM) is equipped with a series of checks that query many of the parameters of LANCOM devices. However, it is inevitable that there will be parameters that are not checked, but which are nevertheless important for the given application.
This document describes how you can write your own checks on parameters that are currently unused.
- LANCOM Large Scale Monitor
- Command-line software Putty
- FTP client software WinSCP
The following example shows how to create and activate checks of the WLAN error counter.
Copy the newly created checks to the directory
/opt/omd/sites/lsm/local/share/check_mk/checks . Usually, two files are required per check. However, checks of the same type can be handled together.
1) Setting the MIB to use
First you must determine whether the new checks are for a device with the universal LANCOM MIB or for an older device without the universal MIB.
- The file lancom_univ_errors is suitable for all LANCOM devices with the universal MIB:
check_includes['lancom_univ_errors'] = [ 'lancom.include', 'lancom_errors.include' ]
lancom_errors_declare_device("univ", "univ", ".11")
- The file lancom_305agn_errors supports access points of the type LANCOM L-305agn:
305agn _errors'] = [ 'lancom.include',
All LANCOM devices are addressed by SNMP either using the standardized OIDs, e.g. for the Ethernet interface, or via private OIDs. With LANCOM, these always begin with . 22.214.171.124.4.1.2356, where the number 2356 identifies LANCOM.
This is followed by .11 for the devices with universal MIB, or an individual value (mostly three separate digits) which differs for each type of device. For example: .600.6.305 for L-305agn devices. The values for the individual devices can be found in the file OID lancom devices.txt.
The file lancom_univ_errors can be used unchanged. For new checks, you need to adjust the items marked in green and save to an appropriately named new file.
For devices with an individual MIB, a separate, suitably named file needs to be created for each device and the items marked in yellow updated accordingly. The actual check is located in the file lancom_errors.include.
2) Checking the WLAN error counter
The WLAN error counters are checked using the OIDs .126.96.36.199.4.1.23188.8.131.52.54.1.2 etc., or 184.108.40.206.4.1.2356.600.6.3220.127.116.11.1.2, etc. The file lancom_errors.include begins with the definition of the names of the individual error counters.
lancom_errors_labels = [
These name appear next to the checks in the LSM.
Further down the file are the OID definitions that will be used for the individual checks of the error counters.
snmp_info[basename] = (".18.104.22.168.4.1.2356" + midoid + ".22.214.171.124", [
"2", # RxErrors
"3", # TxErrors
"4", # Stack-Errors
"5", # NIC-Errors
"6", # Queue-Errors
"7", # Tx-Discarded
"8", # Retries
"9", # Multiple-Retries
Collecting the checks of different values—in this case of error counters—into a single file is only possible and only make sense when the parameters can be checked under the same OID, or at least if they are grouped in a meaningful manner.
3) Specify threshold values for the WLAN error counters
The threshold values are specified in a Python file. This example uses the file lancom_check_parameters.py. Copy this into the directory /opt/omd/sites/lsm2/local/share/check_mk/web/plugins/wato.
group = 'checkparams/Lancom'
title = _("Error counts for WLAN access points"),
elements = [
title = _("Upper levels"),
elements = [
Integer(title = _("Warning at and above"), label = _("errors")),
Integer(title = _("Critical at and above"), label = _("errors")),
title = _("Lower levels"),
elements = [
Integer(title = _("Warning at and below"), label = _("errors")),
Integer(title = _("Critical at and below"), label = _("errors")),
itemtype = "item",
itemenum = [(x,x) for x in [
itemname = _("Class of Error"))
4) Using the new checks
After you have modified the files and copied them to the appropriate directories, the site needs to be restarted from the command line:
omd restart lsm
Then the devices with the modified checks need to be newly inventoried.
After enabling the new checks you set the rules for the threshold values.
- In the CONFIG under Device&Check parameters in the section Parameter for inventorized checks, go to the section LANCOM to find the option for setting the error counts for WLAN access points. This rule set allows you to create rules for the threshold values of the error counters.
The item Class of error, which displays all errors when enabled, specifies which errors are given a threshold value by this rule.
The final step is to activate the configuration changes so that these come into effect for the monitoring.