curl + bash

A bash script helps to send events, if you plan to use it at several places on your server.

Create a file with the following content and add the executable flag. Because it contains your API key, think about using more restrictive file permissions.

123
vim ~/ping-superv.sh
chmod 0700 ~/ping-superv.sh

File content:

12345678910111213141516
#!/bin/bash
P1=$1
if [[ -z "$2" ]];
then P2="null"
elif [[ -n "$2" ]];
then P2="\"$2\""
fi
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: xxxxxxxxxxxx" \
--data "{\"job\":\"$P1\", \"id\":$P2}" \
https://supv.cloud/api/v1/event

Now you can send events by calling the bash script:

~/ping-superv.sh <job> [id]

To send an event after a cronjob ran, append the script in your cron table like this:

12
* * * * * /etc/backup_mysql.sh && ~/ping-superv.sh "backup.mysql"