Documentation
¶
Index ¶
- func CollectHostBackup() *payload.HostBackup
- func CollectHostDisk() (*payload.HostDisk, string)
- func CollectHostNetwork() (*payload.HostNetwork, string)
- func CollectHostPath() *payload.HostPath
- func CollectHostProcess() *payload.HostProcess
- func CollectHostRuntimes() *payload.HostRuntimes
- func CollectHostSSH() (*payload.HostSSH, string)
- func CollectHostSuid() *payload.HostSuid
- func CollectHostTime() *payload.HostTime
- func CollectHostUsersSummary() (*payload.HostUsersSummary, string)
- func CollectListeners(hn *payload.HostNetwork) []payload.Listener
- func CollectOSInfo() (payload.OSInfo, string)
- func CollectPackagesUpdates() (*payload.PackagesUpdates, string)
- func CollectServices() ([]payload.ServiceEntry, string)
- func RedactCmdline(s string) string
- func Stub(machineUUID string, scanSeq int) payload.V1
- func StubWithObserver(machineUUID string, scanSeq int, observe ActionEventObserver) payload.V1
- type ActionEvent
- type ActionEventObserver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectHostBackup ¶
func CollectHostBackup() *payload.HostBackup
CollectHostBackup detects known backup systems and periodic backup cron hints. backup_status is "on" when tools/cron indicate backups likely exist, otherwise "unknown".
func CollectHostDisk ¶
CollectHostDisk reports mount usage via gopsutil disk.Partitions(false) + disk.Usage. The second return is non-empty when host disk usage could not be collected (error message for ingest).
func CollectHostNetwork ¶
func CollectHostNetwork() (*payload.HostNetwork, string)
CollectHostNetwork summarizes interfaces and public-IP hints via gopsutil net.Interfaces.
func CollectHostPath ¶
CollectHostPath enumerates PATH directories with exists and world-writable flags (skips dirs under /home).
func CollectHostProcess ¶
func CollectHostProcess() *payload.HostProcess
CollectHostProcess builds top CPU/RSS merge and interpreter / heuristic signals (M1).
func CollectHostRuntimes ¶
func CollectHostRuntimes() *payload.HostRuntimes
CollectHostRuntimes probes common interpreters on PATH (capped, M1).
func CollectHostSSH ¶
CollectHostSSH reads effective sshd settings from `sshd -T`.
func CollectHostSuid ¶
CollectHostSuid lists setuid binaries under common roots (bounded). Implemented with filepath.WalkDir (no external find): gopsutil does not expose filesystem setuid enumeration.
func CollectHostTime ¶
CollectHostTime sets utc_now, tries an SNTP query for offset_ms, and detects a running timesync daemon.
func CollectHostUsersSummary ¶
func CollectHostUsersSummary() (*payload.HostUsersSummary, string)
CollectHostUsersSummary parses /etc/passwd for counts and a capped sample (no password material).
func CollectListeners ¶
func CollectListeners(hn *payload.HostNetwork) []payload.Listener
CollectListeners lists TCP listeners via gopsutil net.Connections (same idea as psutil net_connections).
func CollectOSInfo ¶
CollectOSInfo sends pretty/kernel, raw /etc/os-release fields, and gopsutil host.Info. The API derives distro_id / distro_version_id / distro_name for EOL (see backend src/ingest/os_normalize). The second return is the host name from host.Info (for dashboard titles), or "" if unavailable.
func CollectPackagesUpdates ¶
func CollectPackagesUpdates() (*payload.PackagesUpdates, string)
CollectPackagesUpdates fills pending/security counts and a capped list of security-only package names. Prefers apt (Debian/Ubuntu), then dnf, then yum (RHEL family). The second return is a non-empty message when no package manager is available.
func CollectServices ¶
func CollectServices() ([]payload.ServiceEntry, string)
CollectServices lists running services: systemd (D-Bus) when pid 1 is systemd, otherwise sysvinit (Debian/Ubuntu-style `service --status-all` parsing). The second return is non-empty when service inventory could not be collected.
func RedactCmdline ¶
RedactCmdline removes home-directory path segments from a command line for ingest.
func StubWithObserver ¶
func StubWithObserver(machineUUID string, scanSeq int, observe ActionEventObserver) payload.V1
StubWithObserver builds a v1 payload and calls observe before each data collection action.
Types ¶
type ActionEventObserver ¶
type ActionEventObserver func(event ActionEvent)