Date: Sun, 23 Feb 2014 22:13:35 +0000 (UTC) From: Matthew Seaman <matthew@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r345773 - in head/net-mgmt: . nagios-check_postgres Message-ID: <201402232213.s1NMDZJl059865@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: matthew Date: Sun Feb 23 22:13:34 2014 New Revision: 345773 URL: http://svnweb.freebsd.org/changeset/ports/345773 QAT: https://qat.redports.org/buildarchive/r345773/ Log: check_postgres.pl - a Postgres monitoring script for Nagios, MRTG, Cacti, and others check_postgres.pl is a Perl script that runs many different tests against one or more Postgres databases. It uses the psql program to gather the information, and outputs the results in one of three formats: Nagios, MRTG, or simple. WWW: http://bucardo.org/wiki/Check_postgres Submitted by: Matthew Seaman <matthew@FreeBSD.org> Added: head/net-mgmt/nagios-check_postgres/ head/net-mgmt/nagios-check_postgres/Makefile (contents, props changed) head/net-mgmt/nagios-check_postgres/distinfo (contents, props changed) head/net-mgmt/nagios-check_postgres/pkg-descr (contents, props changed) head/net-mgmt/nagios-check_postgres/pkg-plist (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Sun Feb 23 22:12:09 2014 (r345772) +++ head/net-mgmt/Makefile Sun Feb 23 22:13:34 2014 (r345773) @@ -126,6 +126,7 @@ SUBDIR += nagios-check_mysql_slave SUBDIR += nagios-check_netsnmp SUBDIR += nagios-check_ports + SUBDIR += nagios-check_postgres SUBDIR += nagios-check_puppet SUBDIR += nagios-check_smartmon SUBDIR += nagios-check_tftp Added: head/net-mgmt/nagios-check_postgres/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nagios-check_postgres/Makefile Sun Feb 23 22:13:34 2014 (r345773) @@ -0,0 +1,114 @@ +# Created by: Matthew Seaman <matthew@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= check_postgres +PORTVERSION= 2.21.0 +CATEGORIES= net-mgmt databases perl5 +MASTER_SITES= http://bucardo.org/downloads/ +PKGNAMEPREFIX= nagios- + +MAINTAINER= matthew@FreeBSD.org +COMMENT= Monitor various attributes of your PostgreSQL database + +LICENSE= BSD2CLAUSE + +NO_ARCH= yes + +USES= perl5 +USE_PERL5= configure +USE_PGSQL= yes + +# This script is primarily used for monitoring via Nagios, but it also +# has output styles compatible with cacti or mrtg. The options +# control whether symlinks get made to locations where those +# applications expect to find their plugin scripts. + +OPTIONS_DEFINE= NAGIOS CACTI +OPTIONS_DEFAULT= NAGIOS +OPTIONS_SUB= yes + +NAGIOS_DESC= Create symlinks in Nagios plugins dir +NAGIOS_PLUGINS= ${PREFIX}/libexec/nagios +NAGIOS_LINKS= archive_ready \ + autovac_freeze \ + backends \ + bloat \ + checkpoint \ + cluster_id \ + commitratio \ + connection \ + custom_query \ + database_size \ + disabled_triggers \ + disk_space \ + fsm_pages \ + fsm_relations \ + hitratio \ + hot_standby_delay \ + index_size \ + last_analyze \ + last_autoanalyze \ + last_autovacuum \ + last_vacuum \ + listener \ + locks \ + logfile \ + new_version_bc \ + new_version_box \ + new_version_cp \ + new_version_pg \ + new_version_tnm \ + pgagent_jobs \ + pgb_pool_cl_active \ + pgb_pool_cl_waiting \ + pgb_pool_maxwait \ + pgb_pool_sv_active \ + pgb_pool_sv_idle \ + pgb_pool_sv_login \ + pgb_pool_sv_tested \ + pgb_pool_sv_used \ + pgbouncer_backends \ + pgbouncer_checksum \ + prepared_txns \ + query_runtime \ + query_time \ + relation_size \ + replicate_row \ + same_schema \ + sequence \ + settings_checksum \ + slony_status \ + table_size \ + timesync \ + txn_idle \ + txn_time \ + txn_wraparound \ + version \ + wal_files + +CACTI_DESC= Create symlinks in Cacti scripts dir +CACTI_SCRIPTS= ${PREFIX}/share/cacti/scripts +CACTI_LINKS= dbstats + +.include <bsd.port.options.mk> + +post-install: +.if ${PORT_OPTIONS:MNAGIOS} + @${MKDIR} ${STAGEDIR}${NAGIOS_PLUGINS} +.for l in ${NAGIOS_LINKS} + ${LN} -s ../../bin/check_postgres.pl \ + ${STAGEDIR}${NAGIOS_PLUGINS}/check_postgres_${l} +.endfor +.endif +.if ${PORT_OPTIONS:MCACTI} + @${MKDIR} ${STAGEDIR}${CACTI_SCRIPTS} +.for l in ${CACTI_LINKS} + ${LN} -s ../../../bin/check_postgres.pl \ + ${STAGEDIR}/${CACTI_SCRIPTS}/check_postgresql_${l} +.endfor +.endif + +regression-test: build + @cd ${WRKSRC} && ${MAKE} test + +.include <bsd.port.mk> Added: head/net-mgmt/nagios-check_postgres/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nagios-check_postgres/distinfo Sun Feb 23 22:13:34 2014 (r345773) @@ -0,0 +1,2 @@ +SHA256 (check_postgres-2.21.0.tar.gz) = e0fdfe9c0d8188b6bb52896c87257a35311f5aea0f0e2ce332961be034314298 +SIZE (check_postgres-2.21.0.tar.gz) = 178511 Added: head/net-mgmt/nagios-check_postgres/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nagios-check_postgres/pkg-descr Sun Feb 23 22:13:34 2014 (r345773) @@ -0,0 +1,9 @@ +check_postgres.pl - a Postgres monitoring script for Nagios, MRTG, +Cacti, and others + +check_postgres.pl is a Perl script that runs many different tests +against one or more Postgres databases. It uses the psql program to +gather the information, and outputs the results in one of three +formats: Nagios, MRTG, or simple. + +WWW: http://bucardo.org/wiki/Check_postgres Added: head/net-mgmt/nagios-check_postgres/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nagios-check_postgres/pkg-plist Sun Feb 23 22:13:34 2014 (r345773) @@ -0,0 +1,64 @@ +bin/check_postgres.pl +%%SITE_PERL%%/%%PERL_ARCH%%/auto/check_postgres/.packlist +%%NAGIOS%%libexec/nagios/check_postgres_archive_ready +%%NAGIOS%%libexec/nagios/check_postgres_autovac_freeze +%%NAGIOS%%libexec/nagios/check_postgres_backends +%%NAGIOS%%libexec/nagios/check_postgres_bloat +%%NAGIOS%%libexec/nagios/check_postgres_checkpoint +%%NAGIOS%%libexec/nagios/check_postgres_cluster_id +%%NAGIOS%%libexec/nagios/check_postgres_commitratio +%%NAGIOS%%libexec/nagios/check_postgres_connection +%%NAGIOS%%libexec/nagios/check_postgres_custom_query +%%NAGIOS%%libexec/nagios/check_postgres_database_size +%%NAGIOS%%libexec/nagios/check_postgres_disabled_triggers +%%NAGIOS%%libexec/nagios/check_postgres_disk_space +%%NAGIOS%%libexec/nagios/check_postgres_fsm_pages +%%NAGIOS%%libexec/nagios/check_postgres_fsm_relations +%%NAGIOS%%libexec/nagios/check_postgres_hitratio +%%NAGIOS%%libexec/nagios/check_postgres_hot_standby_delay +%%NAGIOS%%libexec/nagios/check_postgres_index_size +%%NAGIOS%%libexec/nagios/check_postgres_last_analyze +%%NAGIOS%%libexec/nagios/check_postgres_last_autoanalyze +%%NAGIOS%%libexec/nagios/check_postgres_last_autovacuum +%%NAGIOS%%libexec/nagios/check_postgres_last_vacuum +%%NAGIOS%%libexec/nagios/check_postgres_listener +%%NAGIOS%%libexec/nagios/check_postgres_locks +%%NAGIOS%%libexec/nagios/check_postgres_logfile +%%NAGIOS%%libexec/nagios/check_postgres_new_version_bc +%%NAGIOS%%libexec/nagios/check_postgres_new_version_box +%%NAGIOS%%libexec/nagios/check_postgres_new_version_cp +%%NAGIOS%%libexec/nagios/check_postgres_new_version_pg +%%NAGIOS%%libexec/nagios/check_postgres_new_version_tnm +%%NAGIOS%%libexec/nagios/check_postgres_pgagent_jobs +%%NAGIOS%%libexec/nagios/check_postgres_pgb_pool_cl_active +%%NAGIOS%%libexec/nagios/check_postgres_pgb_pool_cl_waiting +%%NAGIOS%%libexec/nagios/check_postgres_pgb_pool_maxwait +%%NAGIOS%%libexec/nagios/check_postgres_pgb_pool_sv_active +%%NAGIOS%%libexec/nagios/check_postgres_pgb_pool_sv_idle +%%NAGIOS%%libexec/nagios/check_postgres_pgb_pool_sv_login +%%NAGIOS%%libexec/nagios/check_postgres_pgb_pool_sv_tested +%%NAGIOS%%libexec/nagios/check_postgres_pgb_pool_sv_used +%%NAGIOS%%libexec/nagios/check_postgres_pgbouncer_backends +%%NAGIOS%%libexec/nagios/check_postgres_pgbouncer_checksum +%%NAGIOS%%libexec/nagios/check_postgres_prepared_txns +%%NAGIOS%%libexec/nagios/check_postgres_query_runtime +%%NAGIOS%%libexec/nagios/check_postgres_query_time +%%NAGIOS%%libexec/nagios/check_postgres_relation_size +%%NAGIOS%%libexec/nagios/check_postgres_replicate_row +%%NAGIOS%%libexec/nagios/check_postgres_same_schema +%%NAGIOS%%libexec/nagios/check_postgres_sequence +%%NAGIOS%%libexec/nagios/check_postgres_settings_checksum +%%NAGIOS%%libexec/nagios/check_postgres_slony_status +%%NAGIOS%%libexec/nagios/check_postgres_table_size +%%NAGIOS%%libexec/nagios/check_postgres_timesync +%%NAGIOS%%libexec/nagios/check_postgres_txn_idle +%%NAGIOS%%libexec/nagios/check_postgres_txn_time +%%NAGIOS%%libexec/nagios/check_postgres_txn_wraparound +%%NAGIOS%%libexec/nagios/check_postgres_version +%%NAGIOS%%libexec/nagios/check_postgres_wal_files +man/man1/check_postgres.1p.gz +%%CACTI%%share/cacti/scripts/check_postgresql_dbstats +%%CACTI%%@dirrmtry share/cacti/scripts +%%CACTI%%@dirrmtry share/cacti +%%NAGIOS%%@dirrmtry libexec/nagios +@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/check_postgres
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402232213.s1NMDZJl059865>