LMD

new in release v2.12

LMD is a transparent livestatus proxy which fetches live data from several remote sites/backends and provides an aggregated livestatus API which can be used by Thruk. When enabled, LMD handles all the backend connection handling and livestatus aggregation.

Using LMD has multiple advantages:

  • It makes Thruk faster when connecting to many remote locations

  • It makes Thruk more stable when having unstable connections

  • LMD fixes some issues in backend specific livestatus implementations, ex.: Icinga 2

icinga2

It is recommended for Icinga 2 users to use LMD. However, Icinga2 is about to drop Livestatus support, so if possible use Naemon.

There are some slides available (in german)

Installation

LMD is written in golang, so we just need a single compiled binary to operate. It is included in OMD already or has to be build from source otherwise.

Using OMD-Labs

Having OMD-Labs in place is the easiest way to enable LMD. OMD includes LMD since version 2.20. The setup just takes these 3 steps like documented here:

Using the Source

The following steps assume you have installed Thruk from packages.

You will need at least go version 1.10 or later. You can check the version with go version.

First we need to install golang to compile the binary. Just grab go from the official download page and follow the instructions or use your package manager if golang already exists for your system. On Debian/Ubuntu its a simple

#> apt-get install golang

Then let’s create a golang environment in /opt/local

#> export GOPATH=/opt/local/go
#> mkdir -p $GOPATH

And install LMD

#> go get github.com/sni/lmd/lmd

You should now have a lmd binary in /opt/local/go/bin/lmd

Setup

It is best practice to create a lmd.conf file in your /etc/thruk/thruk_local.d folder with the following config settings.

use_lmd_core=1
lmd_core_bin=/opt/local/go/bin/lmd

Since LMD is totally transparent, there is no need to configure LMD, the lmd.ini file will be automatically generated and updated from Thruks backend configuration.

Finally all you need to do is to restart apache and open Thruk in your browser. After the first request you should be able to see a lmd process running.

Icinga2 Cluster Setup

With LMD you can easily connect Thruk to your Icinga2 HA Cluster. Just add both Icinga2 cluster nodes as 'peer' attributes in your <Component Thruk::Backend>.

<Component Thruk::Backend>
    <peer>
        name    = Icinga2 HA Cluster
        type    = livestatus
        <options>
            peer   = 172.16.0.1:6558
            peer   = 172.16.0.2:6558
        </options>
    </peer>
</Component>
Edit page on GitHub