K Manually Specify Time Zone and Character Encoding for Files

You can manually specify the properties for the log files by editing the configuration properties in the agent installation folder.

You can perform this task for all the logs except the Windows events.

  1. If you want to apply the properties on specific patterns and / or log sources, then make a note of the pattern ID and the log source ID. Open the config xml file under the agent installation folder agent_inst/sysman/ApplicationsState/loganalytics/logrules_os_file.xml .

    • Pattern ID example: <Pattern id="495071102827757094" name="/tmp/w*.mgr" include="true">
    • Log Source ID example: <LogSource id="-2574377491167724513" name="SS Concurrent Manager Logs" sourceType="os_file"/>
  2. Edit the properties file emd.properties in the location agent_inst/sysman/config/emd.properties and add the following property to override the default configuration of Oracle Log Analytics:

    loganalytics.src.override_config=true
        
  3. Specify the time zone tz and character encoding enc properties in the file emd.properties by selecting from one of the following examples:

    Note:

    For the supported encoding values, see Supported Encodings in Java Documentation. Use the names listed under the column Canonical Name for java.nio API.

    • Apply the properties for all the sources and patterns:

      loganalytics.src.addl_src_ptn_configs=tz=UTC,enc=EUC-JP
    • Apply the properties only for specific log sources:

      loganalytics.src.addl_src_ptn_configs=srcid=-2574377491167724513,tz=UTC,enc=EUC-JP;srcid=-2574377491167724512,enc=UTF-8

      In this example, the time zone UTC and character encoding EUC-JP properties are applied for log source -2574377491167724513, and character encoding property UTF-8 is applied for log source -2574377491167724512.

    • Apply the properties only for specific patterns:

      loganalytics.src.addl_src_ptn_configs=ptnid=495071102827757094,tz=UTC,enc=EUC-JP;ptnid=495071102827757095,enc=UTF-8

      In this example, the time zone UTC and character encoding EUC-JP properties are applied for pattern 495071102827757094, and character encoding property UTF-8 is applied for pattern 495071102827757095.

    • Apply the properties only for a combination of specific patterns and log sources:

      loganalytics.src.addl_src_ptn_configs=srcid=-2574377491167724513,ptnid=495071102827757094,tz=UTC,enc=EUC-JP;srcid=-2574377491167724513,ptnid=495071102827757095,enc=UTF-8

      In this example, the time zone UTC and character encoding EUC-JP properties are applied for logs with pattern 495071102827757094 and log source -2574377491167724513, and character encoding property UTF-8 is applied for logs with pattern 495071102827757095 and log source -2574377491167724513.