Clean up Gentoo install files
This commit is contained in:
parent
c13951e16e
commit
80661f1b72
@ -1,68 +0,0 @@
|
|||||||
##
|
|
||||||
# Misc agent settings
|
|
||||||
##
|
|
||||||
|
|
||||||
# Where to write/find the agent PID
|
|
||||||
#pid_file=
|
|
||||||
|
|
||||||
##
|
|
||||||
# Agent communication settings
|
|
||||||
##
|
|
||||||
|
|
||||||
# IPC socket
|
|
||||||
#ipc_socket=pgmon.sock
|
|
||||||
|
|
||||||
# IPC communication timeout (s)
|
|
||||||
#ipc_timeout=10
|
|
||||||
|
|
||||||
# Request processing timeout (s)
|
|
||||||
#request_timeout=10
|
|
||||||
|
|
||||||
# Max size of the request queue before it blocks
|
|
||||||
#request_queue_size=100
|
|
||||||
|
|
||||||
# Max time to wait when queueing a request (s)
|
|
||||||
#request_queue_timeout=2
|
|
||||||
|
|
||||||
##
|
|
||||||
# Agent resource settings
|
|
||||||
##
|
|
||||||
|
|
||||||
# Number of worker threads
|
|
||||||
#worker_count=4
|
|
||||||
|
|
||||||
##
|
|
||||||
# Logging settings
|
|
||||||
##
|
|
||||||
|
|
||||||
# Log level for stderr logging (or 'off')
|
|
||||||
stderr_log_level=off
|
|
||||||
|
|
||||||
# Log level for file logging (od 'off')
|
|
||||||
file_log_level=info
|
|
||||||
|
|
||||||
# Log file
|
|
||||||
#log_file=pgmon.log
|
|
||||||
|
|
||||||
##
|
|
||||||
# DB connection settings
|
|
||||||
#
|
|
||||||
# Each cluster entry is of the form:
|
|
||||||
# name:address:port:dbname:user:password
|
|
||||||
#
|
|
||||||
# Any element other than the name can be left empty to use the defaults
|
|
||||||
##
|
|
||||||
|
|
||||||
#cluster=local:/var/run/postgresql:5432:postgres:zbx_monitor:
|
|
||||||
|
|
||||||
# Default database to connect to when none is specified for a metric
|
|
||||||
#dbname=postgres
|
|
||||||
|
|
||||||
##
|
|
||||||
# Monitoring configuration
|
|
||||||
##
|
|
||||||
|
|
||||||
# Metrics
|
|
||||||
#metrics={}
|
|
||||||
|
|
||||||
include=/etc/pgmon/pgmon-metrics.cfg
|
|
||||||
@ -2,31 +2,14 @@
|
|||||||
|
|
||||||
extra_started_commands="reload"
|
extra_started_commands="reload"
|
||||||
|
|
||||||
|
supervisor="supervise-daemon"
|
||||||
|
|
||||||
agent_name=${SVCNAME#pgmon.}
|
agent_name=${SVCNAME#pgmon.}
|
||||||
agent_name=${agent_name:-pgmon}
|
agent_name=${agent_name:-pgmon}
|
||||||
|
|
||||||
CONFIG_FILE="/etc/pgmon/${agent_name}.cfg"
|
CONFIG_FILE="/etc/pgmon/${agent_name}.yml"
|
||||||
PID_FILE="/run/pgmon/${agent_name}.pid"
|
|
||||||
LOG_FILE="/var/log/pgmon/${agent_name}.log"
|
|
||||||
SOCKET="/run/pgmon/${agent_name}.socket"
|
|
||||||
|
|
||||||
pidfile="$PID_FILE"
|
|
||||||
|
|
||||||
command="/usr/bin/pgmon"
|
command="/usr/bin/pgmon"
|
||||||
command_args="--server -c '$CONFIG_FILE' -l '$LOG_FILE' -s '$SOCKET'"
|
command_args="'$CONFIG_FILE'"
|
||||||
command_background="true"
|
command_background="true"
|
||||||
command_user="zabbix:zabbix"
|
command_user="zabbix:zabbix"
|
||||||
|
|
||||||
output_log="/var/log/pgmon/${agent_name}-service.log"
|
|
||||||
error_log="/var/log/pgmon/${agent_name}-service.err"
|
|
||||||
|
|
||||||
start_pre() {
|
|
||||||
checkpath -d -m 0755 -o "${command_user}" "/run/pgmon"
|
|
||||||
checkpath -d -m 0755 -o "${command_user}" "/var/log/pgmon"
|
|
||||||
}
|
|
||||||
|
|
||||||
reload() {
|
|
||||||
ebegin "Reloading ${RC_SVCNAME}"
|
|
||||||
start-stop-daemon --signal HUP --pidfile "${pidfile}"
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
UserParameter=pgmon[*],/usr/bin/pgmon -s "/run/pgmon/$1.socket" "$1,$2,$3,$4,$5,$6,$7,$8,$9"
|
|
||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{6..11} )
|
PYTHON_COMPAT=( python3_{6..12} )
|
||||||
|
|
||||||
inherit git-r3 python-r1
|
inherit git-r3 python-r1
|
||||||
|
|
||||||
@ -17,11 +17,10 @@ KEYWORDS="amd64"
|
|||||||
EGIT_REPO_URI="https://code2.shh-dot-com.org/james/pgmon.git"
|
EGIT_REPO_URI="https://code2.shh-dot-com.org/james/pgmon.git"
|
||||||
#EGIT_COMMIT=""
|
#EGIT_COMMIT=""
|
||||||
|
|
||||||
IUSE="+agent agent2"
|
|
||||||
|
|
||||||
DEPEND="
|
DEPEND="
|
||||||
${PYTHON_DEPS}
|
${PYTHON_DEPS}
|
||||||
dev-python/psycopg:2
|
dev-python/psycopg:3
|
||||||
|
dev-python/pyyaml
|
||||||
acct-user/zabbix
|
acct-user/zabbix
|
||||||
acct-group/zabbix
|
acct-group/zabbix
|
||||||
agent? ( net-analyzer/zabbix[agent] )
|
agent? ( net-analyzer/zabbix[agent] )
|
||||||
@ -44,23 +43,8 @@ src_install() {
|
|||||||
# Install default config
|
# Install default config
|
||||||
diropts -o root -g zabbix -m 0755
|
diropts -o root -g zabbix -m 0755
|
||||||
insinto /etc/pgmon
|
insinto /etc/pgmon
|
||||||
doins "${FILESDIR}/pgmon.cfg"
|
doins "${FILESDIR}/pgmon.yml"
|
||||||
doins "${S}/pgmon-metrics.cfg"
|
doins "${S}/pgmon-metrics.yml"
|
||||||
|
|
||||||
# Install Zabbix userparams file
|
|
||||||
if use agent; then
|
|
||||||
insinto /etc/zabbix/zabbix_agent.d
|
|
||||||
newins "${FILESDIR}/pgmon_userparameter.conf" pgmon.conf
|
|
||||||
fperms 0644 /etc/zabbix/zabbix_agent.d/pgmon.conf
|
|
||||||
fowners root:zabbix /etc/zabbix/zabbix_agent.d/pgmon.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use agent2; then
|
|
||||||
insinto /etc/zabbix/zabbix_agent2.d
|
|
||||||
newins "${S}/pgmon_userparameter.conf" pgmon.conf
|
|
||||||
fperms 0644 /etc/zabbix/zabbix_agent2.d/pgmon.conf
|
|
||||||
fowners root:zabbix /etc/zabbix/zabbix_agent2.d/pgmon.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install logrotate config
|
# Install logrotate config
|
||||||
insinto /etc/logrotate.d
|
insinto /etc/logrotate.d
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user