Skip to content

Commit

Permalink
fix metric postgres_index_tuples_total{tuples="read"} (#28)
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitry V. Bulashev <[email protected]>
  • Loading branch information
dbulashev and Dmitry V. Bulashev authored Jul 25, 2024
1 parent d1bd7b7 commit 8984b0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/collector/postgres_indexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (c *postgresIndexesCollector) Update(config Config, ch chan<- prometheus.Me

// avoid metrics spamming and send metrics only if they greater than zero.
if stat.idxtupread > 0 {
ch <- c.tuples.newConstMetric(stat.idxread, stat.database, stat.schema, stat.table, stat.index, "read")
ch <- c.tuples.newConstMetric(stat.idxtupread, stat.database, stat.schema, stat.table, stat.index, "read")
}
if stat.idxtupfetch > 0 {
ch <- c.tuples.newConstMetric(stat.idxtupfetch, stat.database, stat.schema, stat.table, stat.index, "fetched")
Expand Down

0 comments on commit 8984b0c

Please sign in to comment.