pmu has asked for the wisdom of the Perl Monks concerning the following question:
Respected Monks,
I have written a script that logs into some storage arrays and sends out an e-mail which has a text file attachment containing the monitoring/health check outputs. At times, the script cannot completely run because it cannot access the storage arrays (when there are network issues) and when run from the command prompt in such situations, it will promptly "die". I am looking for ways to capture the "die" output in a mail so that my team would know something went wrong. As of now, either it sends the report or in case of network issues wherein it cannot access the storage arrays, the script just dies, and no mail is sent.
I am using MIME::Lite to get the e-mailing of the reports done and it works right. But is there a way to send the output of "die" to a file/e-mail?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to send the "die" output to e-mail.
by hippo (Archbishop) on Nov 20, 2013 at 18:52 UTC | |
Re: How to send the "die" output to e-mail.
by boftx (Deacon) on Nov 20, 2013 at 19:17 UTC | |
Re: How to send the "die" output to e-mail.
by taint (Chaplain) on Nov 20, 2013 at 20:19 UTC | |
Re: How to send the "die" output to e-mail.
by pmu (Beadle) on Nov 21, 2013 at 06:54 UTC |