summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.org>2016-04-01 00:01:46 +0200
committerSven Nierlein <sven@nierlein.org>2016-04-01 00:01:46 +0200
commit471fef88ab046a055df95f607704557e07d56874 (patch)
tree5b1639eca0210ded0c5c168026db09e47cfb4e97 /lib
parent19ccd1dcb6a2ed0f13852118e988806792470782 (diff)
parent94bb1dec4d9c8fec5e4aa51f9f8969be3a11528e (diff)
downloadmonitoring-plugin-perl-471fef88ab046a055df95f607704557e07d56874.tar.gz
Merge pull request #10 from pdugas/master
Support LONGTEXT output
Diffstat (limited to 'lib')
-rw-r--r--lib/Monitoring/Plugin/Functions.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Monitoring/Plugin/Functions.pm b/lib/Monitoring/Plugin/Functions.pm
index 62bb14b..a19db49 100644
--- a/lib/Monitoring/Plugin/Functions.pm
+++ b/lib/Monitoring/Plugin/Functions.pm
@@ -118,7 +118,10 @@ sub plugin_exit {
118 118
119 # Setup output 119 # Setup output
120 my $output = "$STATUS_TEXT{$code}"; 120 my $output = "$STATUS_TEXT{$code}";
121 $output .= " - $message" if defined $message && $message ne ''; 121 if (defined $message && $message ne '') {
122 $output .= " - " unless $message =~ /^[ \f\r\t\w]*\n/;
123 $output .= $message;
124 }
122 my $shortname = ($arg->{plugin} ? $arg->{plugin}->shortname : undef); 125 my $shortname = ($arg->{plugin} ? $arg->{plugin}->shortname : undef);
123 $shortname ||= get_shortname(); # Should happen only if funnctions are called directly 126 $shortname ||= get_shortname(); # Should happen only if funnctions are called directly
124 $output = "$shortname $output" if $shortname; 127 $output = "$shortname $output" if $shortname;