TrueSight API Documentation
OverviewAccountActionsAdministration
Alarms v1Alarms v2BatchingDashboards
DatasetsEventsExtended Metrics
HostgroupsGroupsMetersMetricsProduct
PluginsRelaysSourcesSynchronize Data
Tenants
Terms

PUT/v1/alarm/:alarmId

Update an Alarm

Request body properties

name

The name of the alarm

triggerPredicate

The threshold of the alarm.

{
    "agg": "sum" (or "min", "max", "avg")
    "op": "gt" (or "lt", "eq")
    "val": 1000 (some threshold)
}

metricName

The name of the metric to alarm

interval

The interval to alarm on. The following are the supported values, please note they are all in seconds. [1, 15, 60, 300, 900, 3600, 5400, 10800, 21600, 43200]

note

A description or resolution of the alarm

hostgroupId

Which hostgroup does the alarm apply to

perHostNotify

An alarm by default will run the associated actions when any server in the hostgroup violates the threshold, and then at the end when all servers are back within the threshold. If perHostNotify is set to true, the actions will run when ANY server in the group voilates and falls back within the threshold. For things email an email action, this can generate many many emails, for other actions like OpeGenie, PagerDuty or VictorOps.

actions

The list of associated actions for the alarm, gettings actions

isDisabled

Enable or disable the alarm

Example request:

curl https://api.truesight.bmc.com/v1/alarm/:alarmId \
-X PUT \
-u <email>:<api-token> \
-H "Content-Type: application/json" \
-d '
{
   "id": 10823,
   "name": "Inbound Network Traffic is increasing",
   "triggerPredicate": {
      "agg": "sum",
      "op": "gt",
      "val": 2097152000
   },
   "metricName": "NETRB",
   "interval": 60,
   "note": "check for DDOS",
   "perHostNotify": false,
   "actions": [
      123,
      124
   ],
   "isDisabled": false
}'