[Nagiosplug-devel] Nagios::Plugin add_message(UNKNOWN, ...
Ton Voon
ton.voon at opsera.com
Thu Oct 8 11:27:54 CEST 2009
Hi Gerhard,
On 6 Oct 2009, at 17:09, Gerhard Lausser wrote:
> i'm just curious: why can't i buffer an error message with
> $plugin->add_message(UNKNOWN, "could not contact blabla...");
Not sure what you mean...
>
> Is nagios_die the way to go? But what if there is some work left
> (cleaning
> up temp files, closing a database connection cleanly,...) which
> needs to be
> done no matter what the exit code of the plugin will be? I
> personally don't
> like to abort a plugin like this.
Could you achieve this with an END { ... } block?
Ton
More information about the Devel
mailing list