TrueSight API Documentation
Alarms v1Alarms v2BatchingDashboards
DatasetsEventsExtended Metrics
PluginsRelaysSourcesSource-TagsSynchronize Data


Creates a new metric

Request body properties

name Name of the metric, must be globally unique, recommended that you add your own namespace

type Type of metric, could be a device metric, a plugin metric or any arbitrary type

description Description of the metric

displayName Short name to use when referring to the metric

displayNameShort Terse short name when referring to the metric and space is limited, less than 15 characters preferred.

unit The units of measurement for the metric, can be percent, number, bytecount, or duration

unitDescription An optional description of the unit like "$ per second" or "% of free memory"

defaultAggregate When graphing (or grouping at the 1 second interval) the aggregate function that makes most sense for this metric. Can be sum, avg, max, or min.

defaultResolutionMS Expected polling time of data in milliseconds. Used to improve rendering of graphs for non-one-second polled metrics.

isDisabled Is this metric disabled

Example request

curl \
-u <email>:<api-token> \
-H "Content-Type: application/json" \
-d '
   "name": "MY_COOL_METRIC",
   "description": "A cool metric I created",
   "displayName": "My cool metric",
   "displayNameShort": "cool metric",
   "unit": "number",
   "defaultAggregate": "avg"