Linux 检查
linux 模块有 8 项检查。通过 SSH 检查 Linux 和 macOS 主机(POSIX shell,只读)。输出为 JSON,在可用时使用 shell 或 python3 生成。
本页在构建文档时根据产品的检查目录生成,因此规则、间隔和默认严重性始终与你正在阅读的版本一致。阈值是默认值;实体和资源可以覆盖这些阈值。
| 检查 | 间隔 | 默认严重性 | 规则 |
|---|---|---|---|
linux.load_cpuLoad average and CPU | 60s | warning | warning > 80 percent · 15m / critical > 90 percent · 5m |
linux.memoryMemory available | 60s | warning | warning < 10 percent · 10m / critical < 5 percent · 5m |
linux.disk_freeFilesystem free space | 300s | warning | warning < 15 percent / critical < 10 percent |
linux.servicessystemd units active | 60s | critical | active = active |
linux.updates_pendingPending package updates (check only) | 21600s | warning | warning >= 1 count / critical >= 1 count |
linux.reboot_requiredReboot required (new kernel) | 3600s | warning | reboot_required = false |
linux.auth_eventsAuthentication and privilege events | 120s | warning | warning >= 10 count / critical >= 50 count |
linux.hardeningHardening posture (sshd, SELinux, firewall, open ports) | 3600s | warning | permit_root_login = no, password_auth = no, selinux = Enforcing |
检查
linux.load_cpu
Load average and CPU
- 度量
cpu_percent(percent) · 每60s·ssh- 规则
warning > 80 percent · 15m / critical > 90 percent · 5m· 默认严重性: warning- 措施
- —
- 基线
- Load1 > cpu_count for 15 min is an additional derived rule in the normalizer.
linux.memory
Memory available
- 度量
available_percent(percent) · 每60s·ssh- 规则
warning < 10 percent · 10m / critical < 5 percent · 5m· 默认严重性: warning- 措施
- —
linux.disk_free
Filesystem free space
- 度量
free_percent(percent) · 每300s·ssh- 规则
warning < 15 percent / critical < 10 percent· 默认严重性: warning- 措施
- —
linux.services
systemd units active
- 度量
unit_state· 每60s·ssh- 规则
active = active· 默认严重性: critical- 措施
- —
- 基线
- Unit list comes from resource attributes.
linux.updates_pending
Pending package updates (check only)
- 度量
security_updates(count) · 每21600s·ssh- 规则
warning >= 1 count / critical >= 1 count· 默认严重性: warning- 措施
- —
- 基线
- Critical when security advisories are pending; bugfix-only is a warning. The platform never installs.
linux.reboot_required
Reboot required (new kernel)
- 度量
reboot_required· 每3600s·ssh- 规则
reboot_required = false· 默认严重性: warning- 措施
- —
linux.auth_events
Authentication and privilege events
- 度量
ssh_failed(count) · 每120s·ssh- 规则
warning >= 10 count / critical >= 50 count· 默认严重性: warning- 措施
- —
- 基线
- users_created >= 1 and sudo spikes raise their own events in the normalizer.
linux.hardening
Hardening posture (sshd, SELinux, firewall, open ports)
- 度量
hardening· 每3600s·ssh- 规则
permit_root_login = no, password_auth = no, selinux = Enforcing· 默认严重性: warning- 措施
- —
- 基线
- Root login and password auth off, SELinux enforcing, firewalld on; listening ports compared with the resource's allowed list. · 来源