Compare commits
No commits in common. "55b9b16deb0abde3fd2b38cde9542bf85fd35ecc" and "295d1d63105b765b5726d770fdcf9af3d3a8888e" have entirely different histories.
55b9b16deb
...
295d1d6310
7
Makefile
7
Makefile
@ -74,12 +74,12 @@ install-common:
|
||||
# Set up directories
|
||||
mkdir -p $(DESTDIR)/etc/$(PACKAGE_NAME)
|
||||
mkdir -p ${DESTDIR}/etc/logrotate.d
|
||||
mkdir -p $(DESTDIR)/usr/bin
|
||||
mkdir -p $(DESTDIR)/usr/local/bin
|
||||
mkdir -p $(DESTDIR)/usr/share/man/man1
|
||||
|
||||
# Install script
|
||||
cp $(SCRIPT) $(DESTDIR)/usr/bin/$(PACKAGE_NAME)
|
||||
chmod 755 $(DESTDIR)/usr/bin/$(PACKAGE_NAME)
|
||||
cp $(SCRIPT) $(DESTDIR)/usr/local/bin/$(PACKAGE_NAME)
|
||||
chmod 755 $(DESTDIR)/usr/local/bin/$(PACKAGE_NAME)
|
||||
|
||||
# Install manpage
|
||||
cp manpages/* $(DESTDIR)/usr/share/man/man1/
|
||||
@ -113,7 +113,6 @@ install-openrc:
|
||||
|
||||
# Install init script
|
||||
cp openrc/pgmon.initd $(DESTDIR)/etc/init.d/pgmon
|
||||
chmod 755 $(DESTDIR)/etc/init.d/pgmon
|
||||
|
||||
# Install init script config file
|
||||
cp openrc/pgmon.confd $(DESTDIR)/etc/conf.d/pgmon
|
||||
|
||||
@ -28,7 +28,7 @@ make -C /src install-systemd DESTDIR=%{buildroot}
|
||||
/etc/pgmon/pgmon-service.conf
|
||||
/lib/systemd/system/pgmon.service
|
||||
/lib/systemd/system/pgmon@.service
|
||||
/usr/bin/pgmon
|
||||
/usr/local/bin/pgmon
|
||||
/usr/share/man/man1/pgmon.1.gz
|
||||
|
||||
%post
|
||||
|
||||
@ -28,7 +28,7 @@ make -C /src install-systemd DESTDIR=%{buildroot}
|
||||
/etc/pgmon/pgmon-service.conf
|
||||
/lib/systemd/system/pgmon.service
|
||||
/lib/systemd/system/pgmon@.service
|
||||
/usr/bin/pgmon
|
||||
/usr/local/bin/pgmon
|
||||
/usr/share/man/man1/pgmon.1.gz
|
||||
|
||||
%post
|
||||
|
||||
@ -22,7 +22,7 @@ metrics:
|
||||
max_frozen_age:
|
||||
type: row
|
||||
query:
|
||||
0: SELECT max(age(datfrozenxid)) AS xid_age, max(mxid_age(datminmxid)) AS mxid_age FROM pg_database
|
||||
0: SELECT max(age(datfrozenxid)), max(mxid_age(datminmxid)) FROM pg_database
|
||||
|
||||
# Per-database metrics
|
||||
db_stats:
|
||||
@ -47,6 +47,12 @@ metrics:
|
||||
test_args:
|
||||
repid: 127.0.0.1_test_rep
|
||||
|
||||
# Debugging
|
||||
sleep:
|
||||
type: value
|
||||
query:
|
||||
0: SELECT now(), pg_sleep(5);
|
||||
|
||||
# Per-slot metrics
|
||||
slot_stats:
|
||||
type: row
|
||||
|
||||
@ -7,7 +7,7 @@ After=network.target
|
||||
[Service]
|
||||
EnvironmentFile=/etc/pgmon/%i-service.conf
|
||||
User=${SERVICE_USER:-postgres}
|
||||
ExecStart=/usr/bin/pgmon -c /etc/pgmon/%i.yml
|
||||
ExecStart=/usr/local/bin/pgmon -c /etc/pgmon/%i.yml
|
||||
ExecReload=kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
Type=exec
|
||||
|
||||
@ -11,44 +11,6 @@ zabbix_export:
|
||||
groups:
|
||||
- name: 'My Templates'
|
||||
items:
|
||||
- uuid: cc4a50ca681b4c4fb8c1c98f4bc81c96
|
||||
name: 'Max Frozen MXID Age'
|
||||
type: DEPENDENT
|
||||
key: pgmon.age.mxid
|
||||
delay: '0'
|
||||
history: 90d
|
||||
description: 'Maximum age of any frozen MXID in any database'
|
||||
preprocessing:
|
||||
- type: JSONPATH
|
||||
parameters:
|
||||
- $.mxid_age
|
||||
- type: MATCHES_REGEX
|
||||
parameters:
|
||||
- '^[0-9]+$'
|
||||
master_item:
|
||||
key: 'pgmon[max_frozen_age]'
|
||||
tags:
|
||||
- tag: Application
|
||||
value: PostgreSQL
|
||||
- uuid: 2fa86d8c4a3a481e856a9414c5c70216
|
||||
name: 'Max Frozen XID Age'
|
||||
type: DEPENDENT
|
||||
key: pgmon.age.xid
|
||||
delay: '0'
|
||||
history: 90d
|
||||
description: 'Maximum age of any frozen XID in any database'
|
||||
preprocessing:
|
||||
- type: JSONPATH
|
||||
parameters:
|
||||
- $.xid_age
|
||||
- type: MATCHES_REGEX
|
||||
parameters:
|
||||
- '^[0-9]+$'
|
||||
master_item:
|
||||
key: 'pgmon[max_frozen_age]'
|
||||
tags:
|
||||
- tag: Application
|
||||
value: PostgreSQL
|
||||
- uuid: de1fa757395440118026f4c7a7c4ebbe
|
||||
name: 'PostgreSQL latest supported version'
|
||||
type: DEPENDENT
|
||||
@ -109,14 +71,15 @@ zabbix_export:
|
||||
- tag: Application
|
||||
value: PostgreSQL
|
||||
- uuid: 8706eccb7edc4fa394f552fc31f401a9
|
||||
name: 'PostgreSQL ID Age Info'
|
||||
name: 'Max Frozen XID Age'
|
||||
type: HTTP_AGENT
|
||||
key: 'pgmon[max_frozen_age]'
|
||||
delay: 5m
|
||||
history: '0'
|
||||
value_type: TEXT
|
||||
trends: '0'
|
||||
description: 'Maximum age of any frozen XID and MXID in any database'
|
||||
history: 90d
|
||||
description: 'Maximum age of any frozen XID in any database'
|
||||
preprocessing:
|
||||
- type: MATCHES_REGEX
|
||||
parameters:
|
||||
- '^[0-9]+$'
|
||||
url: 'http://localhost:{$AGENT_PORT}/max_frozen_age'
|
||||
tags:
|
||||
- tag: Application
|
||||
|
||||
Loading…
Reference in New Issue
Block a user