RPC API Developer's Guide

Update a Collector

Note that LogicMonitor has a REST API equivalent for this function.

You can use LogicMonitor's RPC updateAgent API to update existing collectors in your account.

Note: As with all our APIs, authentication is required.

 

updateAgent

URL:

https://accountName.logicmonitor.com/santaba/rpc/updateAgent?c=accountName&u=user&p=password&id=123&credential=collectorCredential&backupAgentId=backupCollectorId&description=collectorDescription

 

Request Parameters: You can include the following as query parameters in an updateAgent request:

Parameter

Type

Description

id Integer Required. The unique Id of the collector whose properties you want to update.
credential String Required. The credential associated with the collector whose properties you want to update. The credential parameter can be found with the getAgent RPC (see above).
backupAgentId Integer Optional. The Id of the collector to be set as a back-up collector.
description String Optional. The description of the collector.
escalatingChainId The id of the escalation chain that alert notifications will be sent to for this collector Optional

 

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:

Value

Description

nextRecipient The next recipient to be notified if the collector is in alert
clearSent Whether or not a clear notification was sent for the last alert
lastSentNotification The time (in epoch format) that the last noticiation was sent for this collector
netScanVersion The version of netscan configured for the collector
suppressAlertClear Whether or not notifications indicating that a collector alert has cleared should be suppressed
build The collector version
lastSentNotificationOnLocal The local date and time that the last notification was sent for this collector
id The collector id
resendIval How frequently alert notifications should be re-sent for this collector (until they are acknowledged)
watchdogUpdatedOn The last date and time the LogicMonitor Watchdog Service was updated
escalatingChainId The id of the escalation chain that alert notifications will be sent to for this collector
description The collector description
ackComment The comment submitted with the alert acknowledgement for this collector
updatedOn The time (in epoch format) that the collector was last updated
updatedOnLocal The local date and time that the collector was last updated
agentConf The configuration file for the collector
platform The platform the collector is compatible with (Linux or Windows)
ackedBy The user who acknowledged the alert for this collector
isDown Whether or not the collector is down
escalatingChain The escalation chain configured for this collector
status The registration status of the collector. Status can be 0 | 1 | 2| 3:

0 : Unregistered collector
1 : Registered collector
2 : Stopped collector
3 : Suspended collector

ackedOn The time that the collector alert was acknowledged
confVersion The collector configuration file version
uptime The collector uptime
hostname The hostname for the device the collector is installed on
createdOnLocal The date and time the collector was added to your account
credential The collector credential, used for communicating with LogicMonitor's data centers
createdOn The time (in epoch format) the collector was added to your account
numOfHosts The number of hosts monitored by this collector
backupAgentId The Id of the backup (failover) collector, if one is configured
acked Whether or not there is a collector alert that is acknowlodged

 

Example

Request:

curl "https://apiAccount.logicmonitor.com/santaba/rpc/updateAgent?c=apiAccount&u=apiUser&p=example&id=133&credential=ERYOITY&description=LA%20prod%20collector" 
Response:

{
  "status": 200,
  "data": {
    "nextRecipient": 0,
    "clearSent": true,
    "lastSentNotificationOn": 0,
    "netscanVersion": "0",
    "suppressAlertClear": "false",
    "build": "0",
    "lastSentNotificationOnLocal": "",
    "id": 133,
    "resendIval": 0,
    "watchdogUpdatedOn": "2015-11-17 15:13:59 PST",
    "escalatingChainId": 0,
    "description": "LA prod collector",
    "ackComment": "",
    "credential2": "",
    "updatedOn": 1447802039,
    "updatedOnLocal": "2015-11-17 15:13:59 PST",
    "agentConf": "",
    "platform": "n/a",
    "ackedBy": "",
    "isDown": true,
    "escalatingChain": {
      "id": 0,
      "description": "",
      "ccdestination": "",
      "name": "No, I don't want to get collector down alerts",
      "destination": ""
    },
    "status": 0,
    "ackedOn": "",
    "confVersion": "0",
    "uptime": 0,
    "createdOnLocal": "2015-11-17 15:13:59 PST",
    "credential": "ERYOITY",
    "createdOn": 1447802039,
    "numberOfHosts": 0,
    "backupAgentId": 0,
    "acked": false
  },
  "errmsg": "OK"
}