Skip to content

zmousm/ubnt-nagios-plugins

Repository files navigation

ubnt-nagios-plugins
===================

Nagios plugins for monitoring UBNT radio links.
Supported platforms are AirMAX (http://www.ubnt.com/airmax) and
AirFiber (http://www.ubnt.com/airfiber).

Also included is a script for polling UBNT devices that can be
used with MRTG, Cacti etc. to monitor and collect any available
value(s).


The AirMAX plugin implicitly supports only point-to-point links, i.e. an
AP with a single STA. AirFiber is point-to-point anyway; only AF24 is
supported (the only model available at the time of this writing).

The data collection script is generic; it supports AirMAX, AirFiber
and possibly any other platforms that use the same data format and 
authentication mechanism.


All scripts login to the device's web interface (a read-only account
can be used) and fetch data in JSON format by requesting
e.g. /status.cgi; the same thing happens for data shown in the "main"
tab through a web browser.

Both Nagios plugins work with warning and critical thresholds. The
threshold format is explained at:
http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT

See the plugin usage (run with -h) for the labels of these
thresholds; they should be self-explanatory for each platform.

The AirFiber plugin additionally supports an arbitrary number of
checks for on/off values, as plenty of them are available on this
platform. The most meaningful are used by default (see the help for
boolean checks), but more may be available; look for them in the
output of http://device/status.cgi. To give an example how this can be
used, should you want to check that the operating speed of
eth0 (the Config port on AF24) is 100 Mbps, you would append this to
the boolean checks: interfaces[2].status.speed=100

The data collection script can return any value (one or more - MRTG
requires two values to be returned by such scripts) specified in such
notation. Moreover, a Python expression can be specified for
manipulating a value before it is returned by the script.

See the example configurations for Nagios and MRTG for usage examples
and ideas.


The plugins are inspired by the script posted at
http://forum.ubnt.com/showthread.php?t=27170
and are heavily based on this implementation
http://www.omniflux.com/devel/#ubntm
which is discussed at
http://forum.ubnt.com/showthread.php?t=27170

The basic difference is that data is fetched over HTTP rather than
over SSH. Arbitrary checks, specified in dotted notation (see above),
is another difference.

The data collection script is a stripped down version of the AirFiber
plugin (NagiosPlugin has been stripped out), on top of which some
nifty features were added in order to make it more generic. For the
most part, it would make sense to retrofit them to the Nagios plugins
as well.

--
Zenon Mousmoulas
Last updated: 2012-12-31

About

Nagios plugins for UBNT radios

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages