RPC API Developer's Guide

Acknowledge Alerts

Note that LogicMonitor has an available REST API equivalent for this API call.

The LogicMonitor API allows users to acknowledge alerts programmatically with the confirmAlerts call.  

Note: As with all of our API calls, authentication is required.

 

confirmAlerts

Acknowledge one or more alerts

URL:
https://accountName.logicmonitor.com/santaba/rpc/confirmAlerts?c=accountName&u=user&p=password&ids=alertIds&eids=eventAlertids&bids=batchJobAlertIds&sids=serviceAlertIds&hcids=hostClusterAlertIds&comment=ackComment
 

Request Parameters: You must include one of the following id parameters as query parameters in a confirmAlerts request:

Parameter

Type

Description

ids Integer The Ids of the alerts that you want to acknowledge, separated by commas.
eids Integer The Ids of the event alerts that you want to acknowledge, separated by commas.
bids Integer The Ids of the batch job alerts that you want to acknowledge, separated by commas.
sids Integer The Ids of the service alerts that you want to acknowledge, separated by commas.
hcids Integer The Ids of the hostcluster alerts that you want to acknowledge, separated by commas.
comment String Optional. The comment that will be associated with the acknowledgement. This string must be URL escaped (e.g. This+is+an+acknowledgement+comment ).

 

Note: For all Ids above, the Id can either be the alert id (as returned in a getAlerts request), which will acknowledge the specific alert, or the LM Id (as returned in an alert notification), which will acknowledge all active alerts for the specific instance corresponding to the LM Id.

All outputs will be in the format: { [status], [data], [errmsg] }, where status is the status of the response, errmsg is the error message associated with the response, and the data object includes the following:

  • nextRecipient
  • dataSourceInstance
  • alertRuleName
  • dataSource
  • endOn
  • hostId
  • type
  • dataSourceId
  • ackedOnLocal
  • id
  • thresholds
  • level
  • endOnLocal
  • ackComment
  • value
  • alertEscalationChainName
  • hostGroups
  • startOnLocal
  • dataPoint
  • ackedBy
  • host
  • dataSourceInstanceId
  • ackedOn
  • escalationChainId
  • escalationSubChainId
  • alertRecipients
  • startOn
  • duration
  • dataSourceInstanceDescription
  • active
  • hostDataSourceId
  • acked
  • displayName

 

Example

Request:
 curl "https://apiAccount.logicmonitor.com/santaba/rpc/confirmAlerts?c=apiAccount&u=apiUser&p=example&ids=3230"
  Response:
 {
  "status": 200,
  "data": [{
    "nextRecipient": 0,
    "dataSourceInstance": "HostStatus",
    "alertRuleName": "",
    "dataSource": "HostStatus",
    "endOn": 0,
    "hostId": 201,
    "type": "alert",
    "dataSourceId": 119,
    "ackedOnLocal": "",
    "id": 3230,
    "thresholds": "> 300 300 300",
    "level": "critical",
    "endOnLocal": "",
    "ackComment": "",
    "value": "2824815.64",
    "alertEscalationChainName": "",
    "hostGroups": [],
    "startOnLocal": "2015-10-14 19:54:53 PDT",
    "dataPoint": "idleInterval",
    "ackedBy": "",
    "host": "172.16.19.128",
    "dataSourceInstanceId": 2162,
    "ackedOn": 0,
    "escalationChainId": 0,
    "escalationSubChainId": 0,
    "alertRecipients": "{\"hipchat_warn\":[\"admin\"]}",
    "startOn": 1444877693,
    "duration": "784h 34m",
    "dataSourceInstanceDescription": "",
    "active": true,
    "hostDataSourceId": 5083,
    "acked": false,
    "displayName": "Host Status"
  }],
  "errmsg": "OK"
}