Alerts

Send alerts through the API.

🚧

Authentication

All BigPanda APIs require Bearer Token Authorization in the call headers.

This API uses the User API Key type of Authorization token.

Parameters (Multiple Alerts)

If you want to send more than one alert in a single API call, you can modify the JSON payload to contain these main properties.

Field

Description

app_key

Application key, created in the first step of a BigPanda tutorial. When sending multiple alerts at the same time, you can specify the app_key one time instead of for each alert.

alerts

Array of alerts to send to BigPanda. Each item in the array contains the same fields as for an individual alert, except you do not need to specify the app_key.

curl -X POST -H "Content-Type: application/json" \
    -H "Authorization: Bearer <YOUR TOKEN>" \
    https://api.bigpanda.io/data/v2/alerts \
    -d '{ "app_key": "<YOUR APP KEY>", 
          "alerts": [{
               "status": "critical", 
               "host": "production-database-1", 
               "check": "CPU overloaded" 
           }, {
               "status": "critical", 
               "host": "production-database-2", 
               "check": "CPU overloaded" 
           }]
       }'

❗️

Sending multiple alerts with the REST API

BigPanda uses the timestamp to determine the latest status of an alert. If it is not included, BigPanda uses the time when the event is received. To ensure that BigPanda accurately reflects the current status, when sending multiple events, you must include the timestamp for each event or sort the alerts array by when the events occurred, in ascending order.

Parameters (Primary and Secondary Properties)

BigPanda treats certain properties as primary and secondary by default. In some cases, you may want to control which properties are treated as primary or secondary. For example, you may have an alert that is associated with both a host and an application, where the application is primary and the host is secondary. In these cases, use the primary_property and secondary_property properties.
By default, the primary property is defined as one of the following fields: host, service, application, or device. And the secondary property is defined as one of the following fields: check or sensor.

📘

UI Considerations

BigPanda uses the primary property to construct the titles and the secondary property to construct the subtitles of incidents.

{
  "status": "warning",
  "host": "production-database-1",
  "timestamp": 1402303570,
  "application": "Billing",
  "description": "CPU is above warning limit (40%)",
  "primary_property": "application",
  "secondary_property": "host"
}
Language