Uptime-Kuma-Service-Push is a bash script made using Bashly that makes scripts to check the status of a service.
All you need is the Uptime-Kuma push URL from a Push Monitor and the name of a service. Uptime-Kuma-Service-Push generates the script and saves it to a file that you can run in any way you want!
Heres the kicker; because it's using the Push Monitor, it can run on any server as long as it has access to the Uptime-Kuma Push URL!
I tried to make Uptime-Kuma-Service-Push as easy to use as possible, so here's a short guide to get started!
The script will do a root user check so make sure to run it as root!
Download the script
curl -O https://github.com/Zelaf/uptime-kuma-service-push/releases/latest/download/uptime-kuma-service-push
Add execution permissions
chmod +x uptime-kuma-service-push
Use the install command
./uptime-kuma-service-push config install
You can now do uptime-kuma-service-push --help
to get help with generating scripts, adding the monitor script and monitoring services, configure systemd to run the script and you can also check the config.ini
in the install location to see what options you can change!
If the service does run it will tell Uptime-Kuma that it's running and if it doesn't it will send the 5 last lines of the log to Uptime-Kuma!
With the monitor feature you can add a script that runs scripts inside of the monitored-scripts folder. You can add and remove already generated scripts from Uptime-Kuma-Service-Push!
Uptime-Kuma-Service-Push can automatically make two systemd units, one service and one timer that automatically runs the monitor script!
Uptime-Kuma-Service-Push does most of its referencing from the scripts own file path! That includes symlinking to /usr/local/bin
and generating the files, this means it can be put pretty much run from anywhere! If you want to just give it a try you can easily do so without installing it and run the install command afterwards!
I wanted a way to get notifications about downed services on my servers while using my favourite status panel Uptime-Kuma! At first, this project started out as a basic script with variables you had to manually edit, but I wanted to practice my bash scripting and saw the potential of even easier configuration. I also wanted the project to potentially grow in features so I looked into how I could make that happen.
I found Bashly shortly thereafter and decided to use that as a basis to get a more "software-like" experience and to have the ability to expand on the script features and ease of use!
- Thomas
- For helping me figuring out bash errors and testing.
- CTalvio
- For showing me his own scripts and helping with formatting.
- DannyBen
- For rewriting his config.sh library for Bashly to add sections.
Also thanks to DannyBen for Bashly and LouisLam for Uptime-Kuma