[Nagios-users] Antwort: UTF8 Japanese characters in macros
[EMAIL PROTECTED] schrieb am 18.10.2006 04:26:19: /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$ [SNIP] 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? I can't try the japanese UTF, but are you sure that /usr/bin/printf supports UTF8? Typing printf at the shell is not the same as using /usr/bin/printf. The bash built-in printf function is very different from the external executable and has caused lots of headaches to me already. It might be the source of your problem too. Sascha PS: This problem is one of the reasons I strongly discourage the current standard of how default notifications are generated... -- Sascha Runschke Netzwerk Management IT-Services ABIT AG Robert-Bosch-Str. 1 40668 Meerbusch Tel.:+49 (0) 2150.9153.226 Mobil:+49 (0) 173.5419665 mailto:[EMAIL PROTECTED] http://www.abit.net http://www.abit-epos.net - Sicherheitshinweis zur E-Mail Kommunikation / Security note regarding email communication: http://www.abit.net/sicherheitshinweis.html - 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
Re: [Nagios-users] Antwort: UTF8 Japanese characters in macros
[EMAIL PROTECTED] wrote on 18/10/2006 09:12:05: [EMAIL PROTECTED] schrieb am 18.10.2006 04:26:19: /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$ [SNIP] 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? I can't try the japanese UTF, but are you sure that /usr/bin/printf supports UTF8? Typing printf at the shell is not the same as using /usr/bin/printf. The bash built-in printf function is very different from the external executable and has caused lots of headaches to me already. It might be the source of your problem too. Sascha PS: This problem is one of the reasons I strongly discourage the current standard of how default notifications are generated... I am also totally against how the default mail action works, which is why I wrote a perl script to do the emailing a little more elegantly http://www.nagiosexchange.org/Utilities.16.0.html?tx_netnagext_pi1[p_view]=698 Cheers rob/mossko This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. ** BNP Paribas Private Bank London Branch is authorised by CECEI AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Securities Services London Branch is authorised by CECEI AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority - 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
Re: [Nagios-users] Antwort: UTF8 Japanese characters in macros
Sascha, Thanks for the reply. Yes, /usr/bin/printf works with the UTF8 strings I am trying to use. I have tried /bin/echo as well (which also has no problems from the command line) with the same results, so I think it is a problem with way the strings are stored in the macro. Martin [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb am 18.10.2006 04:26:19: /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$ [SNIP] 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? I can't try the japanese UTF, but are you sure that /usr/bin/printf supports UTF8? Typing printf at the shell is not the same as using /usr/bin/printf. The bash built-in printf function is very different from the external executable and has caused lots of headaches to me already. It might be the source of your problem too. Sascha PS: This problem is one of the reasons I strongly discourage the current standard of how default notifications are generated... -- Sascha Runschke Netzwerk Management IT-Services ABIT AG Robert-Bosch-Str. 1 40668 Meerbusch Tel.:+49 (0) 2150.9153.226 Mobil:+49 (0) 173.5419665 mailto:[EMAIL PROTECTED] http://www.abit.net http://www.abit-epos.net - Sicherheitshinweis zur E-Mail Kommunikation / Security note regarding email communication: http://www.abit.net/sicherheitshinweis.html - 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
Re: [Nagios-users] Antwort: UTF8 Japanese characters in macros
Rob, I tried your perl script, but unfortunately it suffers from the same problem. Any other help would be appreciated! Thanks, Martin [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote on 18/10/2006 09:12:05: [EMAIL PROTECTED] schrieb am 18.10.2006 04:26:19: /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$ [SNIP] 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? I can't try the japanese UTF, but are you sure that /usr/bin/printf supports UTF8? Typing printf at the shell is not the same as using /usr/bin/printf. The bash built-in printf function is very different from the external executable and has caused lots of headaches to me already. It might be the source of your problem too. Sascha PS: This problem is one of the reasons I strongly discourage the current standard of how default notifications are generated... I am also totally against how the default mail action works, which is why I wrote a perl script to do the emailing a little more elegantly http://www.nagiosexchange.org/Utilities.16.0.html?tx_netnagext_pi1[p_view]=698 Cheers rob/mossko This message and any attachments (the message) is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. ** BNP Paribas Private Bank London Branch is authorised by CECEI AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Securities Services London Branch is authorised by CECEI AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority - 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 - 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