inventory

package
v0.0.0-...-2b44270 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Collectors = map[string]*collectors.CollectorFnWrapper{
	"sysinfo.package.rpm-package":  &collectors.CollectorFnWrapper{RunFn: RpmCollectRun, Dependencies: []string{"rpm"}, Type: "inventory.other"},
	"sysinfo.package.dpkg-package": &collectors.CollectorFnWrapper{RunFn: DpkgCollectRun, Dependencies: []string{"dpkg-query"}, Type: "inventory.other"},
	"sysinfo.disk":                 &collectors.CollectorFnWrapper{RunFn: DiskRun, Dependencies: []string{"smartctl"}, Type: "inventory.all"},
	"sysinfo.pci":                  &collectors.CollectorFnWrapper{RunFn: LsPCIRun, Dependencies: []string{"lspci"}, Type: "inventory.all"},
	"sysinfo.usb":                  &collectors.CollectorFnWrapper{RunFn: LsUSBRun, Dependencies: []string{"lsusb"}, Type: "inventory.all"},
	"sysinfo.nic":                  &collectors.CollectorFnWrapper{RunFn: NicRun, Dependencies: []string{}, Type: "inventory.all"},
	"sysinfo.smbios":               &collectors.CollectorFnWrapper{RunFn: SMBIOSRun, Dependencies: []string{"dmidecode"}, Type: "inventory.all"},
	"sysinfo.bmc.bmc-info":         &collectors.CollectorFnWrapper{RunFn: BmcInfoRun, PrecheckFn: BmcPrecheck, Dependencies: []string{"bmc-info"}, Type: "inventory.all"},
	"sysinfo.bmc.ipmi-tool":        &collectors.CollectorFnWrapper{RunFn: IpmiToolRun, PrecheckFn: BmcPrecheck, Dependencies: []string{"ipmitool"}, Type: "inventory.all"},
	"sysinfo.proc":                 &collectors.CollectorFnWrapper{RunFn: ProcInfoRun, Dependencies: []string{}, Type: "inventory.all"},
	"sysinfo.ecc":                  &collectors.CollectorFnWrapper{RunFn: ECCRun, PrecheckFn: ECCPrecheck, Dependencies: []string{}, Type: "inventory.all"},
}

Collectors is a list of predefined inventory collectors

Functions

func BmcInfoRun

func BmcInfoRun() ([]byte, error)

BmcInfoRun returns formatted output of bmc-info in []byte

func BmcPrecheck

func BmcPrecheck() error

BmcPrecheck validates the dependency of bmc-info and dmidecode

func DiskRun

func DiskRun() ([]byte, error)

DiskRun returns disk information output

func DpkgCollectRun

func DpkgCollectRun() ([]byte, error)

DpkgCollectRun returns formatted output of dpkg-query in []byte

func ECCPrecheck

func ECCPrecheck() error

ECCPrecheck validates ECC dependencies mcelog and dmidecode

func ECCRun

func ECCRun() ([]byte, error)

ECCRun returns inventory of ECC in []byte

func IpmiToolRun

func IpmiToolRun() ([]byte, error)

IpmiToolRun returns inventory of Management Controller and LAN channels

func LsPCIRun

func LsPCIRun() ([]byte, error)

LsPCIRun returns inventory of all available PCI devices

func LsUSBRun

func LsUSBRun() ([]byte, error)

LsUSBRun returns inventory of all available USB devices

func NicRun

func NicRun() ([]byte, error)

NicRun returns inventory of all network interfaces

func ProcInfoRun

func ProcInfoRun() ([]byte, error)

ProcInfoRun returns inventory of host version, cpuinfo etc

func RpmCollectRun

func RpmCollectRun() ([]byte, error)

RpmCollectRun returns inventory of all installed rpm in []byte

func SMBIOSRun

func SMBIOSRun() ([]byte, error)

SMBIOSRun returns inventory of SMBIOS in []byte, which contains hardware components, serial number etc

Types

type BlockDrive

type BlockDrive struct {
	Name             string
	SysfsPath        string
	MajMin           string
	Type             string
	Size             int64 //in bytes
	Removable        bool
	ReadOnly         bool
	Revision         string
	Vendor           string
	Product          string
	LogicalBlockSize string
	StorageType      string
}

BlockDrive contains information of block drives on the machine

type Disk

type Disk struct {
	Path string
	Name string
	Type string
}

Disk contains information of disk

Jump to

Keyboard shortcuts

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