diff --git a/assets/etcd/dashboards/etcd.json b/assets/etcd/dashboards/etcd.json index 0e99340..d8fea7e 100644 --- a/assets/etcd/dashboards/etcd.json +++ b/assets/etcd/dashboards/etcd.json @@ -125,7 +125,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(grpc_server_started_total{job=\"$cluster\",grpc_type=\"unary\"}[5m]))", + "expr": "sum(rate(grpc_server_started_total{job=\"$cluster\",grpc_type=\"unary\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "RPC Rate", @@ -134,7 +134,7 @@ "step": 2 }, { - "expr": "sum(rate(grpc_server_handled_total{job=\"$cluster\",grpc_type=\"unary\",grpc_code=~\"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded\"}[5m]))", + "expr": "sum(rate(grpc_server_handled_total{job=\"$cluster\",grpc_type=\"unary\",grpc_code=~\"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "RPC Failed Rate", @@ -381,7 +381,7 @@ "steppedLine": true, "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=\"$cluster\"}[$__rate_interval])) by (instance, le))", "hide": false, "intervalFactor": 2, "legendFormat": "{{instance}} WAL fsync", @@ -390,7 +390,7 @@ "step": 4 }, { - "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))", + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"$cluster\"}[$__rate_interval])) by (instance, le))", "intervalFactor": 2, "legendFormat": "{{instance}} DB fsync", "metric": "etcd_disk_backend_commit_duration_seconds_bucket", @@ -548,7 +548,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(etcd_network_client_grpc_received_bytes_total{job=\"$cluster\"}[5m])", + "expr": "rate(etcd_network_client_grpc_received_bytes_total{job=\"$cluster\"}[$__rate_interval])", "intervalFactor": 2, "legendFormat": "{{instance}} Client Traffic In", "metric": "etcd_network_client_grpc_received_bytes_total", @@ -624,7 +624,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=\"$cluster\"}[5m])", + "expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=\"$cluster\"}[$__rate_interval])", "intervalFactor": 2, "legendFormat": "{{instance}} Client Traffic Out", "metric": "etcd_network_client_grpc_sent_bytes_total", @@ -700,7 +700,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(etcd_network_peer_received_bytes_total{job=\"$cluster\"}[5m])) by (instance)", + "expr": "sum(rate(etcd_network_peer_received_bytes_total{job=\"$cluster\"}[$__rate_interval])) by (instance)", "intervalFactor": 2, "legendFormat": "{{instance}} Peer Traffic In", "metric": "etcd_network_peer_received_bytes_total", @@ -777,7 +777,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=\"$cluster\"}[5m])) by (instance)", + "expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=\"$cluster\"}[$__rate_interval])) by (instance)", "hide": false, "interval": "", "intervalFactor": 2, @@ -861,7 +861,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(etcd_server_proposals_failed_total{job=\"$cluster\"}[5m]))", + "expr": "sum(rate(etcd_server_proposals_failed_total{job=\"$cluster\"}[$__rate_interval]))", "intervalFactor": 2, "legendFormat": "Proposal Failure Rate", "metric": "etcd_server_proposals_failed_total", @@ -877,7 +877,7 @@ "step": 2 }, { - "expr": "sum(rate(etcd_server_proposals_committed_total{job=\"$cluster\"}[5m]))", + "expr": "sum(rate(etcd_server_proposals_committed_total{job=\"$cluster\"}[$__rate_interval]))", "intervalFactor": 2, "legendFormat": "Proposal Commit Rate", "metric": "etcd_server_proposals_committed_total", @@ -885,7 +885,7 @@ "step": 2 }, { - "expr": "sum(rate(etcd_server_proposals_applied_total{job=\"$cluster\"}[5m]))", + "expr": "sum(rate(etcd_server_proposals_applied_total{job=\"$cluster\"}[$__rate_interval]))", "intervalFactor": 2, "legendFormat": "Proposal Apply Rate", "refId": "D", @@ -1062,7 +1062,7 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.99, sum by (instance, le) (rate(etcd_network_peer_round_trip_time_seconds_bucket{job=\"$cluster\"}[5m])))", + "expr": "histogram_quantile(0.99, sum by (instance, le) (rate(etcd_network_peer_round_trip_time_seconds_bucket{job=\"$cluster\"}[$__rate_interval])))", "interval": "", "intervalFactor": 2, "legendFormat": "{{instance}} Peer round trip time", diff --git a/assets/node-exporter/rules.yaml b/assets/node-exporter/rules.yaml index bf701bb..cd2ae84 100644 --- a/assets/node-exporter/rules.yaml +++ b/assets/node-exporter/rules.yaml @@ -20,16 +20,18 @@ groups: record: instance:node_load1_per_cpu:ratio - expr: | 1 - ( - node_memory_MemAvailable_bytes{job="node"} - or ( - node_memory_Buffers_bytes{job="node"} - + - node_memory_Cached_bytes{job="node"} - + - node_memory_MemFree_bytes{job="node"} - + - node_memory_Slab_bytes{job="node"} + node_memory_MemAvailable_bytes{job="node"} + or + ( + node_memory_Buffers_bytes{job="node"} + + + node_memory_Cached_bytes{job="node"} + + + node_memory_MemFree_bytes{job="node"} + + + node_memory_Slab_bytes{job="node"} + ) ) / node_memory_MemTotal_bytes{job="node"} diff --git a/site/content/node-exporter/_index.md b/site/content/node-exporter/_index.md index 623fae7..ac431e4 100644 --- a/site/content/node-exporter/_index.md +++ b/site/content/node-exporter/_index.md @@ -385,16 +385,18 @@ record: instance:node_load1_per_cpu:ratio {{< code lang="yaml" >}} expr: | 1 - ( - node_memory_MemAvailable_bytes{job="node"} - or ( - node_memory_Buffers_bytes{job="node"} - + - node_memory_Cached_bytes{job="node"} - + - node_memory_MemFree_bytes{job="node"} - + - node_memory_Slab_bytes{job="node"} + node_memory_MemAvailable_bytes{job="node"} + or + ( + node_memory_Buffers_bytes{job="node"} + + + node_memory_Cached_bytes{job="node"} + + + node_memory_MemFree_bytes{job="node"} + + + node_memory_Slab_bytes{job="node"} + ) ) / node_memory_MemTotal_bytes{job="node"}