import ports/net/nagios/check_postgres, ok pea@
check_postgres is a script for monitoring various attributes of your database (transaction id status, blocked queries, long running queries, connection status and more). It is designed to work with Nagios, MRTG, or in standalone scripts.
This commit is contained in:
parent
7bdced1b9d
commit
85c831b5fe
38
net/nagios/check_postgres/Makefile
Normal file
38
net/nagios/check_postgres/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2012/05/21 11:05:38 sthen Exp $
|
||||
|
||||
PKG_ARCH= *
|
||||
|
||||
COMMENT= Nagios plugin to monitor PostgresQL
|
||||
DISTNAME= check_postgres-2.19.0
|
||||
CATEGORIES= net databases
|
||||
|
||||
MAINTAINER= Stuart Henderson <sthen@openbsd.org>
|
||||
|
||||
HOMEPAGE= http://bucardo.org/wiki/Check_postgres
|
||||
MASTER_SITES= http://bucardo.org/downloads/
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MODULES= perl
|
||||
CONFIGURE_STYLE= perl
|
||||
|
||||
REGRESS_DEPENDS= ${RUN_DEPENDS} \
|
||||
databases/postgresql,-server
|
||||
|
||||
RUN_DEPENDS= databases/p5-DBD-Pg
|
||||
|
||||
pre-configure:
|
||||
@perl -pi -e 's,data space,data_space,g' ${WRKSRC}/t/CP_Testing.pm
|
||||
@${SUBST_CMD} ${WRKSRC}/check_postgres.pl
|
||||
|
||||
INSTDIR= ${PREFIX}/libexec/nagios/
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${INSTDIR}
|
||||
cd ${INSTDIR} && ${PREFIX}/bin/check_postgres.pl --symlinks
|
||||
|
||||
.include <bsd.port.mk>
|
5
net/nagios/check_postgres/distinfo
Normal file
5
net/nagios/check_postgres/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (check_postgres-2.19.0.tar.gz) = 3yLRhbfm/S2PW9+sNPPkWg==
|
||||
RMD160 (check_postgres-2.19.0.tar.gz) = M3EVPAkRh208/4+DgdxPlsKstWM=
|
||||
SHA1 (check_postgres-2.19.0.tar.gz) = BH3x0AZKNSZwR0qM/o5EwWUMCSE=
|
||||
SHA256 (check_postgres-2.19.0.tar.gz) = zf6cXpPY21Q1O6vY9c5LaUXPpV3q772a+Ms/v49HN1c=
|
||||
SIZE (check_postgres-2.19.0.tar.gz) = 165806
|
27
net/nagios/check_postgres/patches/patch-check_postgres_pl
Normal file
27
net/nagios/check_postgres/patches/patch-check_postgres_pl
Normal file
@ -0,0 +1,27 @@
|
||||
$OpenBSD: patch-check_postgres_pl,v 1.1.1.1 2012/05/21 11:05:38 sthen Exp $
|
||||
--- check_postgres.pl.orig Wed Jan 18 03:12:05 2012
|
||||
+++ check_postgres.pl Sat May 19 10:40:00 2012
|
||||
@@ -864,12 +864,9 @@ if (! $opt{'no-check_postgresrc'}) {
|
||||
elsif (-e "$ENV{HOME}/.check_postgresrc") {
|
||||
$rcfile = "$ENV{HOME}/.check_postgresrc";
|
||||
}
|
||||
- elsif (-e '/etc/check_postgresrc') {
|
||||
- $rcfile = '/etc/check_postgresrc';
|
||||
+ elsif (-e '${SYSCONFDIR}/check_postgresrc') {
|
||||
+ $rcfile = '${SYSCONFDIR}/check_postgresrc';
|
||||
}
|
||||
- elsif (-e '/usr/local/etc/check_postgresrc') {
|
||||
- $rcfile = '/usr/local/etc/check_postgresrc';
|
||||
- }
|
||||
}
|
||||
## We need a temporary hash so that multi-value options can be overridden on the command line
|
||||
my %tempopt;
|
||||
@@ -2034,7 +2031,7 @@ sub build_symlinks {
|
||||
next;
|
||||
}
|
||||
|
||||
- if (symlink $0, $file) {
|
||||
+ if (symlink '${TRUEPREFIX}/bin/check_postgres.pl', $file) {
|
||||
print msgn('symlink-create', $file);
|
||||
}
|
||||
else {
|
4
net/nagios/check_postgres/pkg/DESCR
Normal file
4
net/nagios/check_postgres/pkg/DESCR
Normal file
@ -0,0 +1,4 @@
|
||||
check_postgres is a script for monitoring various attributes of
|
||||
your database (transaction id status, blocked queries, long running
|
||||
queries, connection status and more). It is designed to work with
|
||||
Nagios, MRTG, or in standalone scripts.
|
60
net/nagios/check_postgres/pkg/PLIST
Normal file
60
net/nagios/check_postgres/pkg/PLIST
Normal file
@ -0,0 +1,60 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/05/21 11:05:38 sthen Exp $
|
||||
bin/check_postgres.pl
|
||||
libexec/nagios/
|
||||
libexec/nagios/check_postgres_archive_ready
|
||||
libexec/nagios/check_postgres_autovac_freeze
|
||||
libexec/nagios/check_postgres_backends
|
||||
libexec/nagios/check_postgres_bloat
|
||||
libexec/nagios/check_postgres_checkpoint
|
||||
libexec/nagios/check_postgres_cluster_id
|
||||
libexec/nagios/check_postgres_commitratio
|
||||
libexec/nagios/check_postgres_connection
|
||||
libexec/nagios/check_postgres_custom_query
|
||||
libexec/nagios/check_postgres_database_size
|
||||
libexec/nagios/check_postgres_dbstats
|
||||
libexec/nagios/check_postgres_disabled_triggers
|
||||
libexec/nagios/check_postgres_disk_space
|
||||
libexec/nagios/check_postgres_fsm_pages
|
||||
libexec/nagios/check_postgres_fsm_relations
|
||||
libexec/nagios/check_postgres_hitratio
|
||||
libexec/nagios/check_postgres_hot_standby_delay
|
||||
libexec/nagios/check_postgres_index_size
|
||||
libexec/nagios/check_postgres_last_analyze
|
||||
libexec/nagios/check_postgres_last_autoanalyze
|
||||
libexec/nagios/check_postgres_last_autovacuum
|
||||
libexec/nagios/check_postgres_last_vacuum
|
||||
libexec/nagios/check_postgres_listener
|
||||
libexec/nagios/check_postgres_locks
|
||||
libexec/nagios/check_postgres_logfile
|
||||
libexec/nagios/check_postgres_new_version_bc
|
||||
libexec/nagios/check_postgres_new_version_box
|
||||
libexec/nagios/check_postgres_new_version_cp
|
||||
libexec/nagios/check_postgres_new_version_pg
|
||||
libexec/nagios/check_postgres_new_version_tnm
|
||||
libexec/nagios/check_postgres_pgb_pool_cl_active
|
||||
libexec/nagios/check_postgres_pgb_pool_cl_waiting
|
||||
libexec/nagios/check_postgres_pgb_pool_maxwait
|
||||
libexec/nagios/check_postgres_pgb_pool_sv_active
|
||||
libexec/nagios/check_postgres_pgb_pool_sv_idle
|
||||
libexec/nagios/check_postgres_pgb_pool_sv_login
|
||||
libexec/nagios/check_postgres_pgb_pool_sv_tested
|
||||
libexec/nagios/check_postgres_pgb_pool_sv_used
|
||||
libexec/nagios/check_postgres_pgbouncer_backends
|
||||
libexec/nagios/check_postgres_pgbouncer_checksum
|
||||
libexec/nagios/check_postgres_prepared_txns
|
||||
libexec/nagios/check_postgres_query_runtime
|
||||
libexec/nagios/check_postgres_query_time
|
||||
libexec/nagios/check_postgres_relation_size
|
||||
libexec/nagios/check_postgres_replicate_row
|
||||
libexec/nagios/check_postgres_same_schema
|
||||
libexec/nagios/check_postgres_sequence
|
||||
libexec/nagios/check_postgres_settings_checksum
|
||||
libexec/nagios/check_postgres_slony_status
|
||||
libexec/nagios/check_postgres_table_size
|
||||
libexec/nagios/check_postgres_timesync
|
||||
libexec/nagios/check_postgres_txn_idle
|
||||
libexec/nagios/check_postgres_txn_time
|
||||
libexec/nagios/check_postgres_txn_wraparound
|
||||
libexec/nagios/check_postgres_version
|
||||
libexec/nagios/check_postgres_wal_files
|
||||
@man man/man3p/check_postgres.3
|
Loading…
Reference in New Issue
Block a user