Add test code to metrics client, and fix metrics items process
Signed-off-by: root <danma@yunify.com>
This commit is contained in:
42
pkg/simple/client/monitoring/metricsserver/testdata/metrics-matrix-2.json
vendored
Normal file
42
pkg/simple/client/monitoring/metricsserver/testdata/metrics-matrix-2.json
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
[
|
||||
{
|
||||
"metric_name": "node_cpu_usage",
|
||||
"data": {
|
||||
"resultType": "matrix",
|
||||
"result": [
|
||||
{
|
||||
"metric": {
|
||||
"node": "edgenode-2",
|
||||
"role": "edge"
|
||||
},
|
||||
"values": [
|
||||
[
|
||||
1611578096,
|
||||
"2"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"metric_name": "node_cpu_utilisation",
|
||||
"data": {
|
||||
"resultType": "matrix",
|
||||
"result": [
|
||||
{
|
||||
"metric": {
|
||||
"node": "edgenode-2",
|
||||
"role": "edge"
|
||||
},
|
||||
"values": [
|
||||
[
|
||||
1611578096,
|
||||
"0.25"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user