Support Center Home


About the Push Metrics REST API

You can use the LogicMonitor Push Metrics REST API to programmatically push metrics for multiple instances associated with a single resource and DataSource. You can also manage some aspects of the associated resource and DataSource.

Base URL:
https://{ACCOUNTNAME}.logicmonitor.com/rest
Where ACCOUNTNAME is replaced with your LogicMonitor account name.

Authentication

The Push Metrics REST API requires API token authentication. LogicMonitor REST API uses the same API token authentication. For more information, see Using LogicMonitor’s REST API.

Note: At a minimum, the role associated with the API-only user account must have permissions to manage resources and manage LogicModules. For more information on creating roles and API-only user accounts, see Roles and Users respectively.

Aggregation Interval

The Push Metrics REST API pushes datapoint metrics to instances once per minute. If data is sent frequently (sub-minute intervals), the values are cached, then aggregated using the aggregation method specified. The aggregated value is stored as the datapoint value.

Three aggregation methods are supported: average, sum, and none. The behavior of each aggregation method when data is pushed at sub-minute intervals is exemplified in the following table.

Sub-minute Collection Time/Data SetStored Value for Each Aggregation Method
AverageSumNone
12:00:05 = 10112:00:25 = 10112:00:45 = 128110330128
12:01:05 = 12512:01:25 = 10712:01:45 = 101111333101
12:02:05 = 10012:02:25 = 10112:02:45 = 105102306105

For the gauge metric, these values will be stored as-is. For the counter metric, since it is calculating rate per second, the rate is based on the time difference between the prior and current timestamps.

The aggregation method is determined by the dataPointAggregationType field specified in the API request. For more information, see Ingesting Metrics with the Push Metrics REST API.

A time limit of 10 minutes is set for setting the difference between the API caller and LogicMonitor. Data with timestamps outside this window will be ignored. Additionally, you cannot send data for an instance with a timestamp previous to any data already ingested by that instance.

Endpoints

The Push Metrics REST API consists of three endpoints:

Status Codes

The status codes returned by the Push Metrics REST API are detailed in About REST API v2.

In This Article