Skip to main content
Version: 1.2

Sending your first event

Now that ToBeAlert is installed, you can start sending alerts. For detailed information about the Alert API, including all available fields, attribute types, and advanced features like links and tagged values, see the API Documentation.

There are two ways to start sending events to ToBeAlert: using an API key or the built-in alert simulation feature.

Sending alerts with an API key​

Getting the API key​

After logging in with the credentials from the docker-compose.yaml click the API Keys button on the sidebar and copy your already existing API key:

Alert simulate dialog

For Linux systems, copy this command and edit the API key at line 3 and the rest of the highlighted lines to your liking.

docker exec tobealert-backend curl --location 'http://localhost:9000/api/alert' \
--header 'Content-Type: application/json' \
--header 'Authorization: Key $API_KEY' \
--data '{
"resource": "azure-ws-1",
"attributes": {
},
"environment": "Production",
"event": "test",
"group": "Web",
"origin": "curl",
"service": [
"yourapp.com"
],
"severity": "minor",
"tags": [
"cloud"
],
"text": "Something went wrong",
"type": "exceptionAlert",
"value": "Bad Gateway 501"
}'

For Windows systems, run the same command but on a single line.

docker exec tobealert-backend curl --location "http://localhost:9000/api/alert" --header "Content-Type: application/json" --header "Authorization: Key $API_KEY" --data "{\"resource\": \"azure-ws-1\", \"attributes\": {}, \"environment\": \"Production\", \"event\": \"test\", \"group\": \"Web\", \"origin\": \"curl\", \"service\": [\"yourapp.com\"], \"severity\": \"minor\", \"tags\": [\"cloud\"], \"text\": \"Something went wrong\", \"type\": \"exceptionAlert\", \"value\": \"Bad Gateway 501\"}"

And you are all set up. Alert View

Sending alerts with the alert simulation feature​

To send an alert from the Alerts view:

  1. Navigate to the Alerts view
  2. Click on the Simulate button located next to the search bar
  3. Select a pre-done type of alert or use a custom JSON
  4. Click the "Send Alert" button

Alert simulate dialog