#
# mandatory options
#

# port to listen on
http_port = 8071
# syslog facility to log to
syslog_facility = local7
# data to connect to the PostgreSQL server
pg_host = localhost
pg_port = 5432
pg_user = postgres
pg_password =
pg_database = postgres
# timeout (in seconds) when connecting to the PostgreSQL server
pg_connection_timeout = 3
# maximum acceptable delay on a streaming replica (use -1 to disable)
pg_max_replication_lag = -1

#
# optional set of custom checks
# each line is of the form "sql query" relop "value"
# * "sql query" -> plain SQL query to run; should return exactly one field
# * relop       -> relational operator
# * "value"     -> expected result from "sql query"
#
# the check is considered successful iff the application of the
# relational operator to the result of the query and the expected
# value is true -- string comparison for '=', floating point values for
# '<' and '>'
#
# if no relop and "value" are provided, the check is considered
# successful if the query is executed without any errors (regardless
# of what it actually returns)
#
# the quotes are mandatory
#

# successful if "replication_lag < 5"
"SELECT extract(seconds from (now() - pg_last_xact_replay_timestamp())) AS replication_lag" < "5"

# successful iff the query runs without errors
"SELECT c FROM t WHERE 1=2"

#
# mandatory options
#

# port to listen on
http_port = 8071
# syslog facility to log to
syslog_facility = local7
# data to connect to the PostgreSQL server
pg_host = localhost
pg_port = 5432
pg_user = postgres
pg_password =
pg_database = postgres
# timeout (in seconds) when connecting to the PostgreSQL server
pg_connection_timeout = 3
# maximum acceptable delay on a streaming replica (use -1 to disable)
pg_max_replication_lag = -1

#
# optional set of custom checks
# each line is of the form "sql query" relop "value"
# * "sql query" -> plain SQL query to run; should return exactly one field
# * relop       -> relational operator
# * "value"     -> expected result from "sql query"
#
# the check is considered successful iff the application of the
# relational operator to the result of the query and the expected
# value is true -- string comparison for '=', floating point values for
# '<' and '>'
#
# if no relop and "value" are provided, the check is considered
# successful if the query is executed without any errors (regardless
# of what it actually returns)
#
# the quotes are mandatory
#

# successful if "replication_lag < 5"
# "SELECT extract(seconds from (now() - pg_last_xact_replay_timestamp())) AS replication_lag" < "5"
"SELECT 6" > "5"
"SELECT 3" < "5"
"SELECT 5" = "5"

# successful iff the query runs without errors
"SELECT c FROM t WHERE 1=2"

Add more examples to the configuration file
Add more examples to the configuration file
