Skip to content

Add support to exclude by application name on txn_* checks #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
When running --action bloat, indexes names are not fully qualified so…
… it's

hard, or imposible to know which index is bloated if there are indexes
with the same name in different schemas.

Here we add the schema to the bloat message when finding bloat in indexes.
  • Loading branch information
martinmarques committed Jun 4, 2015
commit d039829f0bb9c43853c856cfe443a2f8e0c3f81f
8 changes: 4 additions & 4 deletions check_postgres.pl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ package check_postgres;
'backends-oknone' => q{No connections},
'backends-po' => q{sorry, too many clients already},
'backends-users' => q{$1 for number of users must be a number or percentage},
'bloat-index' => q{(db $1) index $2 rows:$3 pages:$4 shouldbe:$5 ($6X) wasted bytes:$7 ($8)},
'bloat-index' => q{(db $1) index $2.$3 rows:$4 pages:$5 shouldbe:$6 ($7X) wasted bytes:$8 ($9)},
'bloat-nomin' => q{no relations meet the minimum bloat criteria},
'bloat-table' => q{(db $1) table $2.$3 rows:$4 pages:$5 shouldbe:$6 ($7X) wasted size:$8 ($9)},
'bug-report' => q{Please report these details to check_postgres@bucardo.org:},
Expand Down Expand Up @@ -3755,14 +3755,14 @@ sub check_bloat {

## Now the index, if it exists
if ($index ne '?') {
my $nicename = perfname($index);
my $nicename = perfname("$schema.$index");
$perf{$iwb}{$nicename}++;
my $msg = msg('bloat-index', $dbname, $index, $irows, $ipages, $iotta, $ibloat, $iwb, $iws);
my $msg = msg('bloat-index', $dbname, $schema, $index, $irows, $ipages, $iotta, $ibloat, $iwb, $iws);
my $ok = 1;
my $iperbloat = $ibloat * 100;

if ($MRTG) {
$stats{index}{"DB=$dbname INDEX=$index"} = [$iwb, $ibloat];
$stats{index}{"DB=$dbname INDEX=$schema.$index"} = [$iwb, $ibloat];
next;
}
if ($critical->($iwb, $iperbloat)) {
Expand Down
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