I have googled for weeks now and all I am getting is the same results from frank4dd's notes on setting up perl script to produce alerts in Japanese. On the contrary I wish to ensure all my alerts come in English as primary language. What I am getting from Japanese-language-Windows-machine added into Nagios are garbled tickets in English and characters. So how do I ensure that all the alerts will be produced in English?
I have Nagios installed on Suse and this is my distro level:
my-mnag1:/usr/local/nagios/libexec # cat /proc/version
Linux version 2.6.32.12-0.7-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2010-05-20 11:14:20 +0200
whenever i execute the script i get this alert, i am not sure what to do! I am at my wits end trying to get this sorted out right
my-mnag0:/tmp # ./nagios_send_service_mail.pl
Can't locate Mail/Sendmail.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i586-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at ./nagios_send_service_mail.pl line 29.
BEGIN failed--compilation aborted at ./nagios_send_service_mail.pl line 29.
my-mnag0:/tmp # more nagios_send_service_mail.pl
#!/usr/bin/perl -w
#
# First we explicitly switch off the Nagios embbeded Perl Interpreter
# nagios: -epn
# ######################### nagios_send_service_mail.pl ############### #
# Date : Dec 31 2010 #
# Purpose : Script to send out Nagios service e-mails.\n"; #
# Author : Frank Migge (support at frank4dd dot com) #
# Help : http://nagios.frank4dd.com/howto #
# Licence : GPL - http://www.fsf.org/licenses/gpl.txt #
# Written for and verified with Nagios version 3.2.3 #
# Help : ./nagios_send_service_mail.pl -h #
# #
# Version : 1.0 initial release #
# Version : 1.1 add multipart MIME and logo #
# Version : 1.2 cleanup mail body generation code #
# Version : 1.3 use environment variables for Nagios data handoff #
# Version : 1.4 add the performance graph image if available #
# this has been implemented for Nagiosgraph v0.9.1 #
# #
# Depends : perl-Mail-Sendmail #
# perl-MIME-tools #
# rrdtool-devel #
# libnetpbm (if image conversion from PNG to JPG is required) #
# netpbm (if image conversion from PNG to JPG is required) #
# ##################################################################### #
#!/usr/bin/perl -w
use Getopt::Long;
use Mail::Sendmail;
use Digest::MD5 qw(md5_hex);
use MIME::Base64;
use RRDs;
use File::Temp;
use strict;
use warnings;
Finally, here's the alert in garbled language:
Date/Time : Fri Nov 25 08:33:52 MYT 2011
Hostname : S99A160
Hostadress : 10.17.16X.XXX
Hostgroup : OkiData ODC
Type : OKIdata JP1
Checkobject : OS:Windows:Eventlog:ApplicationJP1:Health:-
State : CRITICAL
Alert-Text : CRITICAL - (4 errors) - 2011-11-25T09:33:25 SRC:JP1/AJS2 ID:30262 MSG:KAVS0262-E ?W???u?l?b?g(AJSROOT1:/sap888/irreg/schc8_111125:@A1325)????I???????? ...
Alert-Text(ext.): tag evnt_app CRITICAL