hostmonitor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package hostmonitor collects operating-system inventory and metrics for the server monitor plugin and the agent's remote host-monitor mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(backend Backend) http.Handler

Types

type Backend

type Backend interface {
	Overview(context.Context) (map[string]any, error)
	Metrics(context.Context) (map[string]any, error)
	Processes(context.Context) ([]Row, error)
	Services(context.Context) ([]Row, error)
	Disks(context.Context) ([]Row, error)
	DiskIO(context.Context) ([]Row, error)
	Networks(context.Context) ([]Row, error)
	Connections(context.Context) ([]Row, error)
	Users(context.Context) ([]Row, error)
	Sensors(context.Context) ([]Row, error)
	CPUInfo(context.Context) ([]Row, error)
}

type Local

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

func NewLocal

func NewLocal(opts Options) *Local

func (*Local) CPUInfo

func (l *Local) CPUInfo(ctx context.Context) ([]Row, error)

func (*Local) Connections

func (l *Local) Connections(ctx context.Context) ([]Row, error)

func (*Local) DiskIO

func (l *Local) DiskIO(ctx context.Context) ([]Row, error)

func (*Local) Disks

func (l *Local) Disks(ctx context.Context) ([]Row, error)

func (*Local) Metrics

func (l *Local) Metrics(ctx context.Context) (map[string]any, error)

func (*Local) Networks

func (l *Local) Networks(ctx context.Context) ([]Row, error)

func (*Local) Overview

func (l *Local) Overview(ctx context.Context) (map[string]any, error)

func (*Local) Processes

func (l *Local) Processes(ctx context.Context) ([]Row, error)

func (*Local) Sensors

func (l *Local) Sensors(ctx context.Context) ([]Row, error)

func (*Local) Services

func (l *Local) Services(ctx context.Context) ([]Row, error)

func (*Local) Users

func (l *Local) Users(ctx context.Context) ([]Row, error)

type Options

type Options struct {
	ProcessLimit    int
	ConnectionLimit int
}

type Remote

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

func NewRemote

func NewRemote(base string, client *http.Client) *Remote

func (*Remote) CPUInfo

func (r *Remote) CPUInfo(ctx context.Context) ([]Row, error)

func (*Remote) Connections

func (r *Remote) Connections(ctx context.Context) ([]Row, error)

func (*Remote) DiskIO

func (r *Remote) DiskIO(ctx context.Context) ([]Row, error)

func (*Remote) Disks

func (r *Remote) Disks(ctx context.Context) ([]Row, error)

func (*Remote) Metrics

func (r *Remote) Metrics(ctx context.Context) (map[string]any, error)

func (*Remote) Networks

func (r *Remote) Networks(ctx context.Context) ([]Row, error)

func (*Remote) Overview

func (r *Remote) Overview(ctx context.Context) (map[string]any, error)

func (*Remote) Processes

func (r *Remote) Processes(ctx context.Context) ([]Row, error)

func (*Remote) Sensors

func (r *Remote) Sensors(ctx context.Context) ([]Row, error)

func (*Remote) Services

func (r *Remote) Services(ctx context.Context) ([]Row, error)

func (*Remote) Users

func (r *Remote) Users(ctx context.Context) ([]Row, error)

type Row

type Row map[string]any

Jump to

Keyboard shortcuts

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