Provision Uptime Kuma with Docker
Prepare a volume mount:
sudo mkdir /opt/uptime
sudo chown $(whoami):$(whoami) /opt/uptime
sudo chmod 777 /opt/uptime
Download the latest Docker image from Docker Hub:
docker pull louislam/uptime-kuma:1-alpine
Run the container in Docker:
docker run -d --restart=unless-stopped --net=host \
# -p 3001:3001 \
-v /opt/uptime:/app/data \
--name monitor \
louislam/uptime-kuma:1-alpine
Or with docker-compose up -d
:
version: '3'
services:
app:
image: louislam/uptime-kuma:1-alpine
container_name: monitor
restart: unless-stopped
network_mode: host
# ports:
# - 3001:3001
volumes:
- /opt/uptime:/app/data
Visit the webUI on localhost:3001
and create an admin user and activate dark mode:
Monitoring your INSTAR Camera
MQTT Heartbeat
Start by clicking on Add New Monitor:
Select MQTT as Monitor Type and add the MQTT broker configuration from your INSTAR camera:
The Hostname is the local IP (or DDNS address) of your camera and Port is the regular MQTT server port that defaults to 1883
:
You can use the Last-Will-and-Testament (lwt-topic) to monitor your camera - default mqtt prefix
/camera id
/status/connection:
Add the topic to your monitor:
Note: Use the "online" payload without any spaces or it will not match: {"val":"online"}
:
Once corrected the camera will show up as online:
HTTP Heartbeat
For older INSTAR IP cameras that don't support the MQTT protocol we can use an HTTP endpoint (random CGI command) and sending GET requests to verify that the camera is connected and running. Start by clicking on Add New Monitor:
This time select HTTP as Monitor Type and add the IP address with a random CGI command as URL (e.g. getsysinfo
):
As authentication choose HTTP Basic Auth and add your camera login:
The monitor will now contact your camera once a minute to verify that it is still running:
Adding Notifications
Now to the interesting part - how do I receive notifications about events on my network on my Android phone?
There are quite a few options to choose from. Let's take a look at a simple, self-hosted solution called ntfy.
Start by selecting one of your monitors and click on Setup Notification:
And add the topic and URL of your nfty installation:
Click to test your configuration:
And you should see the test update on the nfty dashboard: