Documentation ¶
Overview ¶
Package os queries the host OS information (e.g., kernel version).
Index ¶
- Constants
- Variables
- func CreateGet(cfg Config) func(ctx context.Context) (_ any, e error)
- func New(ctx context.Context, cfg Config) components.Component
- func ParseStateProcessCountZombieProcesses(m map[string]string) (int, error)
- func ParseStateSystemManufacturer(m map[string]string) (string, error)
- func ParseStateVirtualizationEnvironment(m map[string]string) (pkg_host.VirtualizationEnvironment, error)
- type Config
- type Host
- type Kernel
- type MachineMetadata
- type Output
- type Platform
- type Uptimes
Constants ¶
View Source
const ( StateNameVirtualizationEnvironment = "virtualization_environment" StateKeyVirtualizationEnvironmentType = "type" StateKeyVirtualizationEnvironmentVM = "vm" StateKeyVirtualizationEnvironmentContainer = "container" StateKeyVirtualizationEnvironmentIsKVM = "is_kvm" StateNameSystemManufacturer = "system_manufacturer" StateKeySystemManufacturer = "system_manufacturer" StateNameMachineMetadata = "machine_metadata" StateKeyMachineMetadataBootID = "boot_id" StateKeyMachineMetadataDmidecodeUUID = "dmidecode_uuid" StateKeyMachineMetadataOSMachineID = "os_machine_id" StateNameHost = "host" StateKeyHostID = "id" StateNameKernel = "kernel" StateKeyKernelArch = "arch" StateKeyKernelVersion = "version" StateNamePlatform = "platform" StateKeyPlatformName = "name" StateKeyPlatformFamily = "family" StateKeyPlatformVersion = "version" StateNameUptimes = "uptimes" StateKeyUptimesSeconds = "uptime_seconds" StateKeyUptimesHumanized = "uptime_humanized" StateKeyUptimesBootTimeUnixSeconds = "boot_time_unix_seconds" StateKeyUptimesBootTimeHumanized = "boot_time_humanized" StateNameProcessCountsByStatus = "process_counts_by_status" StateKeyProcessCountZombieProcesses = "process_count_zombie_processes" )
Variables ¶
View Source
var DefaultZombieProcessCountThreshold = 1000
Functions ¶
func ParseStateProcessCountZombieProcesses ¶ added in v0.1.5
func ParseStateSystemManufacturer ¶ added in v0.3.5
func ParseStateVirtualizationEnvironment ¶ added in v0.3.5
func ParseStateVirtualizationEnvironment(m map[string]string) (pkg_host.VirtualizationEnvironment, error)
Types ¶
type Config ¶
type Config struct {
Query query_config.Config `json:"query"`
}
type MachineMetadata ¶ added in v0.3.5
type MachineMetadata struct { BootID string `json:"boot_id"` DmidecodeUUID string `json:"dmidecode_uuid"` OSMachineID string `json:"os_machine_id"` }
func ParseStateMachineMetadata ¶ added in v0.3.5
func ParseStateMachineMetadata(m map[string]string) (MachineMetadata, error)
type Output ¶
type Output struct { VirtualizationEnvironment pkg_host.VirtualizationEnvironment `json:"virtualization_environment"` SystemManufacturer string `json:"system_manufacturer"` MachineMetadata MachineMetadata `json:"machine_metadata"` MachineRebooted bool `json:"machine_rebooted"` Host Host `json:"host"` Kernel Kernel `json:"kernel"` Platform Platform `json:"platform"` Uptimes Uptimes `json:"uptimes"` ProcessCountZombieProcesses int `json:"process_count_zombie_processes"` }
func ParseOutputJSON ¶
func ParseStatesToOutput ¶
func ParseStatesToOutput(states ...components.State) (*Output, error)
type Platform ¶
Click to show internal directories.
Click to hide internal directories.