Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复node-all等grafana darshboard因采样时间间隔太短导致没有数据的问题 #151

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion install/kubernetes/all_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'quay.io/prometheus/prometheus:v2.3.1',
"quay.io/prometheus/prometheus:v2.27.1",
'quay.io/coreos/kube-state-metrics:v1.3.1',
'quay.io/prometheus/node-exporter:v0.15.2',
'prom/node-exporter:v1.3.1',
'quay.io/coreos/kube-rbac-proxy:v0.3.1',
'quay.io/coreos/addon-resizer:1.0',
"quay.io/prometheus-operator/prometheus-operator:v0.46.0",
Expand Down
16 changes: 8 additions & 8 deletions install/kubernetes/prometheus/grafana/dashboard/all-node.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"targets": [
{
"exemplar": true,
"expr": "DCGM_FI_DEV_GPU_UTIL{exported_pod!=''}",
"expr": "DCGM_FI_DEV_GPU_UTIL{pod!=''}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
Expand Down Expand Up @@ -441,7 +441,7 @@
"steppedLine": false,
"targets": [
{
"expr": "100 - (avg by (instance) (irate(node_cpu{job=\"node-exporter\", mode=\"idle\"}[5m])) * 100)\n",
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\"}[5m])) * 100)\n",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{instance}}",
Expand Down Expand Up @@ -540,7 +540,7 @@
"steppedLine": false,
"targets": [
{
"expr": "node_memory_MemTotal{job=\"node-exporter\"}\n- node_memory_MemFree{job=\"node-exporter\"}\n- node_memory_Buffers{job=\"node-exporter\"}\n- node_memory_Cached{job=\"node-exporter\"}\n",
"expr": "node_memory_MemTotal_bytes{job=\"node-exporter\"}\n- node_memory_MemFree_bytes{job=\"node-exporter\"}\n- node_memory_Buffers_bytes{job=\"node-exporter\"}\n- node_memory_Cached_bytes{job=\"node-exporter\"}\n",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{instance}}",
Expand Down Expand Up @@ -639,7 +639,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(node_network_receive_bytes{job=\"node-exporter\", device!~\"lo\"}[5m])",
"expr": "rate(node_network_receive_bytes_total{job=\"node-exporter\", device!~\"lo\"}[5m])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{instance}}:{{device}}",
Expand Down Expand Up @@ -738,7 +738,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(node_network_transmit_bytes{job=\"node-exporter\", device!~\"lo\"}[5m])",
"expr": "rate(node_network_transmit_bytes_total{job=\"node-exporter\", device!~\"lo\"}[5m])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{instance}}:{{device}}",
Expand Down Expand Up @@ -848,21 +848,21 @@
"steppedLine": false,
"targets": [
{
"expr": "sum by (instance) (rate(node_disk_bytes_read{job=\"node-exporter\"}[2m]))",
"expr": "sum by (instance) (rate(node_disk_read_bytes_total{job=\"node-exporter\"}[2m]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{instance}} read",
"refId": "A"
},
{
"expr": "sum by (instance) (rate(node_disk_bytes_written{job=\"node-exporter\"}[2m]))",
"expr": "sum by (instance) (rate(node_disk_written_bytes_total{job=\"node-exporter\"}[2m]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{instance}} written",
"refId": "B"
},
{
"expr": "sum by (instance) (rate(node_disk_io_time_ms{job=\"node-exporter\"}[2m]))",
"expr": "sum by (instance) (rate(node_disk_io_time_seconds_total{job=\"node-exporter\"}[2m]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{instance}} io time",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"targets": [
{
"exemplar": true,
"expr": "sum by (destination_workload) (istio_requests_total{destination_service_namespace=\"$namespace\",destination_workload=~\"($service)\"})",
"expr": "sum by (destination_workload) (istio_requests_total{destination_service_namespace=~\"$namespace\",destination_workload=~\"($service)\"})",
"format": "time_series",
"hide": true,
"interval": "",
Expand All @@ -82,7 +82,7 @@
},
{
"exemplar": true,
"expr": "sum by (destination_workload,response_code) (irate(istio_requests_total{destination_service_namespace=\"$namespace\",destination_workload=~\"($service)\"}[1m]))",
"expr": "sum by (destination_workload,response_code) (irate(istio_requests_total{destination_service_namespace=~\"$namespace\",destination_workload=~\"($service)\"}[1m]))",
"hide": false,
"interval": "",
"legendFormat": "{{response_code}} , {{destination_workload}}",
Expand Down Expand Up @@ -183,7 +183,7 @@
"targets": [
{
"exemplar": true,
"expr": "sum by (destination_workload) (irate(istio_request_bytes_sum{destination_service_namespace=\"$namespace\",destination_workload=~\"($service)\"}[1m]))",
"expr": "sum by (destination_workload) (irate(istio_request_bytes_sum{destination_service_namespace=~\"$namespace\",destination_workload=~\"($service)\"}[1m]))",
"format": "time_series",
"hide": false,
"interval": "",
Expand Down Expand Up @@ -284,7 +284,7 @@
"targets": [
{
"exemplar": true,
"expr": "avg by (destination_workload) (rate(istio_request_duration_milliseconds_sum{destination_service_namespace=\"$namespace\",destination_workload=~\"($service)\"}[1m])/rate(istio_request_duration_milliseconds_count{destination_service_namespace=\"$namespace\",destination_workload=~\"($service)\"}[1m]))",
"expr": "avg by (destination_workload) ((rate(istio_request_duration_milliseconds_sum{destination_service_namespace=~\"$namespace\",destination_workload=~\"($service)\"}[1m])/rate(istio_request_duration_milliseconds_count{destination_service_namespace=~\"$namespace\",destination_workload=~\"($service)\"}[1m]))>0)",
"format": "time_series",
"hide": false,
"interval": "",
Expand Down Expand Up @@ -606,7 +606,7 @@
"targets": [
{
"exemplar": true,
"expr": "DCGM_FI_DEV_MEM_COPY_UTIL{exported_pod=~\".*$service.*\"}",
"expr": "DCGM_FI_DEV_MEM_COPY_UTIL{pod=~\".*$service.*\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
Expand Down Expand Up @@ -808,7 +808,7 @@
"targets": [
{
"exemplar": true,
"expr": "sum by (destination_workload) (istio_requests_total{destination_service_namespace=\"$namespace\"})",
"expr": "sum by (destination_workload) (istio_requests_total{destination_service_namespace=~\"$namespace\"})",
"format": "time_series",
"hide": false,
"interval": "",
Expand Down Expand Up @@ -904,7 +904,7 @@
"value": "$__all"
},
"datasource": "prometheus",
"definition": "label_values(istio_requests_total{destination_service_namespace=\"$namespace\"}, destination_service_name)",
"definition": "label_values(istio_requests_total{destination_service_namespace=~\"$namespace\"}, destination_service_name)",
"description": null,
"error": null,
"hide": 0,
Expand All @@ -914,7 +914,7 @@
"name": "service",
"options": [],
"query": {
"query": "label_values(istio_requests_total{destination_service_namespace=\"$namespace\"}, destination_service_name)",
"query": "label_values(istio_requests_total{destination_service_namespace=~\"$namespace\"}, destination_service_name)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
Expand Down
4 changes: 2 additions & 2 deletions install/kubernetes/prometheus/grafana/dashboard/pod-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
},
{
"exemplar": true,
"expr": "sum by (node,namespace,pod) (rate(container_cpu_usage_seconds_total{job=\"kubelet\", image!=\"\",container_name!=\"POD\",pod!=\"\",namespace=~\"pipeline|jupyter|service|katib\"}[2m]))",
"expr": "sum by (node,namespace,pod) (rate(container_cpu_usage_seconds_total{job=\"kubelet\", image!=\"\",container_name!=\"POD\",pod!=\"\",namespace=~\"pipeline|jupyter|service|katib\"}[3m]))",
"format": "table",
"hide": false,
"instant": true,
Expand Down Expand Up @@ -406,7 +406,7 @@
"targets": [
{
"exemplar": true,
"expr": "sum by (pod) (rate(container_cpu_usage_seconds_total{job=\"kubelet\", image!=\"\",container_name!=\"POD\",pod=~\".*$pod.*\"}[2m]))",
"expr": "sum by (pod) (rate(container_cpu_usage_seconds_total{job=\"kubelet\", image!=\"\",container_name!=\"POD\",pod=~\".*$pod.*\"}[3m]))",
"format": "time_series",
"instant": false,
"interval": "30s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
key: node-role.kubernetes.io/master
containers:
- name: node-exporter
image: quay.io/prometheus/node-exporter:v0.15.2 # quay.io/prometheus/node-exporter:v0.15.2
image: prom/node-exporter:v1.3.1 # 原版本为 quay.io/prometheus/node-exporter:v0.15.2 ,若出现grafana报表不显示的情况,请退回旧版
args:
- --web.listen-address=127.0.0.1:9101
- --path.procfs=/host/proc
Expand Down