Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Nagios Plugin that enables Nagios to check L2P Devices from G. Lufft Mess- und Regeltechnik GmbH (e.g. OPUS20)
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


# nagios plugin for l2p devices
# (c) 2012, Ondics GmbH | |

1. description
2. installation
3. device detection in the local network
4. the plugin bash script
5. the nagios configuration example
6. licensing

1. description

This nagios plugin enables nagios to check
l2p devices, e.g. opus20 devices. it's written
in bash and uses the l2p script collection
l2p is the "lufft logger protocol" developed by
G. Lufft Mess- und Regeltechnik GmbH in Germany
(, a producer of climatological
precision measuring equipment.

2. installation
prerequisites are:
- l2p script collection installed
- ngrep to detect l2p devices in the local network
- bc for floating point calculations

a) download, install and test the l2p script collection.
   it is hosted on github. you can access it
   e.g by downloading zip file:
   or get it with git:
   git clone

   see script collection for installation. run test cases!
b) adjust ./local_env to your needs
   test the nagios plugin:
   > ./nagios-l2p-check --channel 160 --ipaddr
c) put the nagios l2p config file ./nagios-l2p.cfg in the
   nagios config directory OR make a link:
   > ln -s ~user/nagios-plugin/nagios-l2p.cfg  /etc/nagios3/conf.d/nagios-l2p.cfg
   if you don't have sufficient rights, use sudo
d) customize the nagios l2p config-file to your needs

it is recommended to use nagiosgraph for charting

3. device detection in the local network
e.g. for opus 20 thip device:
first initalize device with button on the backside (lan init).
then detect udp broadcast with:
> ngrep '' 'udp and port 52010'
attention: ngrep requires root to run, so as user 
> sudo ngrep '' 'udp and port 52010'
will work better

the result looks like:
# U ->

the ip address of this device is

alternatively the lufft smartgraph3 software can be used
(for free download check

4. the plugin bash script
> ./nagios-l2p-check -h

Nagios Plugin for L2P Devices

Usage: nagios-l2p-check [-h] ...

Plugin checks measured values on l2p devices.
    -d | --debug     talk about what's going on
    -h | --help      this help
    -l | --logging   log measured value to /tmp/nagios-l2p-check.log
    -version         just print version
    -v               nagios allows -v for verbosity
    --minwarn <...>  lower limit of warning range (default: 15)
    --maxwarn <...>  upper limit of warning range (default: 25)
    --mincrit <...>  lower limit of critial range (default: 5)
    --maxcrit <...>  upper limit of critial range (default: 30)
    --channel <ch>   l2p-channel to use (as decimal number, default: 100)
    --ipaddr <ip>    ip-address of l2p-device
    --port <num>     port of l2p-device (default: 52015)

(C) Ondics 2012, author:,

5. the nagios configuration example

The basic configuration elements are:
- the nagios command "check-l2p-value": modify path to your location.
  you can switch on logging by adding a "-l"
- an abstract service "generic-l2p-service"
and for each l2p device:
- host
- service (graphed for nagiosgraph!)

in the service, you should modify 
- the min/max-ranges for warning and critical states
- the l2p channel number
- the interval to request data

6. licensing
# The Script is dual licensed under commercial and GPL Version 3
# licenses. For commercial license conditions please contact us.
# As 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
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.

have fun!
Something went wrong with that request. Please try again.