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

POST/v1/measurements

Adds measurement readings to the data store.

Upon submitting measurements the data is instantly available to the dashboard for graphing.

In order to submit data you must first have created a metric with a unique metric name.

Request body properties

source

The source of the metric

metric

The name of the metric that you've set up in your account

measure

Numeric measure to report

timestamp

Unix timestamp the measurement was taken. If omitted, uses the time at which the measure is received by TrueSight Pulse.

metadata

An optional map of measurement metadata. This can always be omitted for TrueSight Pulse measurements. However, the following fields will have special handling for TrueSight Intelligence:

Field Description
app_id Application ID/Name. This tag results will associate the measurement with an application object in TrueSight Intelligence. For example, to associate a metric with an application named EngageCash, specify app_id=EngageCash as a property.
origin Host/server for which the data is being collected by a plugin. This tag forces TrueSight Intelligence to create a Device object. For example, when a plugin is monitoring an application running on host myoracle.bmc.com, a property of origin=myoracle.bmc.com can be specified.

Example request:

curl https://api.truesight.bmc.com/v1/measurements \
-X POST \
-u <email>:<api-token> \
-H "Content-Type: application/json" \
-d '
{
   "source": "myserver",
   "metric": "PAGE_FAULTS",
   "measure": 2,
   "timestamp": 1377043134,
   "metadata": {
      "app_id": "ingress"
   }
}'

Bulk add operations:

Pass an array for the for the request body, each item is an array of the parameters in the order list above.

curl https://api.truesight.bmc.com/v1/measurements \
-X POST \
-u <email>:<api-token> \
-H "Content-Type: application/json" \
-d '
[
   [
      "myserver",
      "PAGE_FAULTS",
      2,
      1377043134,
      {
         "app_id": "ingress"
      }
   ],
   [
      "myserver",
      "CACHE_MEMORY_USED",
      0.7,
      1377043134,
      {
         "app_id": "ingress"
      }
   ]
]'