1
0
Fork
You've already forked cottage
0
A simple cottage health check web service that sends XMPP messages when my cottage hasn't reported in
  • Go 100%
2022年10月23日 19:24:53 +02:00
.cottage.json Mention skipverify in conf file and README 2022年10月23日 19:17:10 +02:00
client.go Move connection to XMPP server to Client.Connect() 2022年10月23日 19:20:44 +02:00
conf.go Set default for some conf, introduce conf for SkipVerify 2022年10月23日 19:13:01 +02:00
go.mod Initial 2022年10月23日 18:22:29 +02:00
go.sum Initial 2022年10月23日 18:22:29 +02:00
LICENSE Initial 2022年10月23日 18:22:29 +02:00
main.go Check error from client.Send() when connection was just established 2022年10月23日 19:24:53 +02:00
README.md Mention skipverify in conf file and README 2022年10月23日 19:17:10 +02:00
util.go Split into several source files depending on function 2022年10月23日 18:48:56 +02:00

cottage

A simple cottage health check web service that sends XMPP messages when my cottage hasn't reported in.

The router in my cottage runs a small cron job that only curls an URL on my web server every five minutes.

I created this program to track that the cottage still reports in now and then and, if not, warns me about it by sending me an XMPP message.

The program expects a config file in .cottage.json looking something like this:

{
 "listen": "127.0.0.1:8080",
 "jid": "your-automatic-friend@your.domain",
 "password": "secret",
 "skipverify": false,
 "destination": "your-own-xmpp-address@probably-on-your-cell-phone",
 "checktime": 15,
 "warningtime": 180,
 "remindertime": 180
}

It checks if the cottage (or whatever is supposed to hit the web server) every checktime minutes. If nothing has been reported in warningtime minutes it sends a warning over XMPP and reminds you every remindertime minutes.