From 69755fc060d0f90432ff3370a4329054380fca85 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Mon, 10 May 2021 16:56:01 +0300 Subject: [PATCH] Post on notify.shore.co.il. --- content/spam-me-notifications.rst | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 content/spam-me-notifications.rst diff --git a/content/spam-me-notifications.rst b/content/spam-me-notifications.rst new file mode 100644 index 0000000..73dc484 --- /dev/null +++ b/content/spam-me-notifications.rst @@ -0,0 +1,46 @@ +Spam me - Update #2 +=================== + +:date: 2021-05-10 +:summary: Another update the spam ma page. + +Previously `I wrote <../spam_me/>`_ about the `spam me page +<https://www.shore.co.il/spam>`_ and later an `update <../spam-me-update>`_ on +how things were going. + +Things were stable and I didn't get any spam. But something bothered me. I would +only get notifications on my laptop and only when it was on. Notifications would +be lost if the laptop was offline. Also, `Patchbay <https://patchbay.pub/>`_ had +downtime a few months back and I didn't get notifications at all. Lastly, I'm +keen on self-hosting. + +Nextcloud Notifier +------------------ + +Nextcloud has a notification mechanism that is used internally. I get +notifications on pending updates on my cellphone and laptop. Pushing +notifications over HTTP requires authentication, but using the ``occ`` CLI +doesn't require authentication. + +I wrote a `simple web service +<https://git.shore.co.il/nimrod/nextcloud-notifier>`_ to post messages through +the Nextcloud notification mechanism. The service runs the ``occ`` command using +``docker exec`` so usage is anonymous. Notifications are received on both +cellphone and laptop and I'm content. Now you can `send me messages +<https://www.shore.co.il/spam>`_ +and I'll always get it. + +Future uses +----------- + +Now that I have a notification service, I saw more uses than I originally +envisioned. I send notification on failed Cron jobs, for example: + +.. code:: shell + + backup || wget --spider https://notify.shore.co.il/send?message=Backup%20failed. + +I have CI jobs that run on a schedule (rebuilding container images) so now I +have a `GitLab CI template +<https://git.shore.co.il/shore/ci-templates/-/blob/master/templates/notify.yml>`_ +that sends me a message if the CI pipeline failed. -- GitLab