Re: [Nagios-users] UTF8 Japanese characters in macros

2006-11-13 Thread Andreas Ericsson
チャンドラ wrote:
 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?
 

Certain characters are blocked from being output by Nagios when it 
executes commands. One way to work around it once and for all would be 
to teach it to grok a command-line properly and exec() all external 
commands instead of using the shell (via popen()). Because this is 
pretty intrusive and any bugs will have big impact on the core of how 
Nagios works patches should be tested and re-tested before being sent in.

-- 
Andreas Ericsson   [EMAIL PROTECTED]
OP5 AB www.op5.se
Tel: +46 8-230225  Fax: +46 8-230231

-
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=lnkkid=120709bid=263057dat=121642
___
Nagios-users mailing list
Nagios-users@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

[Nagios-users] UTF8 Japanese characters in macros

2006-10-17 Thread チャンドラ
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=lnkkid=120709bid=263057dat=121642
___
Nagios-users mailing list
Nagios-users@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