diff --git a/internal/collector/postgres_database.go b/internal/collector/postgres_database.go index 531a68ca..9a638544 100644 --- a/internal/collector/postgres_database.go +++ b/internal/collector/postgres_database.go @@ -138,7 +138,7 @@ func NewPostgresDatabasesCollector(constLabels labels, settings model.CollectorS settings.Filters, ), sessionalltime: newBuiltinTypedDesc( - descOpts{"postgres", "database", "session_time_all_seconds_total", "Total time spent by database sessions in this database in all states, in seconds", .001}, + descOpts{"postgres", "database", "session_time_seconds_all_total", "Total time spent by database sessions in this database in all states, in seconds", .001}, prometheus.CounterValue, labels, constLabels, settings.Filters, diff --git a/internal/collector/postgres_database_test.go b/internal/collector/postgres_database_test.go index f3dfecb6..2cf6c23e 100644 --- a/internal/collector/postgres_database_test.go +++ b/internal/collector/postgres_database_test.go @@ -29,7 +29,7 @@ func TestPostgresDatabasesCollector_Update(t *testing.T) { // TODO: wait until Postgres 14 has been released, update Postgres version on pgscv-testing docker image // and move these metrics to 'required' slice. optional: []string{ - "postgres_database_session_time_all_seconds_total", + "postgres_database_session_time_seconds_all_total", "postgres_database_session_time_seconds_total", "postgres_database_sessions_all_total", "postgres_database_sessions_total",