metrics

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupMetrics

type BackupMetrics struct {
	Hostname       string
	ProxmoxType    string
	ProxmoxVersion string
	ScriptVersion  string

	StartTime time.Time
	EndTime   time.Time
	Duration  time.Duration

	ExitCode       int
	ErrorCount     int
	WarningCount   int
	LocalBackups   int
	SecBackups     int
	CloudBackups   int
	BytesCollected int64
	ArchiveSize    int64
	FilesCollected int
	FilesFailed    int
}

BackupMetrics represents the subset of backup statistics exported as Prometheus metrics.

type PrometheusExporter

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

PrometheusExporter writes backup metrics in Prometheus textfile format for node_exporter.

func NewPrometheusExporter

func NewPrometheusExporter(textfileDir string, logger *logging.Logger) *PrometheusExporter

NewPrometheusExporter creates a new PrometheusExporter using the provided directory.

func (*PrometheusExporter) Export

func (pe *PrometheusExporter) Export(m *BackupMetrics) error

Export writes the given metrics snapshot to proxmox_backup.prom in textfileDir.

Jump to

Keyboard shortcuts

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