Show HN: Sigabrt.dev – cronjob monitor with an SSH TUI (sigabrt.dev)

1 points by 4815162342 ↗ HN
Hello HN. I built this mostly to monitor the things I host myself. I know it's nothing too exciting.

Anyway, the TL;DR is: Create an endpoint, and if your script/cronjob fails to regularly ping it, you get notified (by email or ntfy). E.g.:

    0 * * * * ./script.sh && curl -fsS https://sigabrt.dev/pulse/<id>/beat
It also has an SSH TUI which is currently experimental and read-only, mostly because I'm not sure whether it is actually useful or just a gimmick :):

    ssh sigabrt.dev
To use it, simply add your SSH public key in your account settings.

Yes, there are services like this already, and this is minimalistic by comparison. Feedback is welcome.

37 comments

[ 0.26 ms ] story [ 109 ms ] thread
If you need/want a dashboard it's kinda cool. There's a lot of other options that will do something similar, but not via SSH. Crontab can email you directly, no need for a service.

You could also just use systemd timers and do: systemctl --failed -t service

You are missing the biggest value offering here - service such as the one linked here (or healthchecks io that I personally use) will let you know that signal didn't arrive even when other things on your end failed (e.g. cron having a hard time sending failure email due to incorrect smtp credentials). I use those kind of healthchecks literally for everything, especially for backups - they saved my ass many times over.
For things that actually matters to me, I use systemd timers, Prometheus and alert on failed services, but I do get that this might be a bit much for many setups.
You need some sort of external monitor for a missed pulse style alert. Personally I do something similar by collecting a "last success" metric with Prometheus and alerting on it with Grafana if the value is too far in the past. The local system cannot reliably alert if your job does not fail into the alert path or the system is just down.

I can see something like this being a great intermediate option to a full monitoring and alerting stack.

I'm myself very happy with https://healthchecks.io/ for this purpose.
I'll never understand commenting to show HNs with a link to competing products.
Why?
Just goes against the spirit of people writing their own utils and sharing to me. Good on OP. They're not looking for money or fame here. If this util benefits one reader on HN it's worth it.
They are posting a link to their freemium SaaS product that has a price, of course they're looking for money.

If I find something posted here interesting I like knowing what other similar tools/services/platforms there are out there, even if they're free, so I definitely find posts like the one this thread came from to be helpful one way or another. These sorts of threads also often lead to discussion of the differences between the options, which is again very useful, especially in cases like the current one where the competing offering linked is not just a freemium SaaS platform but also as F/OSS as it can possibly be if you want to self-host and not have to pay anyone other than whoever manages your server.

If you're building a product for a market that already has solutions, your product needs to be able to hold its own against the other offerings.

If it has context I appreciate them because it helps me make better informed decisions. Why not? HN isn't an editorials page exclusive for posters (except YC slop lol)
@altern8 you're dope for supporting folks putting themselves out there.
It seems closed source and comes with a pricing model, seems reasonable to show alternatives.
Are you kidding? It’s how we discover things that are similar and yet not seen before, it’s not about shade on anyone’s or agents work
I've been toying with a similar idea for ~6 months: A lightweight job status dashboard.

I wanted something that required no setup, but could just push success/failure messages to as part of various cron jobs, windows tasks, and shell scripts we run throughout our organization.

StatShed server: https://github.com/statshed/statshed-server StatShed go-cli: https://github.com/statshed/statshed-gocli

The idea is kind of like "ntfy.sh", but for jobs status. You can send a "started" message at the beginning, update a "status" message periodically throughout the job, then send a "failed" message (optionally with logs) or a "success". Then a web dashboard gives you an overview with ability to drill down.

We use Icinga for monitoring and paging, but this just gives an overview for a quick look at things we don't want heavy duty monitoring on. Like my laptop backups, information about ansible runs across our fleet, etc.

(comment deleted)
You could just wrap cronic around the command and immediately receive the full output per mail when it fails. I don't see how a heartbeat alone without logs would help to identify temporary failures.

https://habilis.net/cronic/

Your service could accomplish something similar if it had such a wrapper to report both success and failures with logs to a remote server. That would take away the need to run a local MTA, while also detecting with the heartbeat whether the job ran at all.

> I don't see how a heartbeat alone without logs would help to identify temporary failures.

It does help. Sometimes jobs unexpectedly don't run at all.

A temporary failure means that the job failed only once and then starts running again. If you want to investigate why it failed, you will need the output of that particular failed run.
Thanks for the suggestion!

There's currently no explicit "fail" ping, as that's not the main use case I care about. It's valid, though, and I've thought about adding it.

Being able to pipe logs to curl would also be useful. I'm concerned that people might accidentally send me private/sensitive data, but I'll consider it.

so cronic combined with a healthcheck, immediate failure alerting and integration for e.g. graylog or fluentd - would be a killer :-)
People seem to miss the point of the project. It’s not emailing you on failure. It’s emailing on missing reports of scheduled runs. If you rely on the job to report failure, the machine could go down. In that case you won’t get any email on the failed run.
Context helps, shows intent, fosters discussion.
The pulse idea is neat. How do you handle jobs where the expected runtime is longer than the heartbeat interval?
Good question! There's no such thing as a "running" task/job at the moment (i.e., a start signal). The closest thing is lengthening the grace period, but that also means that the notification is delayed, so it's not really a solution. This is in the backlog.
The usual fix is a second ping at the start of the job: the schedule check watches the start ping, and a separate “max runtime” check watches the gap between start and finish. You get alerted promptly either way without inflating the grace period.
Shameless plug for a server monitoring macOS app I built. I built that too for the servers I managed myself. Instead of working through a service or a self-hosted monitoring tool that I then over to monitor itself again, I thought running it on my laptop was pretty nice too. One of the next features I've been wanting to build is uptime monitoring.

https://kitaso.app/

Sure there is the downside of having to be at your laptop or having it on, but the upside is that it has very few moving parts and is very simple and it just has one set price.

I don’t like the wrapper idea. I would like it built into the cron daemon.
Even better, stop using cron