Loading content/spam-me-notifications.rst 0 → 100644 +46 −0 Original line number Diff line number Diff line 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. Loading
content/spam-me-notifications.rst 0 → 100644 +46 −0 Original line number Diff line number Diff line 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.