curl --location --request GET 'https://api.flashcat.cloud/api/n9e/builtin-metrics?collector=categraf&typ=Host&unit=&query=cpu&limit=20&p=1' \
--header 'X-Language: zh_CN' \
--header 'X-User-Token: <api-key>'
{
"dat": {
"list": [
{
"id": 1,
"collector": "categraf",
"typ": "host",
"name": "cpu_usage",
"unit": "%",
"note": "",
"lang": "zh",
"expression": "100 - cpu_usage_idle{cpu='cpu-total'}",
"created_at": 1712472018,
"created_by": "root",
"updated_at": 1712472018,
"updated_by": ""
},
{
"id": 2,
"collector": "categraf",
"typ": "host",
"name": "cpu_idle",
"unit": "%",
"note": "",
"lang": "zh",
"expression": "100 - cpu_usage_idle{cpu='cpu-total'}",
"created_at": 1712472047,
"created_by": "root",
"updated_at": 1712472047,
"updated_by": ""
}
],
"total": 2
},
"err": ""
}