Re: [monitoring-plugins/monitoring-plugin-perl] Add LONGOUTPUT parameter to plugin_exit (#9)

Paul Dugas <[email protected]> Thu, 31 Mar 2016 11:55:49 -0700
Newsgroups gmane.network.nagios.devel,gmane.network.monitoring.plugins.devel
Message-ID <monitoring-plugins/monitoring-plugin-perl/issues/9/[email protected]>
```
--- Functions.pm.orig	2016-03-31 14:50:52.295849074 -0400
+++ Functions.pm	2016-03-31 14:55:17.350834574 -0400
@@ -118,7 +118,10 @@

     # Setup output
     my $output = "$STATUS_TEXT{$code}";
-    $output .= " - $message" if defined $message && $message ne '';
+    if (defined $message && $message ne '') {
+      $output .= " - " unless $message =~ /^ *\n/;
+      $output .= $message;
+    }
     my $shortname = ($arg->{plugin} ? $arg->{plugin}->shortname : undef);
     $shortname ||= get_shortname(); # Should happen only if funnctions are called directly
     $output = "$shortname $output" if $shortname;
```

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/monitoring-plugins/monitoring-plugin-perl/issues/9#issuecomment-204077168