UTF8 Japanese characters in macros

チャンドラ mchandler at star.fielding.nec.co.jp
Wed Oct 18 04:26:19 CEST 2006


Hi,

I am running nagios 2.5 on SuSE 10.1, and I would like to include
japanese in my mail notifications.  SuSE is set up to use UTF8 as the
base language, and I am using the standard host-notify-by-email command
provided in the example configs as below:

/usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type:
$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\n$HOSTNOTES$\n\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for
$HOSTNAME$!" $CONTACTEMAIL$

note the use of $HOSTNOTES$, this is where I would like to include the
japanese location of the device having problems.

for example I have the following hostextinfo entry:

define hostextinfo{
host_name	mail
notes		[room name in japanese UTF8]
}

However, the mail arrives with an empty line where the notes information
should be.  If I include some english in the notes section, for example
"Location: [Japanese]" the mail contains "Location: ", but not the rest.

Both printf and mail work fine with UTF8 japanese, and tests using only
the $HOSTNOTES$ macro yeilds similar results (nothing output).
The CGI's work fine, and display the japanese, so it seems the macro
processing is not able to handle the characters.

Has anyone had similar problems, and is there a solution?

Thanks,
Martin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list