Giter Site home page Giter Site logo

Alerting about documentation HOT 3 OPEN

heartbeat-sh avatar heartbeat-sh commented on June 2, 2024
Alerting

from documentation.

Comments (3)

arieroos avatar arieroos commented on June 2, 2024 2

There is currently no alerting, but it is definitely something to consider.

Before we build alerting, we will need to build a way to authorize heartbeats, and only authorized heartbeats will generate alerts. Otherwise we will be opening doors to spam.

from documentation.

bartoruiz avatar bartoruiz commented on June 2, 2024

This is what I did. I ran a cron every 1min in my linux server and get emails alerts:

#!/bin/sh
emailto="[email protected]"
subject="HEARTBEAT"

json=$(
  curl -X GET 'https://yourdomain.heartbeat.sh/heartbeats' \
  --compressed \
  -s
)

errors=`echo -n $json | grep -o '"Status":"ERROR"' | wc -l | awk '{print $1}'`;
echo ERRORS: $errors

if [ $errors != 0 ]; then
        msgsubj="$subject ERRORS: $errors"
        echo $json | mail -s "${msgsubj}" ${emailto}
fi

from documentation.

rudolfbyker avatar rudolfbyker commented on June 2, 2024

@arieroos if you implement alerts, I think alerting only on the "falling edge" of the signal (i.e. transition from green to orange/red) is much more useful than alerting repeatedly alerting like the above example. In my experience, if I can't address an issue immediately, the flood of e-mails makes me counter-productive.

A client-side-only way of doing this would be to make the web interface into a PWA, which makes it installable, and provides a service worker. Then the service worker kan show notifications. https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification Depending on the device, the notifications might not work when the app is put to sleep (e.g. most Androids) but it still has some use, and does not require you to push anything from a server, keeping the implementation simple.

from documentation.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.