prometheus-operator: Fix node exporter formatting

This commit is contained in:
Lauri Võsandi 2022-09-12 07:44:06 +03:00
parent b5b5cd038e
commit 7ae75f2f1c

View File

@ -1,3 +1,4 @@
---
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: Probe kind: Probe
metadata: metadata:
@ -11,16 +12,16 @@ spec:
- pve8.proxmox.infra.k-space.ee:9100 - pve8.proxmox.infra.k-space.ee:9100
- pve9.proxmox.infra.k-space.ee:9100 - pve9.proxmox.infra.k-space.ee:9100
relabelingConfigs: relabelingConfigs:
- sourceLabels: [__param_target] - sourceLabels: [__param_target]
targetLabel: instance targetLabel: instance
- sourceLabels: [__param_target] - sourceLabels: [__param_target]
targetLabel: __address__ targetLabel: __address__
prober: prober:
url: localhost url: localhost
path: /metrics path: /metrics
metricRelabelings: metricRelabelings:
- sourceLabels: [__address__] - sourceLabels: [__address__]
targetLabel: target targetLabel: target
--- ---
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: Probe kind: Probe
@ -30,19 +31,19 @@ spec:
targets: targets:
staticConfig: staticConfig:
static: static:
- sprucecone.infra.k-space.ee:9100 - sprucecone.infra.k-space.ee:9100
- cedarcone.infra.k-space.ee:9100 - cedarcone.infra.k-space.ee:9100
relabelingConfigs: relabelingConfigs:
- sourceLabels: [__param_target] - sourceLabels: [__param_target]
targetLabel: instance targetLabel: instance
- sourceLabels: [__param_target] - sourceLabels: [__param_target]
targetLabel: __address__ targetLabel: __address__
prober: prober:
url: localhost url: localhost
path: /metrics path: /metrics
metricRelabelings: metricRelabelings:
- sourceLabels: [__address__] - sourceLabels: [__address__]
targetLabel: target targetLabel: target
--- ---
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule kind: PrometheusRule
@ -50,263 +51,263 @@ metadata:
name: node-exporter name: node-exporter
spec: spec:
groups: groups:
- name: node-exporter - name: node-exporter
rules: rules:
- alert: ZfsOfflinePool - alert: ZfsOfflinePool
expr: node_zfs_zpool_state{state!="online"} > 0 expr: node_zfs_zpool_state{state!="online"} > 0
for: 1m for: 1m
labels: labels:
severity: critical severity: critical
annotations: annotations:
summary: ZFS offline pool (instance {{ $labels.instance }}) summary: ZFS offline pool (instance {{ $labels.instance }})
description: "A ZFS zpool is in a unexpected state: {{ $labels.state }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" description: "A ZFS zpool is in a unexpected state: {{ $labels.state }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: HostHighLoad - alert: HostHighLoad
expr: sum(node_load1{}) by (instance) / count(node_cpu_seconds_total{mode="user"}) by (instance) > 2.5 expr: sum(node_load1{}) by (instance) / count(node_cpu_seconds_total{mode="user"}) by (instance) > 2.5
for: 15m for: 15m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host under high load summary: Host under high load
description: Many processes are queued up for execution description: Many processes are queued up for execution
- alert: HostOutOfMemory - alert: HostOutOfMemory
expr: (node_memory_Cached_bytes + node_memory_Buffers_bytes + node_memory_MemFree_bytes ) / node_memory_MemTotal_bytes * 100 < 20 expr: (node_memory_Cached_bytes + node_memory_Buffers_bytes + node_memory_MemFree_bytes ) / node_memory_MemTotal_bytes * 100 < 20
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host out of memory (instance {{ $labels.instance }}) summary: Host out of memory (instance {{ $labels.instance }})
description: Node memory is filling up (< 10% left) description: Node memory is filling up (< 10% left)
- alert: HostMemoryUnderMemoryPressure - alert: HostMemoryUnderMemoryPressure
expr: rate(node_vmstat_pgmajfault[1m]) > 1000 expr: rate(node_vmstat_pgmajfault[1m]) > 1000
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host memory under memory pressure (instance {{ $labels.instance }}) summary: Host memory under memory pressure (instance {{ $labels.instance }})
description: The node is under heavy memory pressure. High rate of major page faults description: The node is under heavy memory pressure. High rate of major page faults
- alert: HostUnusualNetworkThroughputIn - alert: HostUnusualNetworkThroughputIn
expr: sum by (instance) (rate(node_network_receive_bytes_total[2m])) > 160e+06 expr: sum by (instance) (rate(node_network_receive_bytes_total[2m])) > 160e+06
for: 1h for: 1h
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host unusual network throughput in (instance {{ $labels.instance }}) summary: Host unusual network throughput in (instance {{ $labels.instance }})
description: Host network interfaces are probably receiving too much data (> 160 MB/s) description: Host network interfaces are probably receiving too much data (> 160 MB/s)
- alert: HostUnusualNetworkThroughputOut - alert: HostUnusualNetworkThroughputOut
expr: sum by (instance) (rate(node_network_transmit_bytes_total[2m])) > 160e+06 expr: sum by (instance) (rate(node_network_transmit_bytes_total[2m])) > 160e+06
for: 1h for: 1h
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host unusual network throughput out (instance {{ $labels.instance }}) summary: Host unusual network throughput out (instance {{ $labels.instance }})
description: Host network interfaces are probably sending too much data (> 160 MB/s) description: Host network interfaces are probably sending too much data (> 160 MB/s)
- alert: HostUnusualDiskReadRate - alert: HostUnusualDiskReadRate
expr: sum by (instance) (rate(node_disk_read_bytes_total[2m])) > 50000000 expr: sum by (instance) (rate(node_disk_read_bytes_total[2m])) > 50000000
for: 1h for: 1h
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host unusual disk read rate (instance {{ $labels.instance }}) summary: Host unusual disk read rate (instance {{ $labels.instance }})
description: Disk is probably reading too much data (> 50 MB/s) description: Disk is probably reading too much data (> 50 MB/s)
- alert: HostUnusualDiskWriteRate - alert: HostUnusualDiskWriteRate
expr: sum by (instance) (rate(node_disk_written_bytes_total[2m])) > 50000000 expr: sum by (instance) (rate(node_disk_written_bytes_total[2m])) > 50000000
for: 1h for: 1h
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host unusual disk write rate (instance {{ $labels.instance }}) summary: Host unusual disk write rate (instance {{ $labels.instance }})
description: Disk is probably writing too much data (> 50 MB/s) description: Disk is probably writing too much data (> 50 MB/s)
# Please add ignored mountpoints in node_exporter parameters like # Please add ignored mountpoints in node_exporter parameters like
# "--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|run)($|/)". # "--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|run)($|/)".
# Same rule using "node_filesystem_free_bytes" will fire when disk fills for non-root users. # Same rule using "node_filesystem_free_bytes" will fire when disk fills for non-root users.
- alert: HostOutOfDiskSpace - alert: HostOutOfDiskSpace
expr: (node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 10 and ON (instance, device, mountpoint) node_filesystem_readonly == 0 expr: (node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 10 and ON (instance, device, mountpoint) node_filesystem_readonly == 0
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host out of disk space (instance {{ $labels.instance }}) summary: Host out of disk space (instance {{ $labels.instance }})
description: Disk is almost full (< 10% left) description: Disk is almost full (< 10% left)
# Please add ignored mountpoints in node_exporter parameters like # Please add ignored mountpoints in node_exporter parameters like
# "--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|run)($|/)". # "--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|run)($|/)".
# Same rule using "node_filesystem_free_bytes" will fire when disk fills for non-root users. # Same rule using "node_filesystem_free_bytes" will fire when disk fills for non-root users.
- alert: HostDiskWillFillIn24Hours - alert: HostDiskWillFillIn24Hours
expr: (node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 10 and ON (instance, device, mountpoint) predict_linear(node_filesystem_avail_bytes{fstype!~"tmpfs"}[1h], 24 * 3600) < 0 and ON (instance, device, mountpoint) node_filesystem_readonly == 0 expr: (node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 10 and ON (instance, device, mountpoint) predict_linear(node_filesystem_avail_bytes{fstype!~"tmpfs"}[1h], 24 * 3600) < 0 and ON (instance, device, mountpoint) node_filesystem_readonly == 0
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host disk will fill in 24 hours (instance {{ $labels.instance }}) summary: Host disk will fill in 24 hours (instance {{ $labels.instance }})
description: Filesystem is predicted to run out of space within the next 24 hours at current write rate description: Filesystem is predicted to run out of space within the next 24 hours at current write rate
- alert: HostOutOfInodes - alert: HostOutOfInodes
expr: node_filesystem_files_free{mountpoint ="/rootfs"} / node_filesystem_files{mountpoint="/rootfs"} * 100 < 10 and ON (instance, device, mountpoint) node_filesystem_readonly{mountpoint="/rootfs"} == 0 expr: node_filesystem_files_free{mountpoint ="/rootfs"} / node_filesystem_files{mountpoint="/rootfs"} * 100 < 10 and ON (instance, device, mountpoint) node_filesystem_readonly{mountpoint="/rootfs"} == 0
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host out of inodes (instance {{ $labels.instance }}) summary: Host out of inodes (instance {{ $labels.instance }})
description: Disk is almost running out of available inodes (< 10% left) description: Disk is almost running out of available inodes (< 10% left)
- alert: HostInodesWillFillIn24Hours - alert: HostInodesWillFillIn24Hours
expr: node_filesystem_files_free{mountpoint ="/rootfs"} / node_filesystem_files{mountpoint="/rootfs"} * 100 < 10 and predict_linear(node_filesystem_files_free{mountpoint="/rootfs"}[1h], 24 * 3600) < 0 and ON (instance, device, mountpoint) node_filesystem_readonly{mountpoint="/rootfs"} == 0 expr: node_filesystem_files_free{mountpoint ="/rootfs"} / node_filesystem_files{mountpoint="/rootfs"} * 100 < 10 and predict_linear(node_filesystem_files_free{mountpoint="/rootfs"}[1h], 24 * 3600) < 0 and ON (instance, device, mountpoint) node_filesystem_readonly{mountpoint="/rootfs"} == 0
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host inodes will fill in 24 hours (instance {{ $labels.instance }}) summary: Host inodes will fill in 24 hours (instance {{ $labels.instance }})
description: Filesystem is predicted to run out of inodes within the next 24 hours at current write rate description: Filesystem is predicted to run out of inodes within the next 24 hours at current write rate
- alert: HostUnusualDiskReadLatency - alert: HostUnusualDiskReadLatency
expr: rate(node_disk_read_time_seconds_total[1m]) / rate(node_disk_reads_completed_total[1m]) > 0.1 and rate(node_disk_reads_completed_total[1m]) > 0 expr: rate(node_disk_read_time_seconds_total[1m]) / rate(node_disk_reads_completed_total[1m]) > 0.1 and rate(node_disk_reads_completed_total[1m]) > 0
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host unusual disk read latency (instance {{ $labels.instance }}) summary: Host unusual disk read latency (instance {{ $labels.instance }})
description: Disk latency is growing (read operations > 100ms) description: Disk latency is growing (read operations > 100ms)
- alert: HostUnusualDiskWriteLatency - alert: HostUnusualDiskWriteLatency
expr: rate(node_disk_write_time_seconds_total[1m]) / rate(node_disk_writes_completed_total[1m]) > 0.1 and rate(node_disk_writes_completed_total[1m]) > 0 expr: rate(node_disk_write_time_seconds_total[1m]) / rate(node_disk_writes_completed_total[1m]) > 0.1 and rate(node_disk_writes_completed_total[1m]) > 0
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host unusual disk write latency (instance {{ $labels.instance }}) summary: Host unusual disk write latency (instance {{ $labels.instance }})
description: Disk latency is growing (write operations > 100ms) description: Disk latency is growing (write operations > 100ms)
- alert: HostCpuStealNoisyNeighbor - alert: HostCpuStealNoisyNeighbor
expr: avg by(instance) (rate(node_cpu_seconds_total{mode="steal"}[5m])) * 100 > 10 expr: avg by(instance) (rate(node_cpu_seconds_total{mode="steal"}[5m])) * 100 > 10
for: 0m for: 0m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host CPU steal noisy neighbor (instance {{ $labels.instance }}) summary: Host CPU steal noisy neighbor (instance {{ $labels.instance }})
description: CPU steal is > 10%. A noisy neighbor is killing VM performances or a spot instance may be out of credit. description: CPU steal is > 10%. A noisy neighbor is killing VM performances or a spot instance may be out of credit.
# 1000 context switches is an arbitrary number. # 1000 context switches is an arbitrary number.
# Alert threshold depends on nature of application. # Alert threshold depends on nature of application.
# Please read: https://github.com/samber/awesome-prometheus-alerts/issues/58 # Please read: https://github.com/samber/awesome-prometheus-alerts/issues/58
- alert: HostContextSwitching - alert: HostContextSwitching
expr: (rate(node_context_switches_total[5m])) / (count without(cpu, mode) (node_cpu_seconds_total{mode="idle"})) > 50000 expr: (rate(node_context_switches_total[5m])) / (count without(cpu, mode) (node_cpu_seconds_total{mode="idle"})) > 50000
for: 0m for: 0m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host context switching (instance {{ $labels.instance }}) summary: Host context switching (instance {{ $labels.instance }})
description: Context switching is growing on node (> 50000 / s) description: Context switching is growing on node (> 50000 / s)
- alert: HostSwapIsEnabled - alert: HostSwapIsEnabled
expr: node_memory_SwapTotal_bytes > 0 expr: node_memory_SwapTotal_bytes > 0
for: 0m for: 0m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Swap is discouraged nowadays summary: Swap is discouraged nowadays
- alert: HostPhysicalComponentTooHot - alert: HostPhysicalComponentTooHot
expr: node_hwmon_temp_celsius > 75 expr: node_hwmon_temp_celsius > 75
for: 5m for: 5m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host physical component too hot (instance {{ $labels.instance }}) summary: Host physical component too hot (instance {{ $labels.instance }})
description: Physical hardware component too hot description: Physical hardware component too hot
- alert: HostNodeOvertemperatureAlarm - alert: HostNodeOvertemperatureAlarm
expr: node_hwmon_temp_alarm == 1 expr: node_hwmon_temp_alarm == 1
for: 0m for: 0m
labels: labels:
severity: critical severity: critical
annotations: annotations:
summary: Host node overtemperature alarm (instance {{ $labels.instance }}) summary: Host node overtemperature alarm (instance {{ $labels.instance }})
description: Physical node temperature alarm triggered description: Physical node temperature alarm triggered
- alert: HostRaidArrayGotInactive - alert: HostRaidArrayGotInactive
expr: node_md_state{state="inactive"} > 0 expr: node_md_state{state="inactive"} > 0
for: 0m for: 0m
labels: labels:
severity: critical severity: critical
annotations: annotations:
summary: Host RAID array got inactive (instance {{ $labels.instance }}) summary: Host RAID array got inactive (instance {{ $labels.instance }})
description: RAID array {{ $labels.device }} is in degraded state due to one or more disks failures. Number of spare drives is insufficient to fix issue automatically. description: RAID array {{ $labels.device }} is in degraded state due to one or more disks failures. Number of spare drives is insufficient to fix issue automatically.
- alert: HostRaidDiskFailure - alert: HostRaidDiskFailure
expr: node_md_disks{state="failed"} > 0 expr: node_md_disks{state="failed"} > 0
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host RAID disk failure (instance {{ $labels.instance }}) summary: Host RAID disk failure (instance {{ $labels.instance }})
description: At least one device in RAID array on {{ $labels.instance }} failed. Array {{ $labels.md_device }} needs attention and possibly a disk swap description: At least one device in RAID array on {{ $labels.instance }} failed. Array {{ $labels.md_device }} needs attention and possibly a disk swap
- alert: HostOomKillDetected - alert: HostOomKillDetected
expr: increase(node_vmstat_oom_kill[1m]) > 0 expr: increase(node_vmstat_oom_kill[1m]) > 0
for: 0m for: 0m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host OOM kill detected (instance {{ $labels.instance }}) summary: Host OOM kill detected (instance {{ $labels.instance }})
description: OOM kill detected description: OOM kill detected
- alert: HostEdacCorrectableErrorsDetected - alert: HostEdacCorrectableErrorsDetected
expr: increase(node_edac_correctable_errors_total[1m]) > 0 expr: increase(node_edac_correctable_errors_total[1m]) > 0
for: 0m for: 0m
labels: labels:
severity: info severity: info
annotations: annotations:
summary: Host EDAC Correctable Errors detected (instance {{ $labels.instance }}) summary: Host EDAC Correctable Errors detected (instance {{ $labels.instance }})
description: {{ $labels.instance }} has had {{ printf "%.0f" $value }} correctable memory errors reported by EDAC in the last 5 minutes. description: "Host {{ $labels.instance }} has had {{ printf \"%.0f\" $value }} correctable memory errors reported by EDAC in the last 5 minutes.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: HostEdacUncorrectableErrorsDetected - alert: HostEdacUncorrectableErrorsDetected
expr: node_edac_uncorrectable_errors_total > 0 expr: node_edac_uncorrectable_errors_total > 0
for: 0m for: 0m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host EDAC Uncorrectable Errors detected (instance {{ $labels.instance }}) summary: Host EDAC Uncorrectable Errors detected (instance {{ $labels.instance }})
description: {{ $labels.instance }} has had {{ printf "%.0f" $value }} uncorrectable memory errors reported by EDAC in the last 5 minutes. description: "Host {{ $labels.instance }} has had {{ printf \"%.0f\" $value }} uncorrectable memory errors reported by EDAC in the last 5 minutes.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: HostNetworkReceiveErrors - alert: HostNetworkReceiveErrors
expr: rate(node_network_receive_errs_total[2m]) / rate(node_network_receive_packets_total[2m]) > 0.01 expr: rate(node_network_receive_errs_total[2m]) / rate(node_network_receive_packets_total[2m]) > 0.01
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host Network Receive Errors (instance {{ $labels.instance }}) summary: Host Network Receive Errors (instance {{ $labels.instance }})
description: {{ $labels.instance }} interface {{ $labels.device }} has encountered {{ printf "%.0f" $value }} receive errors in the last five minutes. description: "Host {{ $labels.instance }} interface {{ $labels.device }} has encountered {{ printf \"%.0f\" $value }} receive errors in the last two minutes.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: HostNetworkTransmitErrors - alert: HostNetworkTransmitErrors
expr: rate(node_network_transmit_errs_total[2m]) / rate(node_network_transmit_packets_total[2m]) > 0.01 expr: rate(node_network_transmit_errs_total[2m]) / rate(node_network_transmit_packets_total[2m]) > 0.01
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host Network Transmit Errors (instance {{ $labels.instance }}) summary: Host Network Transmit Errors (instance {{ $labels.instance }})
description: {{ $labels.instance }} interface {{ $labels.device }} has encountered {{ printf "%.0f" $value }} transmit errors in the last five minutes. description: "Host {{ $labels.instance }} interface {{ $labels.device }} has encountered {{ printf \"%.0f\" $value }} transmit errors in the last two minutes.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: HostNetworkInterfaceSaturated - alert: HostNetworkInterfaceSaturated
expr: (rate(node_network_receive_bytes_total{device!~"^tap.*"}[1m]) + rate(node_network_transmit_bytes_total{device!~"^tap.*"}[1m])) / node_network_speed_bytes{device!~"^tap.*"} > 0.8 expr: (rate(node_network_receive_bytes_total{device!~"^tap.*"}[1m]) + rate(node_network_transmit_bytes_total{device!~"^tap.*"}[1m])) / node_network_speed_bytes{device!~"^tap.*"} > 0.8
for: 1m for: 1m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host Network Interface Saturated (instance {{ $labels.instance }}) summary: Host Network Interface Saturated (instance {{ $labels.instance }})
description: The network interface "{{ $labels.interface }}" on "{{ $labels.instance }}" is getting overloaded. description: "The network interface {{ $labels.interface }} on {{ $labels.instance }} is getting overloaded."
- alert: HostNetworkBondDegraded - alert: HostNetworkBondDegraded
expr: node_bonding_active != node_bonding_slaves {master=~"bond.*"} expr: node_bonding_active != node_bonding_slaves {master=~"bond.*"}
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host Network Bond Degraded summary: Host Network Bond Degraded
- alert: HostConntrackLimit - alert: HostConntrackLimit
expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
for: 5m for: 5m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host conntrack limit (instance {{ $labels.instance }}) summary: Host conntrack limit (instance {{ $labels.instance }})
description: The number of conntrack is approching limit description: The number of conntrack is approching limit
- alert: HostClockSkew - alert: HostClockSkew
expr: (node_timex_offset_seconds > 0.05 and deriv(node_timex_offset_seconds[5m]) >= 0) or (node_timex_offset_seconds < -0.05 and deriv(node_timex_offset_seconds[5m]) <= 0) expr: (node_timex_offset_seconds > 0.05 and deriv(node_timex_offset_seconds[5m]) >= 0) or (node_timex_offset_seconds < -0.05 and deriv(node_timex_offset_seconds[5m]) <= 0)
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host clock skew (instance {{ $labels.instance }}) summary: Host clock skew (instance {{ $labels.instance }})
description: Clock skew detected. Clock is out of sync. description: Clock skew detected. Clock is out of sync.
- alert: HostClockNotSynchronising - alert: HostClockNotSynchronising
expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Host clock not synchronising (instance {{ $labels.instance }}) summary: Host clock not synchronising (instance {{ $labels.instance }})
description: Clock not synchronising. description: Clock not synchronising.
--- ---
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule kind: PrometheusRule
@ -316,14 +317,14 @@ spec:
groups: groups:
- name: smart - name: smart
rules: rules:
- alert: SmartSSDWriteRateTooHigh - alert: SmartSSDWriteRateTooHigh
expr: rate(smartmon_total_lbas_written_raw_value[72h]) * 512 > 10000000 expr: rate(smartmon_total_lbas_written_raw_value[72h]) * 512 > 10000000
for: 5m for: 5m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: SSD write rate exceeds 10MB/s summary: SSD write rate exceeds 10MB/s
description: At this rate the SSD will be worn out before warranty period expires description: At this rate the SSD will be worn out before warranty period expires
--- ---
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule kind: PrometheusRule
@ -333,27 +334,27 @@ spec:
groups: groups:
- name: temperatures - name: temperatures
rules: rules:
- alert: HighDiskTemperature - alert: HighDiskTemperature
expr: smartmon_airflow_temperature_cel_raw_value > 45 or smartmon_temperature_celsius_raw_value > 45 expr: smartmon_airflow_temperature_cel_raw_value > 45 or smartmon_temperature_celsius_raw_value > 45
for: 10m for: 10m
labels: labels:
severity: critical severity: critical
annotations: annotations:
summary: High HDD/SSD temperature indicates high ambient temperature summary: High HDD/SSD temperature indicates high ambient temperature
- alert: HighChipsetTemperature - alert: HighChipsetTemperature
expr: node_hwmon_temp_celsius > 65 expr: node_hwmon_temp_celsius > 65
for: 10m for: 10m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: High chipset (CPU, NB) temperature indicates insufficient or failing fans summary: High chipset (CPU, NB) temperature indicates insufficient or failing fans
- alert: LowDiskTemperature - alert: LowDiskTemperature
expr: smartmon_airflow_temperature_cel_raw_value < 10 or smartmon_temperature_celsius_raw_value < 10 expr: smartmon_airflow_temperature_cel_raw_value < 10 or smartmon_temperature_celsius_raw_value < 10
for: 10m for: 10m
labels: labels:
severity: critical severity: critical
annotations: annotations:
summary: Low HDD/SSD temperature indicates low ambient temperature and stuck server room exhaust fan relay summary: Low HDD/SSD temperature indicates low ambient temperature and stuck server room exhaust fan relay
--- ---
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
kind: PodMonitor kind: PodMonitor
@ -392,40 +393,40 @@ spec:
app: node-exporter app: node-exporter
spec: spec:
containers: containers:
- name: node-exporter - name: node-exporter
args: args:
- --web.listen-address=0.0.0.0:9101 - --web.listen-address=0.0.0.0:9101
- --path.sysfs=/host/sys - --path.sysfs=/host/sys
- --path.rootfs=/host/root - --path.rootfs=/host/root
- --no-collector.wifi - --no-collector.wifi
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/) - --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
- --collector.netclass.ignored-devices=^(veth.*|[a-f0-9]{15})$ - --collector.netclass.ignored-devices=^(veth.*|[a-f0-9]{15})$
- --collector.netdev.device-exclude=^(veth.*|[a-f0-9]{15})$ - --collector.netdev.device-exclude=^(veth.*|[a-f0-9]{15})$
image: prom/node-exporter:v1.3.1 image: prom/node-exporter:v1.3.1
resources: resources:
limits: limits:
cpu: 50m cpu: 50m
memory: 180Mi memory: 180Mi
requests: requests:
cpu: 5m cpu: 5m
memory: 20Mi memory: 20Mi
volumeMounts: volumeMounts:
- mountPath: /host/sys - mountPath: /host/sys
mountPropagation: HostToContainer mountPropagation: HostToContainer
name: sys name: sys
readOnly: true readOnly: true
- mountPath: /host/root - mountPath: /host/root
mountPropagation: HostToContainer mountPropagation: HostToContainer
name: root name: root
readOnly: true readOnly: true
ports: ports:
- containerPort: 9101 - containerPort: 9101
name: web name: web
securityContext: securityContext:
runAsGroup: 65532 runAsGroup: 65532
runAsNonRoot: true runAsNonRoot: true
runAsUser: 65532 runAsUser: 65532
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
hostNetwork: true hostNetwork: true
hostPID: true hostPID: true
securityContext: securityContext:
@ -433,11 +434,11 @@ spec:
runAsUser: 65534 runAsUser: 65534
serviceAccountName: node-exporter serviceAccountName: node-exporter
tolerations: tolerations:
- operator: Exists - operator: Exists
volumes: volumes:
- hostPath: - hostPath:
path: /sys path: /sys
name: sys name: sys
- hostPath: - hostPath:
path: / path: /
name: root name: root