Skip to content

Commit

Permalink
Merge pull request kubesphere#3526 from zhu733756/add-pod-level-metrics
Browse files Browse the repository at this point in the history
Add pod level metrics for edge node
  • Loading branch information
ks-ci-bot authored Mar 31, 2021
2 parents ea93f38 + 96d60da commit 6cdbf33
Show file tree
Hide file tree
Showing 14 changed files with 992 additions and 267 deletions.
638 changes: 475 additions & 163 deletions pkg/simple/client/monitoring/metricsserver/metricsserver.go

Large diffs are not rendered by default.

341 changes: 257 additions & 84 deletions pkg/simple/client/monitoring/metricsserver/metricsserver_test.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"values": [
[
1611578096,
1616675696,
"1"
]
]
Expand All @@ -23,7 +23,7 @@
},
"values": [
[
1611578096,
1616675696,
"2"
]
]
Expand All @@ -43,7 +43,7 @@
},
"values": [
[
1611578096,
1616675696,
"1048576"
]
]
Expand All @@ -55,7 +55,7 @@
},
"values": [
[
1611578096,
1616675696,
"2097152"
]
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"values": [
[
1611578096,
1616675696,
"2"
]
]
Expand All @@ -31,7 +31,7 @@
},
"values": [
[
1611578096,
1616675696,
"0.25"
]
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"values": [
[
1611578096,
1616675696,
"1048576"
]
]
Expand All @@ -23,7 +23,7 @@
},
"values": [
[
1611578096,
1616675696,
"2097152"
]
]
Expand All @@ -43,7 +43,7 @@
},
"values": [
[
1611578096,
1616675696,
"0.0001220703125"
]
]
Expand All @@ -55,7 +55,7 @@
},
"values": [
[
1611578096,
1616675696,
"0.000244140625"
]
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"metric_name": "pod_cpu_usage",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod1"
},
"values":[
[
1616675696,
"0.001"
]
]
}
]
}
},
{
"metric_name": "pod_memory_usage_wo_cache",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod1"
},
"values": [
[
1616675696,
"1"
]
]
}
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"metric_name": "pod_cpu_usage",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod2"
},
"values": [
[
1616675696,
"0.002"
]
]
}
]
}
},
{
"metric_name": "pod_memory_usage_wo_cache",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod2"
},
"values": [
[
1616675696,
"2"
]
]
}
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"metric_name": "pod_cpu_usage",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod1"
},
"values":[
[
1616675696,
"0.001"
]
]
}
]
}
},
{
"metric_name": "pod_memory_usage_wo_cache",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod1"
},
"values": [
[
1616675696,
"1"
]
]
}
]
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"1"
]
},
Expand All @@ -20,7 +20,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"2"
]
}
Expand All @@ -38,7 +38,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"1048576"
]
},
Expand All @@ -48,7 +48,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"2097152"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"2"
]
}
Expand All @@ -28,7 +28,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"0.25"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"1048576"
]
},
Expand All @@ -20,7 +20,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"2097152"
]
}
Expand All @@ -38,7 +38,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"0.0001220703125"
]
},
Expand All @@ -48,7 +48,7 @@
"role": "edge"
},
"value": [
1611578096,
1616675696,
"0.000244140625"
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"metric_name": "pod_cpu_usage",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod1"
},
"value": [
1616675696,
"0.001"
]
}
]
}
},
{
"metric_name": "pod_memory_usage_wo_cache",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod1"
},
"value": [
1616675696,
"1"
]
}
]
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"metric_name": "pod_cpu_usage",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod2"
},
"value": [
1616675696,
"0.002"
]
}
]
}
},
{
"metric_name": "pod_memory_usage_wo_cache",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"namespace": "kubeedge",
"pod":"pod2"
},
"value": [
1616675696,
"2"
]
}
]
}
}
]
Loading

0 comments on commit 6cdbf33

Please sign in to comment.