Hi community! I'm currently using Meltano on a Deb...
# getting-started
d
Hi community! I'm currently using Meltano on a Debian Linux server. Is there a way for me to get error messages in Slack whenever a pipeline fails? Thanks in advance!
e
Hi @delson_barros! There isn't built-in functionality in Meltano for notifications (yet!), so in the meantime you could leverage a tool like ntfy:
Copy code
# Install ntfy
pipx install ntfy

# Use ntfy
ntfy -t "Meltano finished running" done meltano elt my-tap my-target
d
Hi @edgar_ramirez_mondragon! Thank you for your reply! In this case, do you have any suggestion for me to trigger this notifications when a pipeline fails? Meltano returns a message saying whether the extractor, the loader or both have failed, but the meltano command itself runs until completion, so I'd like to see that final message provided by Meltano
a
@delson_barros - Thanks for logging this! If running in a job or workflow engine, you can possibly use "on failure". There's also a bash "or" operator (
||
) which can be used to run a second shell command only if the first command fails. I'm not sure what the best practice in your case would be. @edgar_ramirez_mondragon - I really like this idea of using
ntfy
for this. I hadn't heard of it before but it looks really cool.
e
@aaronsteers another option I came across while researching was https://github.com/caronc/apprise, but it's better used with bash magic (
||
,
$?
) since it doesn't provide a simple pass like
ntfy done ...
, or directly integrated in the python api
a
cc @pat_nadolny in case this is relevant for anything in #C02GH7KNPAL.