server

package
v0.0.0-...-308b073 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TotalDiskAllocatedServiceName = "total.disk.allocated"
	TotalMemoryUsageAllocatedName = "total.memory.allocated"
	TotalCPUUsageServiceName      = "total.cpu.usage"
	DiskUsedServiceName           = "disk.used"
	MemoryUsedServiceName         = "memory.used"
	DiskFreeServiceName           = "disk.free"
	MemoryFreeServiceName         = "memory.free"
	ProcessesNumberServiceName    = "processes.number"
)

Default processes names

View Source
const EnvTcgHostName = "TCG_HOST_NAME"

EnvTcgHostName defines environment variable

View Source
const MB uint64 = 1048576

MB defines the divisor for conversion

Variables

This section is empty.

Functions

func CollectMetrics

func CollectMetrics(processes []transit.MetricDefinition) *transit.MonitoredResource

CollectMetrics method gather metrics data for necessary processes

func Run

func Run()

@host localhost:8099 @BasePath /api/v1

func Synchronize

func Synchronize(processes []transit.MetricDefinition) *transit.InventoryResource

Synchronize inventory for necessary processes

Types

type ExtConfig

type ExtConfig struct {
	Groups        []transit.ResourceGroup   `json:"groups"`
	Processes     []string                  `json:"processes"`
	CheckInterval time.Duration             `json:"checkIntervalMinutes"`
	Ownership     transit.HostOwnershipType `json:"ownership,omitempty"`
}

ExtConfig defines the MonitorConnection extensions configuration

func (*ExtConfig) UnmarshalJSON

func (cfg *ExtConfig) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

Jump to

Keyboard shortcuts

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