Feature Request: Shell command alert mechanism
rudism opened this issue · 0 comments
Some mechanism to fire alerts via a shell script could be used to integrate with third party services without necessarily having to support those services directly.
Some use cases I'm thinking of are making a POST using curl
to a Unified Push server for mobile push notifications, or the Twilio API for SMS notifications, as a couple simple examples.
Not sure how it would work with the existing config schema... Maybe it wouldn't need explicit recipients. An idea around how to configure might look like this:
transports:
shell:
unified-push: curl -XPOST -d "$message" https://my-unified-push-server.com/arewedown
sms-alert: curl -XPOST -u 'mytwiliosid:mytwiliokey' -d 'From=5557654321' -d 'To=5551234567 -d "Body=$message" https://api.twilio.com/2010-04-01/Accounts/mytwiliosid/Messages
Each alert could loop through them and populate the $message
environment variable before firing the command.
This could also potentially cover #17 since I believe Telegram has an http API that could be invoked the same way (maybe using jq
in the command to help construct the payload to post and piping that to curl).