Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pgpool2_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ var (
"hostname": {LABEL, "Backend hostname"},
"port": {LABEL, "Backend port"},
"role": {LABEL, "Role (primary or standby)"},
"status": {GAUGE, "Backend node Status (1 for up or waiting, 0 for down or unused)"},
"status": {GAUGE, "Pool node status (1 for up or waiting, 0 for down or unused)"},
"pg_status": {GAUGE, "Backend pg status (1 for up or waiting, 0 for down or unused)"},
"select_cnt": {COUNTER, "SELECT statement counts issued to each backend"},
"replication_delay": {GAUGE, "Replication delay"},
},
Expand Down Expand Up @@ -497,7 +498,7 @@ func queryNamespaceMapping(ch chan<- prometheus.Metric, db *sql.DB, namespace st
}

// If status column, convert string to int.
if columnName == "status" {
if columnName == "status" || columnName == "pg_status" {
valueString, ok := dbToString(columnData[idx])
if !ok {
nonfatalErrors = append(nonfatalErrors, errors.New(fmt.Sprintln("Unexpected error parsing column: ", namespace, columnName, columnData[idx])))
Expand Down