https://github.com/just1689/pushover-cmd-daemon
Cron-based health check with Pushover alerts
https://github.com/just1689/pushover-cmd-daemon
cron daemon health-check pushover
Last synced: about 1 month ago
JSON representation
Cron-based health check with Pushover alerts
- Host: GitHub
- URL: https://github.com/just1689/pushover-cmd-daemon
- Owner: just1689
- License: mit
- Created: 2022-02-03T06:26:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-24T13:53:50.000Z (about 4 years ago)
- Last Synced: 2024-06-20T06:31:06.058Z (about 2 years ago)
- Topics: cron, daemon, health-check, pushover
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pushover-cmd-daemon


Simple background app that evaluates the result of executing a command & alerts via Pushover
## Setup
This project uses github.com/robfig/cron for the cron. See cron docs
here: https://pkg.go.dev/github.com/robfig/cron?utm_source=godoc
- To generate the config file just run the executable for the first time. It will generate a file `config.json`.
- Run the binary in the same directory as `config.json`.
## Config
The `config.json` contains the configuration for the app.
```json
{
"cron": "@every 1h",
"cmd": "print",
"args": [
"1"
],
"errorWords": [
"error"
],
"msgTitle": "Error",
"msgBody": "Could not find 1 in result",
"msgPriority": 0,
"pushoverToken": "",
"pushoverRecipient": ""
}
```
## To do
- [x] Config model
- [x] Run CMD
- [x] Setup cron
- [x] Load result from CMD run
- [x] Run error function
- [x] If error func true, alert
- [x] Call Pushover notification
- [ ] Manage releases with Github Actions
- [ ] Release binary for Linux, MacOS and Windows
- [ ] Better logging strategy
- [ ] Param for config file name.
- [ ] Param for ANSI color logs
- [ ] Timeouts, threading.
- [ ] Watch for hanging and notify.