# Home Lab Network Monitoring Tools

**URL:** <https://discussion.scottibyte.com/t/home-lab-network-monitoring-tools/446>\
**Category:** Uncategorized\
**Created:** [July 4, 2024, 9:32pm UTC](https://discussion.scottibyte.com/t/home-lab-network-monitoring-tools/446 "2024-07-04T21:32:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://discussion.scottibyte.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://discussion.scottibyte.com/u/scott)\
**Post date:** [July 4, 2024, 9:32pm UTC](https://discussion.scottibyte.com/t/home-lab-network-monitoring-tools/446/1 "2024-07-04T21:32:45Z")

</div>

Today we learn how to install [NetAlertX](https://github.com/jokob-sk/NetAlertX), a network monitoring tool. We are installing [Apprise](https://github.com/caronc/apprise) which is a notification API with access to over 60 services. We also install [Gotify](https://github.com/gotify) which is a websocket based push notification and messaging system. Finally, we configure NetAlertX to send network event alerts through Apprise to Gotify.

I have chosen to install each application in its own Incus container and present all three containers to addresses on the main LAN using the skills presented in [Incus Containers Step by Step](https://www.youtube.com/watch?v=ULPuU9aKyoU).

First we are going to install [NetAlertX](https://github.com/jokob-sk/NetAlertX) which is a web based network monitoring tool that can inventory and track the state of all devices on your network.

**UPDATE: December 2025 there have been breaking updates with NetAlertX as well as security improvements that I have implemented. Therefore, some of the setup below has been amended beyond what was originally presented in the video tutorial.**

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/5/5acc86471d382c44154733aef3b5e389bc9a7b34.jpeg)

Create an incus container for NetAlertX on your incus server:

```auto
incus launch images:ubuntu/24.04 NetAlertX -c boot.autostart=true -c security.nesting=true -p default -p bridgeprofile

```

Connect to the container:

```auto
incus shell NetAlertX

```

Take all of the updates. Install the dependencies. Install Docker. Add myself a user account and add my user account to the sudo and docker groups.

```auto
apt update && apt upgrade -y
apt install curl nano net-tools openssh-server -y
curl -sSL https://get.docker.com | sh
adduser scott
usermod -aG sudo scott
usermod -aG docker scott

```

Move over to my user account.

```auto
su - scott

```

Make a folder for the app and move into it.

```auto
mkdir netalertx
cd netalertx

```

Create a NetalertX user group:

```auto
sudo groupadd -g 20211 netalertx

```

Create a NetAlertX user:

```auto
sudo useradd -u 20211 -g 20211 -d /nonexistent -s /usr/sbin/nologin netalertx

```

Create a data folder and set ownership and permissions on the folder:

```auto
mkdir -p data/config data/db data/reports
sudo chown -R 20211:20211 ./data
sudo chmod -R u+rwX,go-rwx ./data

```

Create a docker compose file.

```auto
nano docker-compose.yml

```

Insert the following into the file:

```auto
services:
  netalertx:
    container_name: netalertx
    image: "ghcr.io/jokob-sk/netalertx"
    network_mode: "host"
    user: "20211:20211"
    cap_drop:
      - ALL
    cap_add:
      - NET_RAW
      - NET_ADMIN
      - NET_BIND_SERVICE
    restart: unless-stopped
    volumes:
      - ./data:/data
    environment:
      - TZ=America/Chicago
      - PORT=20211
    read_only: true
    tmpfs:
      - "/tmp:uid=20211,gid=20211,mode=1700,rw,noexec,nosuid,nodev,async,noatime,nodiratime"

```

Change your time zone if desired and SAVE the file with CTRL O and Enter and then CTRL X to exit the editor.

Launch NetAlertX.

```auto
docker compose up -d

```

Check the address for your NetAlertX by looking for the address of your eth0 device.

```auto
ifconfig

```

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/2/21b8fac80b764ffd6884735ab24385581225db24.jpeg)

Visit this address in your browser and go into the NetAlertX settings menu and scroll down to the “SCAN\_SUBNETS” option and enter your network which may be something like 192.168.1.0/24 --interface=eth0. Note that you want to specify eth0 rather than the default of eth1.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/d/d94dc4e3ff25d0f95bfcde57ff3359a36539ca35.jpeg)

My LAN address entry looks like this:

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/c/cca6657a475042f18dd0551bba10c61f0357ec57.png)

Be sure to click the “Save” at the bottom of the screen after making changes to NetAlertX.

After about five minutes, you should begin to see discovered systems.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/0/024e026ece4508de638f4b034c4c54f46eb7f573.jpeg)

You will want to select each device in the listing and update its name according if it is not correct and uncheck the “New Device” checkbox at a minimum.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/5/5f68c79781c3186260778c541f82fe3c4c3e64ad.jpeg)

Once you click “Save” and go back to the dashboard, the system will show “Online” in green rather than “New” in yellow.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/6/60c806cf115ff11c0f54335199eecd07c7856547.jpeg)

One of the main features of NetAlertX is the use of “Publishers” that can send notifications for when network events such as new nodes or offline nodes occur. To provide this service, we are going to add the “Apprise” publisher as one of the current loaded plugins.

Go to the “Loaded Plugins” section in settings and CTRL left mouse button click “APPRISE” to make it a current plugin. After doing so, click the “Save” button.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/c/c6b9a9975ce137021257bbba98678f503e3ae9b1.png)

At the bottom of the settings list, you will now be able to click on the “Publishers” section and you will see the settings for the Apprise publisher.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/8/88c5a475ff208cc67e35852bc822839165f943e8.jpeg)

So, now we are going to install Apprise. Return to your command prompt and exit your user account and then exit the root shell to return to your incus server prompt.

```auto
exit
exit

```

On your incus server, let’s create a container for Apprise.

```auto
incus launch images:ubuntu/24.04 Apprise -c boot.autostart=true -c security.nesting=true -p default -p bridgeprofile

```

Connect to the container:

```auto
incus shell Apprise

```

Take all of the updates. Install the dependencies. Install Docker. Add myself a user account and add my user account to the sudo and docker groups.

```auto
apt update && apt upgrade -y
apt install curl nano net-tools openssh-server -y
curl -sSL https://get.docker.com | sh
adduser scott
usermod -aG sudo scott
usermod -aG docker scott

```

Move over to my user account.

```auto
su - scott

```

Make a folder for the app and move into it.

```auto
mkdir apprise
cd apprise

```

Create a docker compose file.

```auto
nano docker-compose.yml

```

Insert the following into the file:

```auto
services:
  apprise-api:
    image: caronc/apprise:latest
    container_name: apprise-api
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=America/Chicago
    volumes:
      - ./config:/config
    ports:
      - 80:8000
    restart: unless-stopped

```

Change your time zone accordingly. Note that we are able to offer Apprise on port 80 and this is possible since NetAlertX which also uses port 80 is on an entirely different LAN address. SAVE the file with CTRL O and Enter and then CTRL X to exit the editor.

Launch Apprise.

```auto
docker compose up -d

```

Check the address for your Apprise by looking for the address of your eth0 device.

```auto
ifconfig

```

Go to the address that you found in your web browser to access your Apprise server.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/e/ed256c054f3da625558f06ad8f4f8fe9e1d72bcb.jpeg)

Before we can test out Apprise, we need to install Gotify.

Return to your command prompt and exit your user account and then exit the root shell to return to your incus server prompt.

```auto
exit
exit

```

On your incus server, let’s create a container for Gotify.

```auto
incus launch images:ubuntu/24.04 Gotify -c boot.autostart=true -c security.nesting=true -p default -p bridgeprofile

```

Connect to the container:

```auto
incus shell Gotify

```

Take all of the updates. Install the dependencies. Install Docker. Add myself a user account and add my user account to the sudo and docker groups.

```auto
apt update && apt upgrade -y
apt install curl nano net-tools openssh-server -y
curl -sSL https://get.docker.com | sh
adduser scott
usermod -aG sudo scott
usermod -aG docker scott

```

Move over to my user account.

```auto
su - scott

```

Make a folder for the app and move into it.

```auto
mkdir gotify
cd gotify

```

Create a docker compose file.

```auto
nano docker-compose.yml

```

Insert the following into the file:

```auto
services:
  gotify:
    image: gotify/server
    restart: always
    ports:
      - 80:80
    volumes:
      - "./data:/app/data"

```

Note that we are also able to offer Gotify on port 80 and this is possible since NetAlertX and Apprise both use port 80, but are on an entirely different LAN addresses. SAVE the file with CTRL O and Enter and then CTRL X to exit the editor.

Launch Gotify.

```auto
docker compose up -d

```

Check the address for your Gotify by looking for the address of your eth0 device.

```auto
ifconfig

```

Go to the address that you found in your web browser to access your Gotify server.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/2/2c91525bf1d9fa1392f431c11c9fdc57a3a6e8e1.png)

The initial username and password are both “admin”. Login and you will be prompted to change the password.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/8/8f86e8a27b4cbb65c075c2b1cac9abf0fc375ee5.png)

Click the “Admin” menu on the top of the screen and change the admin password.

I like to head over to the “USERS” menu and create an admin username for myself and delete the original admin account for more security as shown in the tutorial.

Go to the Gotify “APPS” menu and choose to create an application.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/7/71683db60f1e1192f8ec8a4b30354490e10ad3a4.png)

On the applications screen, make a copy of the token for your application.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/b/bc656f4d79dc7b846913215163e3960ff5711172.png)

Gotify has this web client and also an Android mobile client. Realize that the mobile client would require VPN access to your network to stay alerted to events when you are away from home. I also believe that there is an iGotify IoS application available, but I am not an Apple user.

The advantage of the mobile app is to be alerted when network events occur. Typically, you would create different “applications” for each source that would send notifications so that you would know where they are coming from.

To test that Gotify can receive notifications, move over to the Apprise web interface and go into the “Configuration Manager” menu and then “Configuration”. You would enter a URL for your Gotify instance which has the Gotify address and the token and below is an example.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/1/1a4a169d33cd8509b0bb0a904105546853f07266.png)

Click “SAVE CONFIGURATION” after entering your Gotify URL.

Now go to the Apprise “Notifications” tab and type in a test message as shown.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/a/a760963eef82183bfbbbb6ed19ec7a3a1e9eb772.png)

Once you click “SEND NOTIFICATION” your test message will be sent.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/0/0b5eccd57888352a607ee16633ad67e7b4b20fad.jpeg)

Go back to the Gotify web page and you will see it.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/a/ae5d050fe32d2e11d9f7b82f3f7f74f7dce9daad.png)

Next in my example, I created a new Gotify application called “NetAlertX”. The intent is for NetAlertX to send its notifications here.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/9/92f356fb2b3055fb803b4d2ad86ede345a6dac3c.png)

Again, you want to make a copy of the token which is different for this “application”.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/e/e7569def80ef3401ad4062dcb071182f7176eb33.png)

Go back into the NetAlertX web interface and go into the settings menu. Scroll to the bottom and you should see the Apprise publisher which will expand when you click on it. This shows up because we CTRL “Clicked” it in the loaded plugins earlier.

Change the “When to Run” from “disabled” to “on\_notification”. Put in your Apprise URL which will be the address of your Apprise server instance with a “/notify” on the end. Finally, enter your Apprise notification URL which will be gotify:// for the notification type and the address of your “gotify” server with the token we copied above as shown. Be sure your addresses are correct. Set your payload type from “html” to “text”. Set your “Max payload size” to 4096 and press SAVE to save the configuration. An example follows. Note that your addresses will differ.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/f/f6ddd7a33b86d3443e2cd8632b723e6382547168.jpeg)

In the tutorial, I created a test incus container that I presented to my LAN. After a short time, NetAlertX sent a notifcation via Apprise to my Gotify as follows.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/d/dd805b1d9ea3196d235e8cc23a38ee4a289e4283.png)

* * *

## **Scott from the future here: I indicated that you actually need an Apprise server and you need to fill in the Apprise notification URL. Both of these are untrue. It is sufficient to configure your “Apprise Notification URL” with your gotify target address as I have above. The Apprise host URL is not needed and if provided, it will produce duplicate notifications.**

## **This is very misleading in their documentation. I believe that the author meant to indicate that the “Apprise Notification URL” is just a notification URL in an “Apprise type of format”. Although not required for this use case, an Apprise server is a powerful tool for your home lab.**

* * *

There are many more functions and notification services that NetAlertX supports. Apprise is a very powerful API for your Homelab and commuinicates with many apps without using a cloud service. Gotify provides a means to classify notifications into application groups that can be examined in a convenient web interface as well as a mobile app.
