Replies: 3 comments 3 replies
-
It looks like nfty can be invoked with a simple HTTP request. Could you just use the "Web Hook" feature for this? Ohhhhh I see.... nfty only supports plain text as the HTTP POST body, not JSON like Slack / Discord. Boooooooo! Well, support for this is coming in Cronicle v2 (Orchestra). That has fully-customizable Web Hooks which can send plain text or anything you want. v2 will be out in early 2025. In the meantime, I guess chain reactions could work for your use case, but I don't know anything about Joseph Adam's Plugins, so I don't know how to setup a chain reaction in that case. |
Beta Was this translation helpful? Give feedback.
-
Hi Joseph, thanks a lot for your prompt and elaborate reply! Looking forward to Orchestra and all the new features! Meanwhile, to make this work with Cronicle, could you share some insights on how to access the data being handed over to the event via Chain Reaction? I might be missing the obvious, but I can't figure out how to e.g. set the "title", which is an input parameter to the ntfy plugin, using data from the source event. The specific ntfy plugin is just to give the big picture, I'm struggling with the basic concept of how to set a parameter in a shell plugin and then use this parameter as an input parameter in a python plugin via Chain Reaction. |
Beta Was this translation helpful? Give feedback.
-
@jhuckaby Thanks a lot for your detailed answer, explanations and hints, much appreciated! No worries about 3rd party plugins, it was just to give the full picture! Cronicle is very powerful and flexible, I've mostly struggled with lack of knowledge and basic documentation. The good news is that after a lot of trial and error I got the basic stuff working! To document my progress, as it might be useful for someone else who is struggling with the same basics as me:
Below is an example that works (at least for me), it runs ClamAV and passes some parameters to the next job, which is based on the Cronicle plugin for ntfy, to send out notifications via
If you find it useful, feel free to use the hints and examples in e.g. a "Beginner's Guide to Chain Reaction Control"! What I haven't managed yet is to pass the output of the command called in Job A (e.g. `clamscan') to Job B, so that e.g. the "Summary" of the scan could be used as "Message Body" for Job B. Any idea how to achieve this would be appreciated! |
Beta Was this translation helpful? Give feedback.
-
Chain Reaction is a brilliant concept, but I'm struggling with handing over data from one event to the other. I might be missing something too obvious, I've looked into the documentation and some relevant discussions, but I can't figure out how to hand over and use the additional information (
source_event
,chain_code
,chain_description
,chain_data
) which should be handed over by default.My use case would be to switch from the current notification via email (which is an out-of.-the-box feature) to being notified via nfty. For that I've discovered a dedicated Cronicle plugin for ntfy, which works fine being used standalone. My approach would be to create one generic event for "Success" and one for "Failure", both using the ntfy Plugin. These events then would be called using the Chain Reaction options from e.g. the "Backup Event" and should get handed over data from the calling event and use it to set title, message, priority, etc. in the ntfy message to be sent.
Any code snippet for what to put in the calling event as well as in the being called event (ntfy) would be highly appreciated, thanks a lot in advance!
Beta Was this translation helpful? Give feedback.
All reactions