}
if ($db->{error} =~ /FATAL/) {
+ ## If we are just trying to connect, this should be a normal error
+ if ($action eq 'connection') {
+ $info->{fatal} = 1;
+ return $info;
+ }
+
if (exists $arg->{fatalregex} and $db->{error} =~ /$arg->{fatalregex}/) {
$info->{fatalregex} = $db->{error};
next;
$db = $info->{db}[0];
+ if (exists $info->{fatal}) {
+ $MRTG and do_mrtg({one => 0});
+ add_critical $db->{error};
+ return;
+ }
+
my $ver = ($db->{slurp}[0]{v} =~ /(\d+\.\d+\S+)/o) ? $1 : '';
$MRTG and do_mrtg({one => $ver ? 1 : 0});
Fix problem when examining items in pg_settings (Greg Sabino Mullane)
+ For connection test, return critical, not unknown, on FATAL errors
+ (Greg Sabino Mullane, reported by Peter Eisentraut in bug #62)
+
=item B<Version 2.15.0>
Add --quiet argument to surpress output on OK Nagios results