gohai

package module
v0.55.1-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 10 Imported by: 0

README

Gohai

license

Gohai is a tool which collects an inventory of system information. It aims to implement some parts of features from facter and ohai. It's forked from Kentaro Kuribayashi's verity.

Updating CPU Information

Some information about CPUs is drawn from the source of the util-linux utility lscpu. To update this information, such as when new processors are released, run

python cpu/from-lscpu-arm.py /path/to/lscpu-arm.c > cpu/lscpu_linux_arm64.go

See Also

Author

License

Documentation

Overview

Package gohai encapsulate all the metadata collected by it's subpackage into a single payload ready to be ingested by the backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPayloadAsString added in v0.50.0

func GetPayloadAsString(IsContainerized bool) (string, error)

GetPayloadAsString marshals the gohai struct twice (to a string). This allows the gohai payload to be embedded as a string in a JSON. This is required to mimic the metadata format inherited from Agent v5.

Types

type Payload

type Payload struct {
	Gohai *gohai `json:"gohai"`
}

Payload handles the JSON unmarshalling of the metadata payload

func GetPayload

func GetPayload(isContainerized bool) *Payload

GetPayload builds a payload of every metadata collected with gohai except processes metadata.

func GetPayloadWithProcesses added in v0.50.0

func GetPayloadWithProcesses(isContainerized bool) *Payload

GetPayloadWithProcesses builds a pyaload of all metdata including processes

Directories

Path Synopsis
Package cpu regroups collecting information about the CPU
Package cpu regroups collecting information about the CPU
Package filesystem returns information about available filesystems.
Package filesystem returns information about available filesystems.
Package memory regroups collecting information about the memory
Package memory regroups collecting information about the memory
Package network regroups collecting information about the network interfaces
Package network regroups collecting information about the network interfaces
Package platform regroups collecting information about the platform
Package platform regroups collecting information about the platform
Package processes regroups collecting information about running processes.
Package processes regroups collecting information about running processes.
gops
Package gops extracts the information on running processes from gopsutil
Package gops extracts the information on running processes from gopsutil
Package utils provides various helper functions used in the library.
Package utils provides various helper functions used in the library.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL