diff options
author | Greg Sabino Mullane | 2009-09-24 18:37:19 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2009-09-24 18:37:19 +0000 |
commit | 29bb7a34f9fcbedc20cc6e0e88f1974203c27a52 (patch) | |
tree | c88dd97225673ce571cb0e93022cf3054f7cd97f /check_postgres.pl | |
parent | 5645f671d6fee095f7ead578057a70aab033ca57 (diff) |
For same_schema, show the matching table on trigger differences.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 4e723a16a..c00c2b9d7 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -29,7 +29,7 @@ $Data::Dumper::Varname = 'POSTGRES'; $Data::Dumper::Indent = 2; $Data::Dumper::Useqq = 1; -our $VERSION = '2.12.0'; +our $VERSION = '2.12.1'; use vars qw/ %opt $PSQL $res $COM $SQL $db /; @@ -5148,7 +5148,8 @@ SQL next TRIGGER1 if $name =~ /$exclude/; } - push @{$fail{triggers}{notexist}{1}} => $name; + my $tabname = $thing{1}{triggers}{$name}->{table}; + push @{$fail{triggers}{notexist}{1}} => [$name,$tabname]; $failcount++; } @@ -5161,7 +5162,8 @@ SQL next TRIGGER2 if $name =~ /$regex/; } } - push @{$fail{triggers}{notexist}{2}} => $name; + my $tabname = $thing{2}{triggers}{$name}->{table}; + push @{$fail{triggers}{notexist}{2}} => [$name,$tabname]; $failcount++; next; } @@ -5651,13 +5653,15 @@ SQL if (exists $fail{triggers}) { if (exists $fail{triggers}{notexist}) { if (exists $fail{triggers}{notexist}{1}) { - for my $name (@{$fail{triggers}{notexist}{1}}) { - $db->{perf} .= " Trigger in 1 but not 2: $name "; + for my $row (@{$fail{triggers}{notexist}{1}}) { + my ($name,$tabname) = @$row; + $db->{perf} .= " Trigger in 1 but not 2: $name (on $tabname) "; } } if (exists $fail{triggers}{notexist}{2}) { - for my $name (@{$fail{triggers}{notexist}{2}}) { - $db->{perf} .= " Trigger in 2 but not 1: $name "; + for my $row (@{$fail{triggers}{notexist}{2}}) { + my ($name,$tabname) = @$row; + $db->{perf} .= " Trigger in 2 but not 1: $name (on $tabname) "; } } } @@ -6435,7 +6439,7 @@ sub show_dbstats { B<check_postgres.pl> - a Postgres monitoring script for Nagios, MRTG, Cacti, and others -This documents describes check_postgres.pl version 2.12.0 +This documents describes check_postgres.pl version 2.12.1 =head1 SYNOPSIS @@ -7892,6 +7896,10 @@ Items not specifically attributed are by Greg Sabino Mullane. =over 4 +=item B<Version 2.12.1> + + For "same_schema" trigger mismatches, show the attached table. + =item B<Version 2.12.0> Add the new_version_bc check for Bucardo version checking. |