Skip to main content
PUT
/
monitors
/
templates
/
{templateId}
Update a monitor template
curl --request PUT \
  --url https://api.eu.bronto.io/monitors/templates/{templateId} \
  --header 'Content-Type: application/json' \
  --header 'X-BRONTO-API-KEY: <api-key>' \
  --data @- <<EOF
{
  "name": "High Error Rate",
  "comparison_operator": "ABOVE",
  "threshold": 1000,
  "window": "'Last 20 minutes', 'Last 2 hours', 'Last 3 days'",
  "metric": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "arguments": {}
  },
  "description": "Average response time is over 1 seconds in the last 20 minutes",
  "warning_threshold": 1000,
  "no_data_status": "OK",
  "group_retention": 600000,
  "aux": {},
  "type": "PATTERN",
  "compare_to": "'2 hours ago', '1 days ago'",
  "change_type": "DIFFERENCE",
  "this_template_tags": [
    {
      "name": "parser",
      "value": "apache_web_access_log"
    }
  ],
  "parameters": {}
}
EOF
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "High Error Rate",
  "comparison_operator": "ABOVE",
  "threshold": 1000,
  "window": "'Last 20 minutes', 'Last 2 hours', 'Last 1 days'",
  "type": "PATTERN",
  "metadata": {
    "created_at": 123,
    "created_by": {
      "type": "API_KEY_ID",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    },
    "updated_at": 123,
    "updated_by": {
      "type": "API_KEY_ID",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  },
  "description": "Average response time is over 1 seconds in the last 20 minutes",
  "warning_threshold": 900,
  "no_data_status": "OK",
  "group_retention": 600000,
  "aux": {},
  "compare_to": "2 hours ago",
  "change_type": "DIFFERENCE",
  "metric_id": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "arguments": {}
  },
  "parameters": {}
}

Authorizations

X-BRONTO-API-KEY
string
header
required

Path Parameters

templateId
string<uuid>
required

The ID of the monitor template to update

Body

application/json
name
string
required

The name of the monitor template

Required string length: 1 - 255
Example:

"High Error Rate"

comparison_operator
enum<string>
required

the comparison operator of the monitor (ABOVE, ABOVE_OR_EQUAL, BELOW, BELOW_OR_EQUAL, EQUAL, NOT_EQUAL)

Available options:
BELOW,
BELOW_OR_EQUAL,
ABOVE,
ABOVE_OR_EQUAL,
EQUAL,
NOT_EQUAL
Example:

"ABOVE"

threshold
number
required

the threshold value of the monitor

Example:

1000

window
string
required

The time window to evaluate the monitor; minimum five minutes, maximum one day

Example:

"'Last 20 minutes', 'Last 2 hours', 'Last 3 days'"

metric
object
required
description
string

Extra contextual information to add to the monitor template.

Required string length: 1 - 4000
Example:

"Average response time is over 1 seconds in the last 20 minutes"

warning_threshold
number

the warning threshold value

Example:

1000

no_data_status
enum<string>

Specify the status to use in case of no data (no events matched in a time window)

Available options:
OK,
NO_DATA,
ALERT,
WARN
Example:

"OK"

group_retention
integer<int64>

Remove groups with no data after the provided time in milliseconds

Required range: 0 <= x <= 604800000
Example:

600000

aux
object

Additional monitor configuration

type
enum<string>
default:PATTERN
Available options:
PATTERN,
USAGE,
CHANGE_DETECTION
compare_to
string

For change detection monitors only. How far back in time the comparison query should be run. Minimum "5 mins ago", maximum "1 month".

Example:

"'2 hours ago', '1 days ago'"

change_type
enum<string>

For change detection monitors only. Specifies how the change values are calculated, as described in the Bronto documentation.

Available options:
DIFFERENCE,
PERCENTAGE
this_template_tags
object[]
parameters
object

Map of parameter names to their definitions. Each key represents the parameter name used within the template.

Response

Monitor template is successfully updated

id
string<uuid>
required

The unique identifier for the monitor

name
string
required

The name of the monitor

Required string length: 1 - 255
Example:

"High Error Rate"

comparison_operator
enum<string>
required

the comparison operator of the monitor (ABOVE, ABOVE_OR_EQUAL, BELOW, BELOW_OR_EQUAL, EQUAL, NOT_EQUAL)

Available options:
BELOW,
BELOW_OR_EQUAL,
ABOVE,
ABOVE_OR_EQUAL,
EQUAL,
NOT_EQUAL
Example:

"ABOVE"

threshold
number<double>
required

the threshold value of the monitor

Example:

1000

window
string
required

The time window to evaluate the monitor; minimum five minutes, maximum one day

Example:

"'Last 20 minutes', 'Last 2 hours', 'Last 1 days'"

type
enum<string>
default:PATTERN
required
Available options:
PATTERN,
USAGE,
CHANGE_DETECTION
metadata
object
required

Common metadata attached to all persisted resources.

description
string

Extra contextual information to add to the monitor

Maximum string length: 4000
Example:

"Average response time is over 1 seconds in the last 20 minutes"

warning_threshold
number<double>

the warning threshold value

Example:

900

no_data_status
enum<string>

Specify the status to use if a group has no data (no events matched in a time window)

Available options:
OK,
NO_DATA,
ALERT,
WARN
Example:

"OK"

group_retention
integer<int64>

Remove groups with no data after the provided time in milliseconds

Required range: 0 <= x <= 604800000
Example:

600000

aux
object

Additional monitor configuration

compare_to
string

For change detection monitors only. How far back in time the comparison query should be run. Minimum "5 mins ago", maximum "1 month".

Example:

"2 hours ago"

change_type
enum<string>

For change detection monitors only. Specifies how the change values are calculated, as described in the Bronto documentation.

Available options:
DIFFERENCE,
PERCENTAGE
metric_id
object
parameters
object

Map of parameter names to their definitions. Each key represents the parameter name used within the template.