I am looking for the API which gives me information on CPU and Memory of CMX shown under the Systems->metrics
When I tried it using the API guide, I am trying
x.x.x.x/api/config/v1/system/preferences/:component/:key
I am always getting - Resource not found.
These API are not documented, but you can access them with the same REST API we use for the other resources.
Use CHROME DEVELOPER TOOLS, i.e. Postman, to see these APIs.
Using the Cisco DevNet CMX sandbox mse10 at url https://cmxlocationsandbox.cisco.com and basic authentication of learning/learning returns the following response.
MEMORY
https://cmxlocationsandbox.cisco.com/db/metrics/series?q=select mean(value) from /cmx.mem_percent.system/ where time > now() - 1m group by time(5m)
[
{
"name": "mse10.cmx.mem_percent.system",
"columns": [
"time",
"mean"
],
"points": [
[
1469460900000,
55.2
]
]
}
]
MEMORY, CPU, AND DISK
https://cmxlocationsandbox.cisco.com/db/metrics/series?q=select mean(value) from /cmx.*_percent.system/ where time > now() - 1m group by time(5m)
[
{
"name": "mse10.cmx.cpu_percent.system",
"columns": [
"time",
"mean"
],
"points": [
[
1469461500000,
5.84
]
]
},
{
"name": "mse10.cmx.disk_usage_percent.system",
"columns": [
"time",
"mean"
],
"points": [
[
1469461500000,
21.1
]
]
},
{
"name": "mse10.cmx.mem_percent.system",
"columns": [
"time",
"mean"
],
"points": [
[
1469461500000,
55.2
]
]
}
]
Comments
0 comments
Please sign in to leave a comment.