Skip to content

Commit

Permalink
Fixed label
Browse files Browse the repository at this point in the history
  • Loading branch information
CHERTS committed Nov 26, 2024
1 parent 27ae2d0 commit f7b0cbe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/collector/postgres_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,16 @@ func (c *postgresStorageCollector) Update(config Config, ch chan<- prometheus.Me

if !config.localService {
// Collect a limited set of Wal metrics
log.Debugln("[postgres storage collector]: collecting limited WAL metrics from remote services")
dirstats, err := newPostgresWalStat(conn)
if err != nil {
return err
}
// WAL directory
ch <- c.waldirBytes.newConstMetric(dirstats.waldirSizeBytes, dirstats.waldirPath, dirstats.waldirPath, dirstats.waldirPath)
ch <- c.waldirFiles.newConstMetric(dirstats.waldirFilesCount, dirstats.waldirPath, dirstats.waldirPath, dirstats.waldirPath)
ch <- c.waldirBytes.newConstMetric(dirstats.waldirSizeBytes, "unknown", "unknown", dirstats.waldirPath)
ch <- c.waldirFiles.newConstMetric(dirstats.waldirFilesCount, "unknown", "unknown", dirstats.waldirPath)

log.Debugln("[postgres storage collector]: skip collecting directories metrics from remote services")
log.Debugln("[postgres storage collector]: skip collecting full directories metrics from remote services")
return nil
}

Expand Down

0 comments on commit f7b0cbe

Please sign in to comment.