cozystack/packages/system/monitoring-agents/alerts/node-exporter.rules.yaml
klinch0 3c27a1e9bf
add metrics agents (#461)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced new HelmRelease configurations for cert-manager, monitoring
agents, and Victoria Metrics Operator in Kubernetes.
- Added resource specifications for `vmselect` in the VMCluster
configuration.
- Enhanced resource management for `vmselect` with defined limits and
requests for memory and CPU.

- **Bug Fixes**
	- Adjusted resource limits for Redis failover memory allocation.

- **Documentation**
- Updated README and release notes for various components, enhancing
clarity and usability.

- **Chores**
- Updated image versions across multiple components for consistency and
performance improvements.
- Modified migration scripts to facilitate transitions and manage
resources effectively.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Andrei Kvapil <kvapss@gmail.com>
2024-11-04 19:01:33 +01:00

93 lines
3.1 KiB
YAML

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMRule
metadata:
name: alerts-node-exporter.rules
spec:
groups:
- name: node-exporter.rules
params: {}
rules:
- annotations: {}
expr: |-
count without (cpu, mode) (
node_cpu_seconds_total{job="node-exporter",mode="idle"}
)
labels: {}
record: instance:node_num_cpu:sum
- annotations: {}
expr: |-
1 - avg without (cpu) (
sum without (mode) (rate(node_cpu_seconds_total{job="node-exporter", mode=~"idle|iowait|steal"}[5m]))
)
labels: {}
record: instance:node_cpu_utilisation:rate5m
- annotations: {}
expr: |-
(
node_load1{job="node-exporter"}
/
instance:node_num_cpu:sum{job="node-exporter"}
)
labels: {}
record: instance:node_load1_per_cpu:ratio
- annotations: {}
expr: |-
1 - (
(
node_memory_MemAvailable_bytes{job="node-exporter"}
or
(
node_memory_Buffers_bytes{job="node-exporter"}
+
node_memory_Cached_bytes{job="node-exporter"}
+
node_memory_MemFree_bytes{job="node-exporter"}
+
node_memory_Slab_bytes{job="node-exporter"}
)
)
/
node_memory_MemTotal_bytes{job="node-exporter"}
)
labels: {}
record: instance:node_memory_utilisation:ratio
- annotations: {}
expr: rate(node_vmstat_pgmajfault{job="node-exporter"}[5m])
labels: {}
record: instance:node_vmstat_pgmajfault:rate5m
- annotations: {}
expr: rate(node_disk_io_time_seconds_total{job="node-exporter", device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)"}[5m])
labels: {}
record: instance_device:node_disk_io_time_seconds:rate5m
- annotations: {}
expr: rate(node_disk_io_time_weighted_seconds_total{job="node-exporter", device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)"}[5m])
labels: {}
record: instance_device:node_disk_io_time_weighted_seconds:rate5m
- annotations: {}
expr: |-
sum without (device) (
rate(node_network_receive_bytes_total{job="node-exporter", device!="lo"}[5m])
)
labels: {}
record: instance:node_network_receive_bytes_excluding_lo:rate5m
- annotations: {}
expr: |-
sum without (device) (
rate(node_network_transmit_bytes_total{job="node-exporter", device!="lo"}[5m])
)
labels: {}
record: instance:node_network_transmit_bytes_excluding_lo:rate5m
- annotations: {}
expr: |-
sum without (device) (
rate(node_network_receive_drop_total{job="node-exporter", device!="lo"}[5m])
)
labels: {}
record: instance:node_network_receive_drop_excluding_lo:rate5m
- annotations: {}
expr: |-
sum without (device) (
rate(node_network_transmit_drop_total{job="node-exporter", device!="lo"}[5m])
)
labels: {}
record: instance:node_network_transmit_drop_excluding_lo:rate5m