Xymon Mailing List Archive search

Having problems with custom perl script for emails in alerts.cfg

list Steven Carr
Fri, 20 Apr 2012 16:14:15 +0100
Message-Id: <CALMep06e_oEemBBR-m1G4_L_4LXt-F=user-6ceac5c23ebe@xymon.invalid>

You need to install the Mime::Lite perl modules. The one you found with
locate is NetAddr::IP::Lite.

Assuming CentOS/RHEL with EPEL/rpmforge repositories enabled... "yum
install perl-MIME-Lite" should do the trick.

Steve


On 20 April 2012 16:05, Don Kuhlman <user-5eb2bfadc6c6@xymon.invalid> wrote:
 Hi folks. I have been working this week on trying to customize email
alerts coming from xymon to our support team.
I downloaded the html_Mail.pl script from the scripts pages.
I have been trying to get it to work via alerts.cfg but it's not.  When I
activiated it, I also noticed that other email alerts I had stopped coming.

 Here is a snip from alerts.cfg where I defined it:

 #Macro definitions for email
$SRMCUSTOM=SCRIPT /home/xymon/server/ext/html_mail.pl user-6a26eba8c2af@xymon.invalid=PLAIN

 If there are errors in the perl code, would this cause all of the other
email alerts not to work too or only this piece?
Where can I find the errors or logs that may be generated from this by the
alerts module?

 ======================
Here is the error I get when I try to run the html_mail.pl from a command
line on our xymon server (for testing):


 ./html_mail.pl
Can't locate MIME/Lite.pm in @INC (@INC contains:
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at
./html_mail.pl line 31.
BEGIN failed--compilation aborted at ./html_mail.pl line 31.

 locate Lite.pm

/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/NetAddr/IP/Lite.pm

 Line 31 contains:

 Use MIME::Lite;

 Thanks

 Don K