projects
/
check_postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22a8d79
)
Flatten error messages for Nagios one-line 'unknown' output.
author
Greg Sabino Mullane
<greg@endpoint.com>
Sun, 28 Sep 2008 21:10:16 +0000
(17:10 -0400)
committer
Greg Sabino Mullane
<greg@endpoint.com>
Sun, 28 Sep 2008 21:10:16 +0000
(17:10 -0400)
Avoid pipes in unknown messages if showperf is true.
check_postgres.pl
patch
|
blob
|
blame
|
history
diff --git
a/check_postgres.pl
b/check_postgres.pl
index 9599eeb4985930746b35d2582d0d3a7e27fb2cfb..96670ab934b6eedc58bbb6ac43dc3bfd7e8f5d27 100755
(executable)
--- a/
check_postgres.pl
+++ b/
check_postgres.pl
@@
-351,6
+351,8
@@
sub add_response {
sub add_unknown {
my $msg = shift || $db->{error};
+ $msg =~ s/[\r\n]\s*/\\n /g;
+ $msg =~ s/\|/<PIPE>/g if $opt{showperf};
add_response \%unknown, $msg;
}
sub add_critical {