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. · 來源