summaryrefslogtreecommitdiff
path: root/check_postgres.pl
AgeCommit message (Collapse)Author
2016-12-30Clarify that only one action is run per invocation.HEADmasterChristoph Berg
The old wording could be interpreted as allowing several actions to be executed in parallel. Close #115.
2016-06-08txn_idle: Document that --includeuser can be used to work around superuser ↵Christoph Berg
checks Close #81.
2016-06-08connection: Make all errors including timeout from psql CRITICALChristoph Berg
UNKNOWN is not so much useful in the context of basic connection checks. (The result remains UNKNOWN in case version() returns something fishy.) Close #100.
2016-06-08Update query_time docs to match actual codeChristoph Berg
Close #63.
2016-06-08hot_standby_delay: Check server version instead of psql version for featuresChristoph Berg
In passing, make check_postgres.pl executable Close #74.
2016-06-07Add changelog for c09e7840ed82db6274116ce9b83fbdbc72f940c8.Christoph Berg
2016-06-07adjusting check_txn_idle filter by state_change columnSebastian Webber
2016-06-07Fix same_schema on 8.4Christoph Berg
2016-06-07Do some whitespace cleanupChristoph Berg
... and add a changelog entry for the same_schema fixes by Glyn.
2016-06-07Fix "--filter" logic to honour regular expressionsglynastill
As per the manual: "To exclude objects of a certain type by a regular expression against their name, use "noname=regex"." However the actual check in the script would only filter on an exact match; switched to regex.
2016-06-07Fix username field in check_txn_idle; broken when adding support for objects ↵glyn
owned by group roles in commit d55287f1064c615ce2b0eb3cc3e2f6261f8070c4
2016-06-07same_schema: constraint unit test include table name + reinstate sequence ↵glyn
last_value check. Fixes for changes made to same_schema in commit f8145cd902b2c1e01bc211bbfc04737c5fee79f9 * Amend constraint unit tests in t/02_same_schema.t to take into account we now return the table name * Reinstate checking of a sequences last_val, and instead allow users of asynchronous replication to override with '--assume-async' option
2016-06-07Fix same_schema check so it considers left and right operands when comparing ↵glynastill
operators.
2016-06-07Fix trigger check in check_same_schema to ignore deferrable unique ↵glynastill
constraint triggers These triggers have a name containting the triggers oid which mismatches on logical replicas; so to exclude these just ensure tgconstrindid is zero.
2016-06-07Fix typo: missing comma in commit 2e07159c2ecca1bd42950121ccb2f6fad762e30aglynastill
2016-06-07Fix same schema to treat pg_constraint.confmatchtype = 'u' = 's'glynastill
This relates to a change in the character representing a simple match on a foreign key stored in the confmatchtype field changing from 'u' to 's' between postgresql 9.2 and 9.3. Ref: http://www.postgresql.org/docs/9.2/static/catalog-pg-constraint.html http://www.postgresql.org/docs/9.3/static/catalog-pg-constraint.html
2016-06-07Fix USERWHERECLAUSE broken when changing pg_user references to pg_roleglynastill
2016-06-07Modify checks that return or rely on a user name to reference pg_roles ↵glynastill
rather than pg_user. This resolves issues where objects owned by a group role are missing in various checks (check_same_schema, check_commitratio, check_hitratio), or detail is missing (check_database_size), or results not filtered as intended (check_last_vacuum_analyze, check_relation_size). Conflicts: check_postgres.pl
2016-06-07Fix same_schema to ignore some non-logical schema based values:glynastill
operators - Use text descriptions for result type and operands; ignore related oids triggers - Include table name in key to prevent false positive when another table has a trigger with the same name. Use textual trigger definition; ignore tgqual represe functions - Use text function definition; ignore oid based types and defaults. constraints - Include table name in key to prevent false positive when another table has a constraint with the same name. Use text constraint definition; ignore oid based values. sequence - Ignore last_value; I'm confused as to why we'd want to know this on a schema check. But if required could be added back in with an optional filter instead. indexes - Ignore reltablespace oid; we check the tablespace name anyway. Ignore indkey attnum which can differ when tables have been altered differently but are otherwis
2016-06-05Add changelog entry for check_replication_slotsChristoph Berg
2016-06-03Add check_replication_slots check to check the delay on any replication slots.glyn
"Delay" is measured as size of transaction logs retained for the slot e.g: check_postgres_replication_slots -db=TEST -H=192.168.0.106 -warning=32M -critical=64M
2016-06-01Fix "values are not the same" error in replicate_row when repinfo value is a '0'glynastill
When check_replicate_row tested for valid values before starting the check, if the actual value returned was 0 it would evaluate to false, resulting in the error: "Cannot test replication: values are not the same" This is resolved by simply checking if the value is defined before assigning it's value a blank string instead.
2016-05-31Remove four more /o flagsChristoph Berg
2016-05-31removed 'o' modifier from regular expressionsMartin von Oertzen
http://stackoverflow.com/questions/550258/does-the-o-modifier-for-perl-regular-expressions-still-provide-any-benefit
2016-05-31Keep using pg_relation_size on 8.4 and earlierChristoph Berg
pg_indexes_size doesn't exist either on 8.4, but that action is new, so let's not care for now. Also fix t/05_docs.t for the newly added actions.
2016-05-31txn_idle: if seconds are -0, use 0Christoph Berg
Close: #75
2016-05-31Change table_size to use pg_table_size()Christoph Berg
Change table_size to use pg_table_size(), i.e. to include the TOAST table size in the numbers reported. Add new actions indexes_size and total_relation_size, using the respective pg_indexes_size() and pg_total_relation_size() functions. All size checks will now also check materialized views where applicable. Close: #32, #83
2016-05-26Add changelog entry for Correct extra space in perfdataChristoph Berg
Close #80
2016-05-26Correct extra space in perfdataAdrien nayrat
The extra space result in two spaces between the metrics and its incorrectly parse by centreon.
2016-05-26Add changelog entry for last commit, and close #72Christoph Berg
2016-05-26Don't fail when query contains 'disabled' wordMarco Nenciarini
If a query contains the disabled word (.e.g. select 1 as disabled) "check_postgres.pl --action txn_idle" exits with ```UNKNOWN: No queries - is stats_command_string or track_activities off?``` If you set track_activities to off, the status field contains 'disabled' (at least on 9.3)
2016-05-26Add changelog entries to close #99 and #106Christoph Berg
2016-05-26Call psql with option -XPeter Eisentraut
Starting in PostgreSQL 9.6, psql -c no longer implies -X, so it has to be added explicitly in order to avoid customizations in .psqlrc interfering with the output parsing.
2016-05-25Update URLs to www.postgresql.org to be httpsMagnus Hagander
The main PostgreSQL website is now https only. The versions.rss check still works by following the redirect, but it's more efficient to hit the https URL directly. In passing, also update all the direct links in the documentation to be https.
2015-12-15Add new argument, --audit-file-dir, to allow control of which directory the ↵Greg Sabino Mullane
same-schema action will use to store its files.
2015-11-02Add some minor casting to help with the bloat query.Greg Sabino Mullane
2015-07-17Add test for --action=wal_files --lsfuncChristoph Berg
2015-07-17Allow a wrapper function for wal_files and archive_ready as a non-superuser.Joshua Elsasser
The wrapper function around pg_ls_dir() must hardcode the pg_xlog or pgxlog/archive_status path, and should take no arguments. It must be created as a superuser with SECURITY DEFINER.
2015-07-17Fix hot_standby_delay against a log-shipping (non-streaming) replica.Joshua Elsasser
2015-07-16Remove duplicated 'es' sectionChristoph Berg
... and note author of last commit in changelog
2015-07-14Add complete spanish (es) message translationsLuis Vazquez
2015-06-30Let's releaseGreg Sabino Mullane
2015-06-30Bump version to 2.22.0Greg Sabino Mullane
2015-06-30Placeholders for French translation stringsGreg Sabino Mullane
2015-06-26SpellingGreg Sabino Mullane
2015-06-26Rearrange recent changes in rough priority orderGreg Sabino Mullane
2015-06-23Update release notes a bitGreg Sabino Mullane
2015-06-23Version bump.Greg Sabino Mullane
2015-05-27Remove tabs, cleanup whitespaceGreg Sabino Mullane
2015-05-08Bump copyrightGreg Sabino Mullane