Get Metrics
pre-requisite
To fetch metric types and metric names details refer Catalog API
To fetch entity name, entity type, device type, and device name refer to Topology API
API to fetch raw metrics for given metric type,entity name, and time range.
Metric type defined in catalog
memory
Entity on which metrics are collected.
Supports regex. (minimum 3 letters required if you want to use .* )
Supports multiple entity names up to 10 by giving comma(,)
MEM-AMPMNEWUS102000_PS_Switch_10/1
Must be in EPOCH seconds.
Defaults to last one day
1654041600
Must be in EPOCH seconds.
Defaults to current time
1654041600
Device type
Switch
Device instance name on which metrics collected
AMPMNEWUS102000_PS_Switch_10
Provide metric names to be included in the response, multiple metric names separated by comma(,) .
Default to all metric names that exist for metric type
FreeMemory,FreeMemoryPct
Entity type
Memory
Collector which collects this metric
AMPMNEWUS102000
Here customer is tag enriched in metrics.
Can replace customer with any other enriched tag like city
Airtel
The size parameter allows you to configure the maximum no of records to be returned.
1000
The from parameter defines the offset from the first result user wants to fetch. The default is 0.
10
Sorting field. defaults to timestamp asc. Field value must match with param existing in response.
timestamp
Sorting order asc,desc
asc
OK
{
"COUNT": 1,
"Result": [
{
"deviceType": "Switch",
"instance": "SMARTS-PM-METRICS",
"entityType": "Memory",
"processedTimestamp": 1657544634825,
"type": "smarts-metrics",
"deviceName": "AMPMNEWUS102000_PS_Switch_10",
"FreeMemory": 9295,
"tags": {
"IsManaged": true,
"priority": "NONE",
"dcName": "_core"
},
"metricType": "memory",
"@timestamp": "2022-07-11T12:56:26.000Z",
"entityName": "MEM-AMPMNEWUS102000_PS_Switch_10/1",
"@version": "1",
"elementUUID": "AMPMNEWUS102000_PS_Switch_10$Switch$",
"dataSource": "AMPMNEWUS102000",
"timestamp": 1657544186000
}
]
}
Total number of objects
Invalid Request sent by the user
User authentication failed
Access to the requested resource/operation is forbidden
Cannot find requested resource
Internal server error