82db9b41b2
Hosts have no ECC RAM, so failing memory raises no EDAC/MCE signal; it only shows up as scattered log lines (kernel segfaults/GPFs, ceph checksum and rocksdb key-order errors). Recording a per-host count of these symptoms makes bad RAM visible in VictoriaMetrics. - add vmalert `logs` in logging, querying VictoriaLogs and writing to vminsert-main - add VMRule recording `host:corruption_log_events:count` by host from LogsQL - select vlogs rules by the `vmalert.unkin.net/datasource` label and exclude them from vmalert `main` Reviewed-on: #596 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
22 lines
688 B
YAML
22 lines
688 B
YAML
---
|
|
apiVersion: operator.victoriametrics.com/v1beta1
|
|
kind: VMRule
|
|
metadata:
|
|
name: corruption
|
|
namespace: logging
|
|
labels:
|
|
vmalert.unkin.net/datasource: vlogs
|
|
spec:
|
|
groups:
|
|
- name: corruption
|
|
type: vlogs
|
|
interval: 1m
|
|
rules:
|
|
# Hosts lack ECC, so log symptoms are the only signal of bad RAM.
|
|
- record: host:corruption_log_events:count
|
|
expr: |
|
|
("segfault at" or "general protection fault" or "_verify_csum bad" or "block checksum mismatch" or "out-of-order keys")
|
|
| rename _HOSTNAME as host
|
|
| format if (host:"") "<kubernetes.pod_node_name>" as host
|
|
| stats by (host) count() as events
|