An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# pushover-cmd-daemon

![Main status](https://github.com/just1689/pushover-cmd-daemon/actions/workflows/go.yml/badge.svg)

codebeat badge

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.