monitoring: fix metric value NaN
Signed-off-by: huanggze <loganhuang@yunify.com>
This commit is contained in:
232
pkg/models/monitoring/testdata/faulty-node-metrics-2.json
vendored
Normal file
232
pkg/models/monitoring/testdata/faulty-node-metrics-2.json
vendored
Normal file
@@ -0,0 +1,232 @@
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"metric_name": "node_cpu_utilisation",
|
||||
"data": {
|
||||
"resultType": "vector",
|
||||
"result": [
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-2dazc1d6"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.18095833333306172"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-9jtsi522"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.03250000000007276"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-ezjb7gsk"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.07443750000044626"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-hgcoippu"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.05066666666655995"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-ircdnrao"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.05210416666595847"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-o13skypq"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.07756249999996119"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-tl1i71hr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-xfcxdn7z"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.06745833333334303"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"metric_name": "node_disk_size_utilisation",
|
||||
"data": {
|
||||
"resultType": "vector",
|
||||
"result": [
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-2dazc1d6"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.42012898861983516"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-9jtsi522"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.2601006025131434"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-ezjb7gsk"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.29849334024542695"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-hgcoippu"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.2588273152865106"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-ircdnrao"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.21351118996831508"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-o13skypq"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.4329682466178235"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-tl1i71hr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-xfcxdn7z"
|
||||
},
|
||||
"value": [
|
||||
1585658599.193,
|
||||
"0.35981263055856705"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"metric_name": "node_memory_utilisation",
|
||||
"data": {
|
||||
"resultType": "vector",
|
||||
"result": [
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-2dazc1d6"
|
||||
},
|
||||
"value": [
|
||||
1585658599.195,
|
||||
"0.5286875837861773"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-9jtsi522"
|
||||
},
|
||||
"value": [
|
||||
1585658599.195,
|
||||
"0.1446648505469157"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-ezjb7gsk"
|
||||
},
|
||||
"value": [
|
||||
1585658599.195,
|
||||
"0.23637090535053928"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-hgcoippu"
|
||||
},
|
||||
"value": [
|
||||
1585658599.195,
|
||||
"0.2497060264216553"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-ircdnrao"
|
||||
},
|
||||
"value": [
|
||||
1585658599.195,
|
||||
"0.21291125105270192"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-o13skypq"
|
||||
},
|
||||
"value": [
|
||||
1585658599.195,
|
||||
"0.823247832787681"
|
||||
]
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-tl1i71hr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"metric": {
|
||||
"node": "i-xfcxdn7z"
|
||||
},
|
||||
"value": [
|
||||
1585658599.195,
|
||||
"0.40309723127991315"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user