https://github.com/tobychui/imusutm
Basic service up-time monitor written in Golang
https://github.com/tobychui/imusutm
downtime downtime-monitor golang monitor monitoring service service-disruption uptime uptime-monitor
Last synced: about 1 month ago
JSON representation
Basic service up-time monitor written in Golang
- Host: GitHub
- URL: https://github.com/tobychui/imusutm
- Owner: tobychui
- License: mit
- Created: 2022-12-30T12:57:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-06T03:47:26.000Z (over 1 year ago)
- Last Synced: 2025-04-24T05:42:57.883Z (about 1 month ago)
- Topics: downtime, downtime-monitor, golang, monitor, monitoring, service, service-disruption, uptime, uptime-monitor
- Language: HTML
- Homepage:
- Size: 67.4 KB
- Stars: 18
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# imusutm
Baisc service up-time monitor and TOTP generator written in Golang
## Usage
Double click the binary executable to run the up-time monitor.
## Build from Source
```
git clone https://github.com/tobychui/imusutm
cd imusutm
go mod tidy
go build
./utm
(or .\utm.exe)
```### Setup Monitoring Server
Create a file named "config.json" and place it in the same folder to the binary executable.
```json
{
"Targets": [
{
"ID": "imus_homepage", //ID of the target
"Name": "imuslab Homepage", //Name to show on the UI
"URL": "https://imuslab.com", //URL to request
"Protocol": "https" //Protocol to check online
},
//More endpoint here
],
"Interval": 300, //Update interval in seconds
"LogToFile": false, //Log results to file
"RecordsInJson": 288 //How many records to keep, in this example, 300s (5 min) x 288 records per target = 1 day
}
```To start the monitoring server, use the following command (Note the ":")
```
./utm -p :8089
```You can also change the port if this port has already been occupied by another service.
*Tips: You can add it to systemd as a service if you want it to startup with your other services on Linux*
### Setting up TOTP Code Generator
TOTP code generator was added after Github force me to enable 2FA to my account.
You can setup a totp code generator with a config file name totp.json with the following contents.```json
{
"Entries": [
{
"Name": "Example",
"Secret": "JBSWY3DPEHPK3PXP",
"Link": "example.com"
},
//Add more line if needed
]
}
```
Restart the application to see the new code generator running.
## More Protocols Support
As I only need to ping my own web servers, I currently only implemented the following protocol. If you need more protocols, feel free to create a PR on this project.
- http
- https
*Notes: You do not need to know php if you want to add more protocols. All changes are only nessary to be done in the Golang side*
### License
MIT License
### Disclaimer
This is an internal tool design for my in-house use only. Use it with your own risk.