Issue with jq, discord notifactions are empty #131
Unanswered
tim-shortons
asked this question in
Q&A
Replies: 1 comment 3 replies
-
There was a fix for Discord notifications in 3.3.x, the recent changes in the beta might have broken it again. Unfortunately handling Discord in this script is very, very hard. Also I don't use it by myself so it's not the first thing I test 😛 I'll have a look |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As the subject states, discord notifications are empty. I can see the script start via discord notification "SnapRAID Script Job started", but the details for the remainder of the job are empty brackets. Looking at the log I see the following several times with the first occurrence after the SMART report. My assumption is a jq option is being called that is not recognized.
This is the 3.4 beta version of the script
jq invocation from script:
if [ "$DISCORD" -eq 1 ]; then DISCORD_SUBJECT=$(echo "$NOTIFY_OUTPUT" | jq -Rs | cut -c 2- | rev | cut -c 2- | rev) curl -fsS -m 5 --retry 3 -o /dev/null -X POST \ -H 'Content-Type: application/json' \ -d '{"content": "'"$DISCORD_SUBJECT"'"}' \ "$DISCORD_WEBHOOK_URL" fi
Additionally, I see there is a curl error at the end of the script; "curl: (22) The requested URL returned error: 400 ". I have healthcheck.io and discord notifications enabled. I know the discord webhook url is correct as I receive the script job started notification. Same with healthcheck.io I am receiving the snapraid events in the event dashboard.
I am on Ubuntu 18.04 with snapraid 11.6
Beta Was this translation helpful? Give feedback.
All reactions