Page tree
Skip to end of metadata
Go to start of metadata


Description:

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.


Requirements:
  • LANCOM Large Scale Monitor
  • Command-line software Putty
  • FTP client software WinSCP


Procedure:

The following example shows how to create and activate checks of the WLAN error counter.
    Information:
    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:

  • #/usr/bin/python

    check_includes['lancom_univ_errors'] = [ 'lancom.include', 'lancom_errors.include' ]
    lancom_errors_declare_device("univ", "univ", ".11")

    lancom_univ_errorslancom_univ_errors
  • The file lancom_305agn_errors supports access points of the type LANCOM L-305agn:
    #/usr/bin/python

    check_includes['lancom_ 305agn _errors'] = [ 'lancom.include', 'lancom_errors.include' ]
    lancom_errors_declare_device ( "305agn" , "L-305agn" , ".600.6.305" )

    lancom_305agn_errorslancom_305agn_errors

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 . 1.3.6.1.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.

lancom_errors.includelancom_errors.include


2) Checking the WLAN error counter

The WLAN error counters are checked using the OIDs .1.3.6.1.4.1.2356.11.1.3.54.1.2 etc., or 1.3.6.1.4.1.2356.600.6.320.1.3.54.1.2, etc. The file lancom_errors.include begins with the definition of the names of the individual error counters.
    lancom_errors_labels = [
    'RxErrors',
    'TxErrors',
    'Stack-Errors',
    'NIC-Errors',
    'Bus-Errors',
    'Queue-Errors',
    'Tx-Discarded',
    'Retries',
    'Multiple-Retries',
    'Soft-Retries',
    'Dupe-Discarded',
    'Undecryptables',
    'Aged',
    'Michael-Errors',
    'IV-Sequence-Errors',
    'Rx-CRC-Errors',
    'Rx-Aggr.-Discarded',
    'Rx-PHY-Errors',
    'Rx-Restarts',
    'Rx-FIFO-Overflow',
    'Tx-FIFO-Underflow',
    ]

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] = (".1.3.6.1.4.1.2356" + midoid + ".1.3.54.1", [
"2", # RxErrors
"3", # TxErrors
"4", # Stack-Errors
"5", # NIC-Errors
"22",# Bus-Errors
"6", # Queue-Errors
"7", # Tx-Discarded
"8", # Retries
"9", # Multiple-Retries
"17",# Soft-Retries
"11",# Dupe-Discarded
"10",# Undecryptables
"13",# Aged
"14",# Michael-Errors
"15",# IV-Sequence-Errors
"16",# Rx-CRC-Errors
"18",# Rx-Aggr.-Discarded
"19",# Rx-PHY-Errors
"23",# Rx-Restarts
"20",# Rx-FIFO-Overflow
"21",# Tx-FIFO-Underflow
] )

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.

lancom_check_parameters.pylancom_check_parameters.py

    group = 'checkparams/Lancom'

    register_rule(
    group,
    "checkgroup_parameters:lancom_errors",
    Dictionary(
    title = _("Error counts for WLAN access points"),
    elements = [
    ( "levels",
    Tuple(
    title = _("Upper levels"),
    elements = [
    Integer(title = _("Warning at and above"), label = _("errors")),
    Integer(title = _("Critical at and above"), label = _("errors")),
    ])),
    ( "levels_low",
    Tuple(
    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 [
    'RxErrors',
    'TxErrors',
    'Stack-Errors',
    'NIC-Errors',
    'Bus-Errors',
    'Queue-Errors',
    'Tx-Discarded',
    'Retries',
    'Multiple-Retries',
    'Soft-Retries',
    'Dupe-Discarded',
    'Undecryptables',
    'Aged',
    'Michael-Errors',
    'IV-Sequence-Errors',
    'Rx-CRC-Errors',
    'Rx-Aggr.-Discarded',
    'Rx-PHY-Errors',
    'Rx-Restarts',
    'Rx-FIFO-Overflow',
    'Tx-FIFO-Underflow',
    ]],
    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.