* Add a mode to test all metric queries * Add a script to run query tests against different versions of PostgeSQL * Add Docker elements for query testing * Switch to using a --config flag when specifying the config file * Fix some metric queries * Allow the agent address to be configured * Allow the sslmode connection parameter to be configured
25 lines
586 B
Plaintext
25 lines
586 B
Plaintext
#!/sbin/openrc-run
|
|
|
|
extra_started_commands="reload"
|
|
|
|
supervisor="supervise-daemon"
|
|
|
|
agent_name=${SVCNAME#pgmon.}
|
|
agent_name=${agent_name:-pgmon}
|
|
|
|
PGMON_USER="${PGMON_USER:-postgres}"
|
|
PGMON_GROUP="${PGMON_GROUP:-$PGMON_USER}"
|
|
CONFIG_FILE="/etc/pgmon/${agent_name}.yml"
|
|
|
|
output_log=/var/log/pgmon/${SVCNAME}.log
|
|
error_log=/var/log/pgmon/${SVCNAME}.err
|
|
|
|
start_pre() {
|
|
checkpath -f -m 0644 -o "${PGMON_USER}:${PGMON_GROUP}" "${output_log}" "${error_log}"
|
|
}
|
|
|
|
command="/usr/bin/pgmon"
|
|
command_args="-c '$CONFIG_FILE'"
|
|
command_background="true"
|
|
command_user="${PGMON_USER}:${PGMON_GROUP}"
|