guestoscollector

package
v0.0.0-...-7dd19d7 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PowerProfileSetting used for power profile of machine.
	PowerProfileSetting = "power_profile_setting"
	// LocalSSD used to connect physical drive to disk type.
	UseLocalSSD = "local_ssd"
	// DataDiskAllocationUnits used to see blocksize of a physical drive.
	DataDiskAllocationUnits = "data_disk_allocation_units"
	// GCBDRAgentRunning used for checking if GCBDRAgentRunning is running on the target.
	GCBDRAgentRunning = "gcbdr_agent_running"
)

Guest OS Metrics that are in SQL Server validations.

Variables

This section is empty.

Functions

func CollectionOSFields

func CollectionOSFields() []string

CollectionOSFields returns all expected fields in OS collection

func DiskToDiskType

func DiskToDiskType(fields map[string]string, disks []*sqlserverutils.Disks)

DiskToDiskType maps physical drive to disktype. EX: /dev/sda to local_ssd

func HighPerformanceProfiles

func HighPerformanceProfiles() map[string]bool

HighPerformanceProfiles public getter for highPerformanceProfile

func UnknownOsFields

func UnknownOsFields(details *[]sqlserverutils.MetricDetails) error

UnknownOsFields checks the collected os fields; if nil or missing, then the data is marked as unknown

Types

type DiskTypeEnum

type DiskTypeEnum int

DiskTypeEnum enum used for disktypes to keep linux and windows collection consistent .

const (
	// LocalSSD - local disk
	LocalSSD DiskTypeEnum = iota
	// PersistentSSD - persistent disk
	PersistentSSD
	// Other - not local or persistent disk but still a valid disk type
	Other
)

DiskType enum values.

func (DiskTypeEnum) String

func (disk DiskTypeEnum) String() string

type GuestCollector

type GuestCollector interface {
	CollectGuestRules(context.Context, time.Duration) sqlserverutils.MetricDetails
}

GuestCollector interface.

type LinuxCollector

type LinuxCollector struct {
	// contains filtered or unexported fields
}

LinuxCollector is the collector for linux systems.

func NewLinuxCollector

func NewLinuxCollector(disks []*sqlserverutils.Disks, ipAddr, username, privateKeyPath string, isRemote bool, port int32) *LinuxCollector

NewLinuxCollector initializes and returns a new LinuxCollector object.

func (*LinuxCollector) CollectGuestRules

func (c *LinuxCollector) CollectGuestRules(ctx context.Context, timeout time.Duration) sqlserverutils.MetricDetails

CollectGuestRules collects os guest os rules

Directories

Path Synopsis
Package remote ssh'es into remote machines and runs a command
Package remote ssh'es into remote machines and runs a command

Jump to

Keyboard shortcuts

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