Update pgmon package

This commit is contained in:
James Campbell 2024-06-06 00:29:32 -04:00
parent c814a75237
commit ae5855fd23
Signed by: james
GPG Key ID: 2287C33A40DC906A
4 changed files with 13 additions and 7 deletions

View File

@ -38,10 +38,10 @@ ipc_socket=/run/pgmon/pgmon.sock
## ##
# Log level for stderr logging (or 'off') # Log level for stderr logging (or 'off')
stderr_log_level=info stderr_log_level=off
# Log level for file logging (od 'off') # Log level for file logging (od 'off')
file_log_level=notice file_log_level=info
# Log file # Log file
#log_file=pgmon.log #log_file=pgmon.log
@ -67,4 +67,4 @@ file_log_level=notice
# Metrics # Metrics
#metrics={} #metrics={}
include=pgmon-metrics.cfg include=/etc/pgmon/pgmon-metrics.cfg

View File

@ -2,14 +2,19 @@
extra_started_commands="reload" extra_started_commands="reload"
agent_name=${RC_SERVICE#pgmon.} agent_name=${SVCNAME#pgmon.}
agent_name=${agent_name:-pgmon} agent_name=${agent_name:-pgmon}
CONFIG_FILE="/etc/pgmon/${agent_name}.cfg"
PID_FILE="/run/pgmon/${agent_name}.pid"
LOG_FILE="/var/log/${agent_name}.log"
SOCKET="/var/run/${agent_name}.socket"
command="/usr/bin/pgmon" command="/usr/bin/pgmon"
command_args="--server --config /etc/pgmon/${agent_name}.cfg" command_args="--server -c '$CONFIG_FILE' -l '$LOG_FILE' -p '$PID_FILE' -s '$SOCKET'"
command_user="zabbix:zabbix" command_user="zabbix:zabbix"
pidfile="/run/pgmon/${agent_name}.pid" pidfile="$PID_FILE"
start_pre() { start_pre() {
checkpath -d -m 0755 -o "${command_user}" "/run/pgmon" checkpath -d -m 0755 -o "${command_user}" "/run/pgmon"

View File

@ -0,0 +1 @@
UserParameter=pgmon[*],/usr/bin/pgmon -s "/run/pgmon/$1.socket" "$2,$3,$4,$5,$6,$7,$8,$9"

View File

@ -50,7 +50,7 @@ src_install() {
# Install Zabbix userparams file # Install Zabbix userparams file
if use agent; then if use agent; then
insinto /etc/zabbix/zabbix_agent.d insinto /etc/zabbix/zabbix_agent.d
newins "${S}/pgmon_userparameter.conf" pgmon.conf newins "${FILESDIR}/pgmon_userparameter.conf" pgmon.conf
fperms 0644 /etc/zabbix/zabbix_agent.d/pgmon.conf fperms 0644 /etc/zabbix/zabbix_agent.d/pgmon.conf
fowners root:zabbix /etc/zabbix/zabbix_agent.d/pgmon.conf fowners root:zabbix /etc/zabbix/zabbix_agent.d/pgmon.conf
fi fi