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.
Click to show internal directories.
Click to hide internal directories.