Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(stream/feature) deadman endpoint #95

Open
Sims24 opened this issue Feb 9, 2022 · 3 comments
Open

(stream/feature) deadman endpoint #95

Sims24 opened this issue Feb 9, 2022 · 3 comments
Labels
community enhancement Enhance existing

Comments

@Sims24
Copy link
Contributor

Sims24 commented Feb 9, 2022

A community user pushed us this feature request:

In order to be alerted when a stream connector stops unexpectedly, a solution would be to offer an option to configure a deadman API endpoint. It would act as a regular heartbeat and then allow to send notifications when something goes wrong.

Some manufacturers offers such endpoint as a built-in feature but there also dedicated service like Deadman Snitch.

IMO, it would be nice to have it at the lib level so the retained solution could be use by any stream no matter what's the software vendor.

@Sims24 Sims24 added community enhancement Enhance existing labels Feb 9, 2022
@piellick
Copy link

piellick commented Feb 9, 2022

Hy @Sims24 ,
few examples for this feature :

A simple integration could be :

  • heartbeat to an API endpoint or email sending (for ingestion into the deadman)
  • managing interval

pierrick

@Sims24
Copy link
Contributor Author

Sims24 commented Feb 9, 2022

Thanks @piellick ;)

@piellick
Copy link

piellick commented Mar 2, 2022

hi,
For those looking for a way to do a deadman using engine logic and notifications, here’s a dummy script in the meantime:

#!/bin/bash

select_random() {
    printf "%s\0" "$@" | shuf -z -n1 | tr -d '\0'
}

expressions=("OK" "WARNING" "CRITICAL" )
selectedexpression=$(select_random "${expressions[@]}")
#echo "$selectedexpression"

if [ $selectedexpression == "OK" ]
then
    echo "OK"
    exit 0
elif [ $selectedexpression == "WARNING" ]
then
    echo "WARNING"
    exit 1
elif [ $selectedexpression == "CRITICAL" ]
then
    echo "CRITICAL"
    exit 2
fi

Just create a fake check through a service and send the notifs on each status change to your deadman.

Tested...do the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community enhancement Enhance existing
Projects
None yet
Development

No branches or pull requests

2 participants