Cleanup collectors (#826)
Fix up `replication` and `process_idle` Update input params to match the rest of the collectors. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
@@ -15,7 +15,6 @@ package collector
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
@@ -64,7 +63,8 @@ var (
|
||||
END as is_replica`
|
||||
)
|
||||
|
||||
func (c *PGReplicationCollector) Update(ctx context.Context, db *sql.DB, ch chan<- prometheus.Metric) error {
|
||||
func (c *PGReplicationCollector) Update(ctx context.Context, instance *instance, ch chan<- prometheus.Metric) error {
|
||||
db := instance.getDB()
|
||||
row := db.QueryRowContext(ctx,
|
||||
pgReplicationQuery,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user