Event messages in alert notifications via email display question mark (?) instead of proper character if original log file encoding does not match JBoss ON server

Solution Verified - Updated

Environment

  • Red Hat JBoss Operations Network (ON)
    • 3.2
    • 3.3.0
    • 3.3.1
    • 3.3.2
    • 3.3.3
    • 3.3.4
    • 3.3.5
    • 3.3.6
    • 3.3.7
    • 3.3.8
    • 3.3.9
    • 3.3.10
  • Event collection enabled
  • Monitored log file includes messages with non-ASCII or UTF-8 encoding or an encoding that is different then the JBoss ON server
  • Alert configured to send an email when event is collected

Issue

  • Problems with encoding;
  • We have a problem with the encoding of Alerts and Events;
  • When an alert template is applied to a message containing Russian characters (which are properly shown in the JBoss ON UI), they will be replaced in the received email with the ? characters;

Resolution

This issue was resolved in JBoss Operations Network 3.3 Update 11 and later. To resolve this issue you must upgrade or apply the latest maintenance update.

Root Cause

When the email body is generated which includes the alert details, the mime type is defined as text/plain but no character encoding is defined. This results in a system defined or default encoding being applied.

This issue was reported in This content is not included.Red Hat Bugzilla 1575920.

Diagnostic Steps

  • Execute the following query using an independent database tool:

      select * from rhq_event;
    
  • What is the system character encoding (locale)?

  • Use Email Test page from http://<jon_server_ip_address>:7080/coregui/#Test/ServerAccess/EmailTest to confirm that sent email is properly received (no "?" instead of Russian characters)

SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.