Currently on startup, if the exporter cannot connect to pgpool it throws an error and exits. This is okay if the pgpool connection parameters are incorrect but if the parameters are correct and pgpool is down, the exporter should just print the metric up = 0 and wait for pgpool to be back up and not exit with an error.
This behaviour causes an issue if the exporter is run as a sidecar container with pgpool and pgpool is waiting for searching a primary (search_primary_node_timeout = 0) for a few minutes. Then, after ~30 seconds, the exporter not being able to find the pgpool exits with an error and because one of the sidecar container is down, the orchestrator kills the whole job to restart it.
Currently on startup, if the exporter cannot connect to pgpool it throws an error and exits. This is okay if the pgpool connection parameters are incorrect but if the parameters are correct and pgpool is down, the exporter should just print the metric
up = 0and wait for pgpool to be back up and not exit with an error.This behaviour causes an issue if the exporter is run as a sidecar container with pgpool and pgpool is waiting for searching a primary (
search_primary_node_timeout = 0) for a few minutes. Then, after ~30 seconds, the exporter not being able to find the pgpool exits with an error and because one of the sidecar container is down, the orchestrator kills the whole job to restart it.