Skip to content

Instantly share code, notes, and snippets.

@jonarddoci
Last active February 14, 2017 13:13
Show Gist options
  • Save jonarddoci/d6c4a9cd7cc63e0a28eb43bbed2dba3a to your computer and use it in GitHub Desktop.
Save jonarddoci/d6c4a9cd7cc63e0a28eb43bbed2dba3a to your computer and use it in GitHub Desktop.
#!/bin/bash -ex
TIME=`gdate +%s%N`
function alert(){
curl -XPOST 'https://api.opsgeni.us/v1/json/alert' -d '
{
"apiKey": "your-api-key-here",
"message" : "TEST ALERT '`echo $TIME`'"
}'
}
while : ; do
sleep 0.5
alert
echo -n "$i "; ((i++))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment