01. 09. 2020 Alessandro Valentini Icinga Web 2, NetEye

NetPye: how to use a RaspberryPi as NetEye Satellite

This article explains how to set up a NetEye4 satellite using a Raspberry Pi. This is not an official guide and this solution is not officially supported.

As test-bed I used a Raspberry Pi 4B with 4GB of ram, 32GB microSD card and NetEye 4.12 single-node installation as master.

Master Configuration

Add a new zone and endpoint on your Master in the file /neteye/shared/icinga2/conf/icinga2/zones.d/satellites.conf
For example:

object Endpoint "netpye.vaal.lan" {
}

object Zone "netpye.vaal.lan" {
        endpoints = [ "netpye.vaal.lan" ]
        parent = "master"
}

validate the configuration and restart

icinga2-master daemon --validate
systemctl restart icinga2-master.service

Master is ready and you can install Linux on your Raspberry Pi.

Satellite Configuration

I have tested both CentOS 7 and Raspberry Pi OS, which is based on Debian Buster. The former is the distribution used in NetEye 4 and works fine on Raspberry Pi 4, however there isn’t offical Epel repository for ARM and several dependencies are missing or outdated also using unofficial repositories. For this reason I switched to Raspberry Pi OS in order to have a stable release to work with.

You can install the OS directly on the SD card using Raspberry Pi OS Imager available on the official website. Once logged into your Raspberry you should configure static IP and FQDN, change both Master and Satellite /etc/hosts files in order to make them able to ping each other using the FQDN and set the correct timezone.

Icinga is available for ARM on the official Icinga repository so we need only to add it and install the right version.

curl https://packages.icinga.com/icinga.key | sudo apt-key add -
echo "deb http://packages.icinga.com/raspbian icinga-buster main" \
  | sudo tee /etc/apt/sources.list.d/icinga.list

sudo apt update

Please note that you should use the same Icinga version running on NetEye master or at least the same minor. For NetEye 4.12 you can use Icinga 2.11.2:

sudo apt install icinga2=2.11.2-1.buster icinga2-bin=2.11.2-1.buster icinga2-common=2.11.2-1.buster icinga2-doc=2.11.2-1.buster

Now you can run the satellite wizard to configure the Raspberry as a satellite:

icinga2 node wizard

check configurations:

cat /etc/icinga2/features-enabled/api.conf
cat /etc/icinga2/constants.conf
icinga2 daemon --validate

restart Icinga and check logs for errors:

systemctl restart icinga2
tail -f /var/log/icinga2/icinga2.log

Finally run kick-start wizard and deploy changes to complete the installation.

The new satellite can be monitored using the host template and service set available on zampat

and checks can be executed from it

Final Thoughts

As you can see a cheap Raspberry Pi can be used as satellite with little effort using less than 100MB of ram to monitor a very basic infrastructure. However this solution has several drawbacks:

  • You cannot use official NetEye repositories for updates and bugfixes
  • Some checks are specific for x86 and you have to recompile or replace them: check_ping is a binary file and in my example I have replaced it with a custom script
  • Resources available are limited compared to a standard satellite and therefore also the number of executable checks
Alessandro Valentini

Alessandro Valentini

DevOps Engineer at Wuerth Phoenix
DevOps Engineer at Würth Phoenix

Author

Alessandro Valentini

DevOps Engineer at Würth Phoenix

Leave a Reply

Your email address will not be published. Required fields are marked *

Archive