Skip to content

Commit 75af919

Browse files
authored
Merge branch 'bucardo:master' into master
2 parents dc47833 + 5ca1799 commit 75af919

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4733
-3057
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ test_database_check_postgres*
1414
cover_db/
1515
check_postgres-
1616
MYMETA.*
17+
/Vagrantfile
18+
.vagrant

.travis.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# run the check_postgres testsuite on travis-ci.com
2+
---
3+
# versions to run on
4+
env:
5+
- PGVERSION=13
6+
- PGVERSION=12
7+
- PGVERSION=11
8+
- PGVERSION=10
9+
- PGVERSION=9.6
10+
- PGVERSION=9.5
11+
- PGVERSION=9.4
12+
- PGVERSION=9.3
13+
14+
dist: focal
15+
sudo: required
16+
language: perl
17+
perl:
18+
- '5.30.0'
19+
- '5.14' # 5.14 is shipped with Ubuntu precise (12.04), also oldest version supported by Travis on focal
20+
21+
before_install:
22+
- sudo apt-get -qq update
23+
24+
install:
25+
- sudo apt-get install curl ca-certificates gnupg
26+
- curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
27+
- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
28+
- sudo apt-get update
29+
- sudo apt-get install postgresql-$PGVERSION
30+
- pg_lsclusters
31+
- dpkg -l postgresql\* | cat
32+
- printenv | sort
33+
34+
script:
35+
- rm -rf test_database_check_postgres*
36+
- perl Makefile.PL
37+
- cpanm --quiet --installdeps --notest .
38+
- PGBINDIR=/usr/lib/postgresql/$PGVERSION/bin make test TEST_VERBOSE=1
39+
40+
after_script:
41+
- tail -n 200 test_database_check_postgres*/pg.log

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright 2007 - 2021 Greg Sabino Mullane
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are met:
5+
6+
1. Redistributions of source code must retain the above copyright notice,
7+
this list of conditions and the following disclaimer.
8+
2. Redistributions in binary form must reproduce the above copyright notice,
9+
this list of conditions and the following disclaimer in the documentation
10+
and/or other materials provided with the distribution.
11+
12+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
13+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
15+
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
16+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
17+
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
18+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
19+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
20+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
21+
OF SUCH DAMAGE.

MANIFEST

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
check_postgres.pl
22
check_postgres.pl.asc
33
check_postgres.pl.html
4-
README
4+
LICENSE
5+
README.md
56
SIGNATURE
67
Makefile.PL
78
MANIFEST
89
MANIFEST.SKIP
910
perlcriticrc
1011
META.yml
12+
MYMETA.json
1113
MYMETA.yml
1214
TODO
1315

1416
t/00_basic.t
17+
t/00_release.t
1518
t/00_signature.t
1619
t/00_test_tester.t
1720
t/01_validate_range.t
@@ -47,6 +50,7 @@ t/02_query_runtime.t
4750
t/02_query_time.t
4851
t/02_relation_size.t
4952
t/02_replicate_row.t
53+
t/02_replication_slots.t
5054
t/02_same_schema.t
5155
t/02_sequence.t
5256
t/02_settings_checksum.t
@@ -61,4 +65,7 @@ t/03_translations.t
6165
t/04_timeout.t
6266
t/05_docs.t
6367
t/99_cleanup.t
68+
t/99_perlcritic.t
69+
t/99_pod.t
70+
t/99_spellcheck.t
6471
t/CP_Testing.pm

MANIFEST.SKIP

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ t/99_perlcritic.t
1616
t/99_pod.t
1717
t/00_release.t
1818
t/99_spellcheck.t
19+
.travis.yml
1920
README.dev
2021
.check_postgresrc
2122
^blame

META.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
--- #YAML:1.0
22
name : check_postgres.pl
3-
version : 2.21.0
3+
version : 2.25.0
44
abstract : Postgres monitoring script
55
author:
6-
- Greg Sabino Mullane <greg@endpoint.com>
6+
- Greg Sabino Mullane <greg@turnstep.com>
77

88
license : bsd
99
distribution_type : script
1010
dynamic_config : 0
1111

1212
requires:
13-
perl : 5.006001
13+
perl : 5.008
1414
build_requires:
1515
Test::More : 0.61
1616
recommends:
@@ -30,7 +30,7 @@ recommends:
3030
provides:
3131
check_postgres:
3232
file : check_postgres.pl
33-
version : 2.21.0
33+
version : 2.25.0
3434

3535
keywords:
3636
- Postgres

Makefile.PL

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use ExtUtils::MakeMaker qw/WriteMakefile/;
44
use Config;
55
use strict;
66
use warnings;
7-
use 5.006001;
7+
use 5.008;
88

9-
my $VERSION = '2.21.0';
9+
my $VERSION = '2.25.0';
1010

1111
if ($VERSION =~ /_/) {
1212
print "WARNING! This is a test version ($VERSION) and should not be used in production!\n";
@@ -54,9 +54,9 @@ print "Configuring check_postgres $VERSION\n";
5454
my %opts = (
5555
NAME => 'check_postgres',
5656
ABSTRACT => 'Postgres monitoring script',
57-
AUTHOR => 'Greg Sabino Mullane <greg@endpoint.com>',
57+
AUTHOR => 'Greg Sabino Mullane <greg@turnstep.com>',
5858
PREREQ_PM => {
59-
'ExtUtils::MakeMaker' => '6.11',
59+
'ExtUtils::MakeMaker' => '6.64',
6060
'Test::More' => '0.61',
6161
'version' => '0',
6262
},
@@ -67,6 +67,11 @@ my %opts = (
6767
NEEDS_LINKING => 0,
6868
NORECURS => 1,
6969
PM => {},
70+
TEST_REQUIRES => {
71+
'DBD::Pg' => '2.0',
72+
'DBI' => '1.51',
73+
'Date::Parse' => '0',
74+
},
7075
clean => { FILES => join ' ' => @cleanfiles },
7176
);
7277

README.dev

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,23 @@ For testing PostgreSQL 9.2 and later, DBD::Pg 2.19.3 is required.
88

99
Running the testsuite:
1010

11+
* env -i make test
1112
* LC_ALL=C make test
1213
* initdb and friends not in $PATH: LC_ALL=C make test PGBINDIR=/usr/lib/postgresql/9.2/bin
1314
* Run a single test: LC_ALL=C make test TEST_FILES=t/02_database_size.t
1415
* Skip network tests: LC_ALL=C make test SKIP_NETWORK_TESTS=1
1516

17+
The testsuite is sensitive to locale and PG environment variables such as LANG
18+
and PGDATABASE. Using `env -i` will unset all variables from the user
19+
environment for running the tests.
20+
1621
** RELEASE PROCESS **
1722

1823
Quick notes on the current release process:
1924

2025
* Make sure all changes are recorded in the relevant POD section.
2126
* Add a release date next to the new version number
22-
* Change the version number everywhere (use prove -v t/00_release.t to verify)
27+
* Change the version number everywhere (use `RELEASE_TESTING=1 prove -v t/00_release.t` to verify)
2328
* git commit as needed
2429
* Run: perl Makefile.PL; make html
2530
* Run: make signature_asc
@@ -47,7 +52,7 @@ Login to the bucardo.org box, and then:
4752
* edit latest_version.txt
4853
* edit index.html
4954

50-
* Edit the bucardo.org page and bump the version: http://bucardo.org/wiki/Check_postgres
55+
* Edit the bucardo.org page and bump the version: http://bucardo.org/check_postgres
5156

5257
* Email to check_postgres-announce with summary of changes
5358

README renamed to README.md

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,102 @@
1-
check_postgres is Copyright (C) 2007-2013, Greg Sabino Mullane
1+
check_postgres
2+
==============
3+
4+
[![Build Status](https://travis-ci.com/bucardo/check_postgres.svg?branch=master)](https://travis-ci.com/bucardo/check_postgres)
25

36
This is check_postgres, a monitoring tool for Postgres.
47

58
The most complete and up to date information about this script can be found at:
69

7-
http://bucardo.org/check_postgres/
8-
9-
You should go check there right now to make sure you are installing
10-
the latest version!
10+
https://bucardo.org/check_postgres/
1111

1212
This document will cover how to install the script.
1313

14-
* Quick method:
14+
Quick method
15+
------------
1516

16-
For the impatient Nagios admin, just copy the "check_postgres.pl" file
17-
to your Nagios scripts directory, and perhaps symlink entries to that
17+
For the impatient Nagios admin, just copy the "check_postgres.pl" file
18+
to your Nagios scripts directory, and perhaps symlink entries to that
1819
file by:
1920

20-
cd <the directory you just copied the file to>
21-
mkdir postgres
22-
cd postgres
23-
perl ../check_postgres.pl --symlinks
21+
cd <the directory you just copied the file to>
22+
mkdir postgres
23+
cd postgres
24+
perl ../check_postgres.pl --symlinks
2425

2526
Then join the announce mailing list (see below)
2627

27-
28-
* Complete method:
28+
Complete method
29+
---------------
2930

3031
The better way to install this script is via the standard Perl process:
3132

32-
perl Makefile.PL
33-
make
34-
make test
35-
make install
33+
perl Makefile.PL
34+
make
35+
env -i make test
36+
make install
3637

37-
The last step usually needs to be done as the root user. You may want to
38-
copy the script to a place that makes more sense for Nagios, if using it
38+
The last step usually needs to be done as the root user. You may want to
39+
copy the script to a place that makes more sense for Nagios, if using it
3940
for that purpose. See the "Quick" instructions above.
4041

41-
For 'make test', please report any failing tests to check_postgres@bucardo.org.
42-
The tests need to have some standard Postgres binaries available, such as
43-
'initdb', 'psql', and 'pg_ctl'. If these are not in your path, or you want to
44-
use specific ones, please set the environment variable PGBINDIR first.
42+
For `make test`, please report any failing tests to check_postgres@bucardo.org.
43+
The tests need to have some standard Postgres binaries available, such as
44+
`initdb`, `psql`, and `pg_ctl`. If these are not in your path, or you want to
45+
use specific ones, please set the environment variable `PGBINDIR` first. More
46+
details on running the testsuite are available in `README.dev`.
4547

46-
Once 'make install' has been done, you should have access to the complete
48+
Once `make install` has been done, you should have access to the complete
4749
documentation by typing:
4850

49-
man check_postgres
51+
man check_postgres
5052

5153
The HTML version of the documentation is also available at:
5254

53-
http://bucardo.org/check_postgres/check_postgres.pl.html
55+
https://bucardo.org/check_postgres/check_postgres.pl.html
5456

55-
* Mailing lists
57+
Mailing lists
58+
-------------
5659

57-
The final step should be to subscribe to the low volume check_postgres-announce
58-
mailing list, so you learn of new versions and important changes. Information
60+
The final step should be to subscribe to the low volume check_postgres-announce
61+
mailing list, so you learn of new versions and important changes. Information
5962
on joining can be found at:
6063

6164
https://mail.endcrypt.com/mailman/listinfo/check_postgres-announce
6265

63-
General questions and development issues are discussed on the check_postgres list,
66+
General questions and development issues are discussed on the check_postgres list,
6467
which we recommend people join as well:
6568

6669
https://mail.endcrypt.com/mailman/listinfo/check_postgres
6770

6871
Development happens via git. You can check out the repository by doing:
6972

70-
git clone git://bucardo.org/check_postgres.git
71-
72-
All changes are sent to the commit list:
73-
74-
https://mail.endcrypt.com/mailman/listinfo/check_postgres-commit
75-
76-
COPYRIGHT:
77-
----------
73+
https://github.com/bucardo/check_postgres
74+
git clone https://github.com/bucardo/check_postgres.git
7875

79-
Copyright (c) 2007-2013 Greg Sabino Mullane
76+
COPYRIGHT
77+
---------
8078

79+
Copyright 2007 - 2021 Greg Sabino Mullane
8180

82-
LICENSE INFORMATION:
83-
--------------------
81+
LICENSE INFORMATION
82+
-------------------
8483

85-
Redistribution and use in source and binary forms, with or without
84+
Redistribution and use in source and binary forms, with or without
8685
modification, are permitted provided that the following conditions are met:
8786

88-
1. Redistributions of source code must retain the above copyright notice,
87+
1. Redistributions of source code must retain the above copyright notice,
8988
this list of conditions and the following disclaimer.
90-
2. Redistributions in binary form must reproduce the above copyright notice,
91-
this list of conditions and the following disclaimer in the documentation
89+
2. Redistributions in binary form must reproduce the above copyright notice,
90+
this list of conditions and the following disclaimer in the documentation
9291
and/or other materials provided with the distribution.
9392

94-
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
95-
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
96-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
93+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
94+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
95+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
9796
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
98-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
99-
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
100-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
101-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
102-
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
97+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
98+
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
99+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
100+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
101+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
103102
OF SUCH DAMAGE.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy