|
759 | 759 | "uid": "$datasource" |
760 | 760 | }, |
761 | 761 | "editorMode": "code", |
762 | | - "expr": "sum(container_memory_working_set_bytes{service=\"$service\", container=\"main\", image!=\"\"}) by (pod)", |
| 762 | + "expr": "sum(container_memory_working_set_bytes{container=\"main\", image!=\"\"}) by (pod)", |
763 | 763 | "format": "table", |
764 | 764 | "instant": true, |
765 | 765 | "intervalFactor": 2, |
|
785 | 785 | "uid": "$datasource" |
786 | 786 | }, |
787 | 787 | "editorMode": "code", |
788 | | - "expr": "sum(container_memory_working_set_bytes{service=\"$service\", container=\"main\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits) by (pod)", |
| 788 | + "expr": "sum(container_memory_working_set_bytes{container=\"main\", image!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits) by (pod)", |
789 | 789 | "format": "table", |
790 | 790 | "instant": true, |
791 | 791 | "intervalFactor": 2, |
|
801 | 801 | "disableTextWrap": false, |
802 | 802 | "editorMode": "code", |
803 | 803 | "exemplar": false, |
804 | | - "expr": "kube_pod_created{pod!~\".*cronjob.*\"} * 1000", |
| 804 | + "expr": "kube_pod_created * 1000", |
805 | 805 | "format": "table", |
806 | 806 | "fullMetaSearch": false, |
807 | 807 | "hide": false, |
|
883 | 883 | ] |
884 | 884 | } |
885 | 885 | } |
| 886 | + }, |
| 887 | + { |
| 888 | + "id": "filterByValue", |
| 889 | + "options": { |
| 890 | + "filters": [ |
| 891 | + { |
| 892 | + "config": { |
| 893 | + "id": "isNull", |
| 894 | + "options": {} |
| 895 | + }, |
| 896 | + "fieldName": "Value #CPU Usage" |
| 897 | + } |
| 898 | + ], |
| 899 | + "match": "any", |
| 900 | + "type": "exclude" |
| 901 | + } |
886 | 902 | } |
887 | 903 | ], |
888 | 904 | "type": "table" |
|
1117 | 1133 | } |
1118 | 1134 | }, |
1119 | 1135 | "fieldName": "last termination reason" |
| 1136 | + }, |
| 1137 | + { |
| 1138 | + "config": { |
| 1139 | + "id": "isNotNull", |
| 1140 | + "options": {} |
| 1141 | + }, |
| 1142 | + "fieldName": "last termination reason" |
1120 | 1143 | } |
1121 | 1144 | ], |
1122 | 1145 | "match": "all", |
|
1183 | 1206 | "mode": "absolute", |
1184 | 1207 | "steps": [ |
1185 | 1208 | { |
1186 | | - "color": "green" |
| 1209 | + "color": "green", |
| 1210 | + "value": null |
1187 | 1211 | }, |
1188 | 1212 | { |
1189 | 1213 | "color": "red", |
|
1277 | 1301 | "mode": "absolute", |
1278 | 1302 | "steps": [ |
1279 | 1303 | { |
1280 | | - "color": "green" |
| 1304 | + "color": "green", |
| 1305 | + "value": null |
1281 | 1306 | }, |
1282 | 1307 | { |
1283 | 1308 | "color": "red", |
|
1371 | 1396 | "mode": "absolute", |
1372 | 1397 | "steps": [ |
1373 | 1398 | { |
1374 | | - "color": "green" |
| 1399 | + "color": "green", |
| 1400 | + "value": null |
1375 | 1401 | }, |
1376 | 1402 | { |
1377 | 1403 | "color": "red", |
|
1408 | 1434 | "uid": "${datasource}" |
1409 | 1435 | }, |
1410 | 1436 | "editorMode": "code", |
1411 | | - "expr": "(kube_pod_container_status_restarts_total - kube_pod_container_status_restarts_total offset 10m >= 1) and ignoring (reason) min_over_time(kube_pod_container_status_last_terminated_reason{reason=\"OOMKilled\"}[10m]) == 1", |
| 1437 | + "expr": "(kube_pod_container_status_restarts_total - kube_pod_container_status_restarts_total offset 10m) and ignoring (reason) min_over_time(kube_pod_container_status_last_terminated_reason{reason=\"OOMKilled\"}[10m]) == 1", |
1412 | 1438 | "instant": false, |
1413 | 1439 | "legendFormat": "{{pod}}", |
1414 | 1440 | "range": true, |
|
1417 | 1443 | ], |
1418 | 1444 | "title": "OOMKilled events", |
1419 | 1445 | "type": "timeseries" |
| 1446 | + }, |
| 1447 | + { |
| 1448 | + "datasource": { |
| 1449 | + "type": "prometheus", |
| 1450 | + "uid": "$datasource" |
| 1451 | + }, |
| 1452 | + "fieldConfig": { |
| 1453 | + "defaults": { |
| 1454 | + "color": { |
| 1455 | + "mode": "palette-classic" |
| 1456 | + }, |
| 1457 | + "custom": { |
| 1458 | + "axisBorderShow": false, |
| 1459 | + "axisCenteredZero": false, |
| 1460 | + "axisColorMode": "text", |
| 1461 | + "axisLabel": "", |
| 1462 | + "axisPlacement": "auto", |
| 1463 | + "barAlignment": 0, |
| 1464 | + "drawStyle": "line", |
| 1465 | + "fillOpacity": 0, |
| 1466 | + "gradientMode": "none", |
| 1467 | + "hideFrom": { |
| 1468 | + "legend": false, |
| 1469 | + "tooltip": false, |
| 1470 | + "viz": false |
| 1471 | + }, |
| 1472 | + "insertNulls": false, |
| 1473 | + "lineInterpolation": "linear", |
| 1474 | + "lineWidth": 1, |
| 1475 | + "pointSize": 5, |
| 1476 | + "scaleDistribution": { |
| 1477 | + "type": "linear" |
| 1478 | + }, |
| 1479 | + "showPoints": "auto", |
| 1480 | + "spanNulls": false, |
| 1481 | + "stacking": { |
| 1482 | + "group": "A", |
| 1483 | + "mode": "none" |
| 1484 | + }, |
| 1485 | + "thresholdsStyle": { |
| 1486 | + "mode": "off" |
| 1487 | + } |
| 1488 | + }, |
| 1489 | + "mappings": [], |
| 1490 | + "thresholds": { |
| 1491 | + "mode": "absolute", |
| 1492 | + "steps": [ |
| 1493 | + { |
| 1494 | + "color": "green", |
| 1495 | + "value": null |
| 1496 | + }, |
| 1497 | + { |
| 1498 | + "color": "red", |
| 1499 | + "value": 80 |
| 1500 | + } |
| 1501 | + ] |
| 1502 | + } |
| 1503 | + }, |
| 1504 | + "overrides": [] |
| 1505 | + }, |
| 1506 | + "gridPos": { |
| 1507 | + "h": 8, |
| 1508 | + "w": 12, |
| 1509 | + "x": 12, |
| 1510 | + "y": 33 |
| 1511 | + }, |
| 1512 | + "id": 53, |
| 1513 | + "options": { |
| 1514 | + "legend": { |
| 1515 | + "calcs": [], |
| 1516 | + "displayMode": "list", |
| 1517 | + "placement": "bottom", |
| 1518 | + "showLegend": true |
| 1519 | + }, |
| 1520 | + "tooltip": { |
| 1521 | + "mode": "single", |
| 1522 | + "sort": "none" |
| 1523 | + } |
| 1524 | + }, |
| 1525 | + "targets": [ |
| 1526 | + { |
| 1527 | + "datasource": { |
| 1528 | + "type": "prometheus", |
| 1529 | + "uid": "${datasource}" |
| 1530 | + }, |
| 1531 | + "editorMode": "code", |
| 1532 | + "expr": "(kube_pod_container_status_restarts_total - kube_pod_container_status_restarts_total offset 10m) and ignoring (reason) min_over_time(kube_pod_container_status_last_terminated_reason{reason=\"Error\"}[10m]) == 1", |
| 1533 | + "instant": false, |
| 1534 | + "legendFormat": "{{pod}}", |
| 1535 | + "range": true, |
| 1536 | + "refId": "A" |
| 1537 | + } |
| 1538 | + ], |
| 1539 | + "title": "Error events", |
| 1540 | + "type": "timeseries" |
1420 | 1541 | } |
1421 | 1542 | ], |
1422 | 1543 | "title": "Detailed infos", |
|
1445 | 1566 | "regex": "", |
1446 | 1567 | "skipUrlSync": false, |
1447 | 1568 | "type": "datasource" |
1448 | | - }, |
1449 | | - { |
1450 | | - "current": {}, |
1451 | | - "datasource": { |
1452 | | - "type": "prometheus", |
1453 | | - "uid": "${datasource}" |
1454 | | - }, |
1455 | | - "definition": "label_values({service=\"kube-prometheus-stack-kubelet\"},service)", |
1456 | | - "hide": 2, |
1457 | | - "includeAll": false, |
1458 | | - "multi": false, |
1459 | | - "name": "service", |
1460 | | - "options": [], |
1461 | | - "query": { |
1462 | | - "qryType": 1, |
1463 | | - "query": "label_values({service=\"kube-prometheus-stack-kubelet\"},service)", |
1464 | | - "refId": "PrometheusVariableQueryEditor-VariableQuery" |
1465 | | - }, |
1466 | | - "refresh": 2, |
1467 | | - "regex": "", |
1468 | | - "skipUrlSync": false, |
1469 | | - "sort": 1, |
1470 | | - "type": "query" |
1471 | 1569 | } |
1472 | 1570 | ] |
1473 | 1571 | }, |
|
0 commit comments