Howto install OMD Labs Edition (Nagios, Icinga 2, Check_MK)

,

OMD Network Monitoring Howto

EDIT - 26.1.2018

  • changed code blocks for better viewing

EDIT - 16.10.2017

  • added config changes to access all sites via http auth
  • added mail notification configuration
  • added nethserver-xinetd and nano install
  • added optional tags and nethserver 6 compatibility
  • changed from blockquotes to code blocks for better copy/paste, changed from bold text to headings

OMD is a web-manageable, feature-rich monitoring system. I know that there are better ways to integrate apps into Nethserver, but this was my first try. I’ll learn more about Nethserver and maybe I am able to present a better solution in the future. Some ideas: OMD site management via Nethserver web interface, adding sites to the applications automatically, setup Nethserver mail account for OMD. But for now, the quick and dirty way:

Install OMD

I just added the OMD Labs stable repo as described here: Consol Labs Repo:

Nethserver V7

rpm -Uvh "https://labs.consol.de/repo/stable/rhel7/i386/labs-consol-stable.rhel7.noarch.rpm"

Nethserver V6

rpm -Uvh "https://labs.consol.de/repo/stable/rhel6/i386/labs-consol-stable.rhel6.noarch.rpm"

Install OMD package

yum install omd-labs-edition nano nethserver-xinetd

or install specific OMD version(2.60 at the time of editing this article) with

yum install omd-2.60-labs-edition

Now you are able to create an OMD site. You may have multiple sites with different versions, which means multiple nagiosses, icingas etc.

omd create SITENAME

Then you may config your site:

omd config SITENAME

I set the core to nagios, which worked best for me.

I set multisite_auth to on and thruk_cookie_auth to off to have one http auth for all sites:

Then one may start OMD which starts your site.

omd start

That’s it. Just browse to “http(s)://NETHSERVER/SITENAME” and login with omdadmin and omd.

Application menu

To make the site available in the Nethserver applications menu I copied a php file in /usr/share/nethesis/NethServer/Module/Dashboard/Applications, named it OMD.php and opened it with nano:

cd /usr/share/nethesis/NethServer/Module/Dashboard/Applications cp Roundcube.php OMD.php nano OMD.php

My OMD.php:

<?php
namespace NethServer\Module\Dashboard\Applications;

class OMD extends \Nethgui\Module\AbstractModule implements \NethServer\Module\Dashboard\Interfaces\ApplicationInterface
{

  public function getName()
  {
    return "OMD";
  }

  public function getInfo()
  {
    $host = explode(':',$_SERVER['HTTP_HOST']);
    return array(
      'url' => "https://".$host[0]."/SITENAME",
    );
  }
}

Update OMD and sites

yum update omd-labs-edition

After updating OMD you may want to update your site:

omd stop SITENAME
omd update SITENAME
omd start SITENAME

Install check_mk client and monitor your Nethserver

check_mk agent needs xinetd

rpm -i /opt/omd/versions/2.60-labs-edition/share/check_mk/agents/check-mk-agent-1.2.8p20-1.noarch.rpm

On other clients download Agent via OMD Web Interface:
check_mk agent needs xinetd!

Redhat, CentOS, Nethserver etc

yum install xinetd
wget --no-check-certificate --http-user=omdadmin --http-passwd=omd https://NETHSERVER/SITENAME/check_mk/agents/check-mk-agent-1.2.8p20-1.noarch.rpm
rpm -i check-mk-agent-1.2.8p20-1.noarch.rpm

Debian, Ubuntu etc

apt-get install xinetd
wget --no-check-certificate --http-user=omdadmin --http-passwd=omd https://NETHSERVER/SITENAME/check_mk/agents/check-mk-agent_1.2.8p20-1_all.deb
dpkg -i check-mk-agent-1.2.8p20-1.noarch.rpm

For installing Windows client just download the Agent via Web Interface or browse to https://NETHSERVER/SITENAME/check_mk/agents/windows/check_mk_agent.msi and install it.

Notice that firewall port 6556 has to be open on the client to allow Nethserver to ask for system information.

Setup the new client on Nethserver

Browse to https://NETHSERVER/SITENAME/omd/check_mk

Scroll down the menu on the left, select Hosts and on the top right click the “New Host” button. Enter the hostname of your Nethserver or “localhost” and click “Save and go to services” then “Save” again and “Apply Changes” by clicking the orange button on the top. That’s it.

Mail notification configuration

Go to “Notifications” in “WATO - Configuration” and edit the notification rule. Enter an allowed from email address. So use a Nethserver user mail address or if you use a smarthost just use a mail address from your provider.

Go to “Users” and edit the omdadmin user. Enter an email address which will receive the notifications. Then set the contact group of omdadmin to “Everything”.

Screenshots

My Nethserver monitoring:

Monitoring an Raspberry Pi 3 Nethserver via another Nethserver:

11 Likes

Just split from this discussion. People can find more screenshots about your installation there.
Thanks @mrmarkuz for sharing. It’s a good starting for point :slight_smile:

1 Like

@mrmarkuz mrmarkuz thank you for your help on omd

Using Nethserver 7

i have installed the latest omd

yum install omd-3.20-labs-edition

then when i configured omd " omd config myomdsite "
i noticed that there is NO core option for nagios.
the option i chose was " naemon "
also there was NO OPTION for " MULTISITE_AUTHORISATION "
there is also NO " check_mk client " in " /opt/omd/versions/3.20-labs-edition/share/check_mk/agents/ "

any idea how i can get to use " nagios ", " MULTISITE_AUTHORISATION " and the " check_mk client " on my Nethserver?

any help greatly appreciated

Thanks for pointing that out.

There were some major changes since version 3, there’s no check_mk support anymore…

https://labs.consol.de/de/omd/migration_3.html

Here’s a discussion about dropping check_mk:

It should be still possible to use check_mk with omd but you have to install it manually (I didn’t test):

https://checkmk.de/download_version.php?&version=1.6.0p8&edition=cme

I am going to do some tests and adapt the howto…

2 Likes

mrmarkuz thank you for your support, much appreciated

will be awaiting your solution with anticipation

1 Like

@mrmarkuz how is this project going?

@oneitonitram

Hi

Why not use the IMHO much better Zabbix?

Also packaged by Markus, with a little help and nudging from me, it’s available as a NethServer Module.

Free like NethServer, all out of the box, not 10 different projects with as many update breaking points.
And great graphics…

My 2 cents
Andy

2 Likes

thanx @Andy_Wismer thanx for that.

just saw something on icinga and then saw this post

@oneitonitram

I have about 20-30 Clients with NethServers AND Zabbix Monitoring…
If you need a few tips, don’t hesitate to drop a line.

Andy

1 Like

let me finish the installation. then if anything comes up, ill hit you.

what server specs are zabix running on?

Zabbix runs in NethServer, so it runs in anything with a dual core CPU and 4 GB RAM.
As usual, the more the merrier!

:slight_smile:

I have all my Clients servers virtualized in Proxmox (Free like NethServer).
The NethServer gets 4-8 CPU cores and 8-16 GB RAM, depending on HW available.

NethServer runs as AD, Mail, File, NextCloud and Zabbix. Firewalling is done, as in the image above, usually with an OPNsense firewall (Free like Nethserver).

That saves me a lot of routing and firewalling issues. And OpenVPN and IPsec are a breeze to configure.

Andy