Sending alert from uptime kuma
Closed this issue · 4 comments
Hello; i am trying to send an alert from Kuma webhook using preset- multipart/form-data and i cannot just see the saw data coming into the webhook.
Is there a method or script i should be using to see the raw data coming in from Kuma?
Hello, thanks for reporting the problem. Indeed, multipart/form-data
is not that well supported. I will fix this asap. However you can use Kuma's webhook using application/json
preset. The JSON payload will be stored into the $1
variable.
Hello, thanks for reporting the problem. Indeed,
multipart/form-data
is not that well supported. I will fix this asap. However you can use Kuma's webhook usingapplication/json
preset. The JSON payload will be stored into the$1
variable.
Thanks I will try that. Is there a way to see the data come live on the screen?
Hello, thanks for reporting the problem. Indeed,
multipart/form-data
is not that well supported. I will fix this asap. However you can use Kuma's webhook usingapplication/json
preset. The JSON payload will be stored into the$1
variable.
I have to make a bash script to store $1 into a log file and then run the hook to view the file. Is there something built in that i can use that shows the incoming data thats in $1?
#!/bin/bash
# The first argument passed to the script ($1) is expected to be the JSON data
json_data=$1
# Define the log file path
log_file="/home/webhookd/scripts/logfile.log"
# Append the JSON data to the log file with a timestamp
echo "$(date +'%Y-%m-%d %H:%M:%S') - $json_data" >> "$log_file"
is there a way to see $1 without a script?