- Update to 2.23.0:

+ added support for PostgreSQL 10
  + Change table_size to use pg_table_size() on 9.0+
  + Connection errors are now always critical, not unknown
  + New action replication_slots checking if logical or physical 
    replication slots have accumulated too much data
  + Multiple same_schema improvements
  + Add Spanish message translations
  + Allow a wrapper function to run wal_files and archive_ready 
    actions as non-superuser
  + Add some defensive casting to the bloat query
  + Invoke psql with option -X
  + check_txn_idle: Don't fail when query contains 'disabled' word
  + check_txn_idle: Use state_change instead of query_start.
  + check_hot_standby_delay: Correct extra space in perfdata
  + Remove \r from psql output as it can confuse some regexes
  + Sort failed jobs in check_pgagent_jobs for stable output
- run spec cleaner
- use %%license for newer distributions

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/check_postgres?expand=0&rev=15
This commit is contained in:
Lars Vogdt 2018-03-21 12:32:29 +00:00 committed by Git OBS Bridge
parent 9fa61063b0
commit 6bb0a0f82d
4 changed files with 77 additions and 58 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:29cd8ea0a0c0fcd79a1e6afb3f5a1d662c1658eef207ea89276ddb30121b85a8
size 180992

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:93cdbe92bb451525219b131a6810d9da0525000f6795160f70751b105c858615
size 200985

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Wed Mar 21 10:43:56 UTC 2018 - lars@linux-schulserver.de
- Update to 2.23.0:
+ added support for PostgreSQL 10
+ Change table_size to use pg_table_size() on 9.0+
+ Connection errors are now always critical, not unknown
+ New action replication_slots checking if logical or physical
replication slots have accumulated too much data
+ Multiple same_schema improvements
+ Add Spanish message translations
+ Allow a wrapper function to run wal_files and archive_ready
actions as non-superuser
+ Add some defensive casting to the bloat query
+ Invoke psql with option -X
+ check_txn_idle: Don't fail when query contains 'disabled' word
+ check_txn_idle: Use state_change instead of query_start.
+ check_hot_standby_delay: Correct extra space in perfdata
+ Remove \r from psql output as it can confuse some regexes
+ Sort failed jobs in check_pgagent_jobs for stable output
- run spec cleaner
- use %%license for newer distributions
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Mar 18 01:38:02 UTC 2017 - aj@ajaissle.de Sat Mar 18 01:38:02 UTC 2017 - aj@ajaissle.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package check_postgres # spec file for package check_postgres
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,56 +17,52 @@
Name: check_postgres Name: check_postgres
Summary: Postgres monitoring script Version: 2.23.0
Version: 2.22.0
Release: 0 Release: 0
Url: http://bucardo.org/wiki/Check_postgres Summary: Postgres monitoring script
License: GPL-2.0+ License: GPL-2.0+
Group: System/Monitoring Group: System/Monitoring
Source0: http://bucardo.org/downloads/%{name}-%{version}.tar.gz Url: http://bucardo.org/wiki/Check_postgres
# https://github.com/bucardo/check_postgres/releases
Source0: %{name}-%{version}.tar.gz
Source1: nagios-commands-postgres.cfg Source1: nagios-commands-postgres.cfg
Source2: create_manpage.pl Source2: create_manpage.pl
Requires: postgresql
BuildRequires: nagios-rpm-macros BuildRequires: nagios-rpm-macros
BuildRequires: perl-macros BuildRequires: perl-macros
BuildRequires: perl(Cwd)
BuildRequires: perl(DBD::Pg) BuildRequires: perl(DBD::Pg)
BuildRequires: perl(DBI) BuildRequires: perl(DBI)
BuildRequires: perl(Data::Dumper) BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Date::Parse)
BuildRequires: perl(Digest::MD5)
BuildRequires: perl(File::Basename) BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Temp) BuildRequires: perl(File::Temp)
BuildRequires: perl(Cwd)
BuildRequires: perl(Getopt::Long) BuildRequires: perl(Getopt::Long)
BuildRequires: perl(Time::HiRes)
BuildRequires: perl(Digest::MD5)
BuildRequires: perl(Date::Parse)
BuildRequires: perl(Pod::Man) BuildRequires: perl(Pod::Man)
BuildRequires: perl(Time::HiRes)
Requires: perl = %{perl_version} Requires: perl = %{perl_version}
Requires: postgresql
Requires: perl(Cwd)
Requires: perl(Data::Dumper) Requires: perl(Data::Dumper)
Requires: perl(File::Basename) Requires: perl(File::Basename)
Requires: perl(File::Temp) Requires: perl(File::Temp)
Requires: perl(Cwd)
Requires: perl(Getopt::Long) Requires: perl(Getopt::Long)
Requires: perl(Time::HiRes) Requires: perl(Time::HiRes)
Recommends: perl(Digest::MD5)
Recommends: perl(Date::Parse)
Recommends: coreutils Recommends: coreutils
Recommends: util-linux Recommends: util-linux
Recommends: perl(Date::Parse)
Recommends: perl(Digest::MD5)
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
check_postgres.pl is a Perl script that runs many different tests against one 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, 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. and outputs the results in one of three formats: Nagios, MRTG, or simple.
Author:
-------
Greg Sabino Mullane <greg@endpoint.com>
%package -n monitoring-plugins-postgres %package -n monitoring-plugins-postgres
Summary: Postgres monitoring script using check_postgres.pl Summary: Postgres monitoring script using check_postgres.pl
Group: System/Monitoring Group: System/Monitoring
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: %{name} = %{version} PreReq: %{name} = %{version}
Provides: nagios-plugins-postgres = %{version}-%{release} Provides: nagios-plugins-postgres = %{version}-%{release}
Obsoletes: nagios-plugins-postgres < %{version}-%{release} Obsoletes: nagios-plugins-postgres < %{version}-%{release}
@ -77,20 +73,20 @@ monitoring plugins way.
%prep %prep
%setup -q %setup -q
%{__install} -m 0644 %SOURCE1 nagios-commands-postgres.cfg install -m 0644 %{SOURCE1} nagios-commands-postgres.cfg
%build %build
perl Makefile.PL perl Makefile.PL
make %{?jobs:-j%jobs} make %{?_smp_mflags}
%install %install
# install the module # install the module
%perl_make_install %perl_make_install
# do not perl_process_packlist (noarch) # do not perl_process_packlist (noarch)
# remove .packlist file # remove .packlist file
%{__rm} -rf %{buildroot}%perl_vendorarch rm -rf %{buildroot}%{perl_vendorarch}
# remove perllocal.pod file # remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib rm -rf %{buildroot}%{perl_archlib}
%perl_gen_filelist %perl_gen_filelist
# create symlinks for monitoring-plugins-postgres package # create symlinks for monitoring-plugins-postgres package
mkdir -p %{buildroot}%{nagios_plugindir} mkdir -p %{buildroot}%{nagios_plugindir}
@ -98,24 +94,24 @@ pushd %{buildroot}%{nagios_plugindir}
%{buildroot}%{_bindir}/check_postgres.pl --symlinks %{buildroot}%{_bindir}/check_postgres.pl --symlinks
# fix symlinks, as they point to the buildroot # fix symlinks, as they point to the buildroot
for link in *; do for link in *; do
rm $link rm "$link"
ln -s %{_bindir}/check_postgres.pl $link ln -s "%{_bindir}/check_postgres.pl" "$link"
done done
popd popd
# create man page # create man page
mkdir -p %{buildroot}/%{_mandir}/man1 mkdir -p %{buildroot}/%{_mandir}/man1
perl %{SOURCE2} "%{version}" "1" check_postgres.pl > %{buildroot}/%{_mandir}/man1/check_postgres.pl.1 perl %{SOURCE2} "%{version}" "1" check_postgres.pl > %{buildroot}/%{_mandir}/man1/check_postgres.pl.1
%clean
rm -rf %buildroot
%files -f %{name}.files %files -f %{name}.files
%defattr(-,root,root) %doc MANIFEST README* TODO nagios-commands-postgres.cfg check_postgres.pl.html
%doc MANIFEST README TODO nagios-commands-postgres.cfg check_postgres.pl.html %if 0%{?suse_version} > 1315
%license LICENSE
%else
%doc LICENSE
%endif
%{_mandir}/man1/check_postgres.pl.1* %{_mandir}/man1/check_postgres.pl.1*
%files -n monitoring-plugins-postgres %files -n monitoring-plugins-postgres
%defattr(-,root,root)
# avoid build dependecy of nagios - own the dirs # avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir} %dir %{nagios_libdir}
%dir %{nagios_plugindir} %dir %{nagios_plugindir}