Come join our live training webinar every other Wednesday at 11am PST and hear LogicMonitor experts explain best practices and answer common questions. We understand these are uncertain times, and we are here to help!
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/restWhere ACCOUNTNAME is replaced with your LogicMonitor account name.
{ACCOUNTNAME}
ACCOUNTNAME
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.
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.
LogicMonitor supports the following aggregation methods:
The behavior of each aggregation method when data is pushed at sub-minute intervals is exemplified in the following table.
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.
Metric data time limit can be up to ten minutes in the past to one minute in the future between the API caller and LogicMonitor. Data with timestamps outside this window are ignored. In addition, you cannot send data for an instance with a timestamp previous to any data already ingested by that instance.
The Push Metrics REST API consists of three endpoints:
The status codes returned by the Push Metrics REST API are detailed in About REST API v2.
In This Article