Globalizing Custom Search Dashboard

Complete this procedure to globalize Custom Search Dashboard to ensure that messages, errors and exceptions, and the Custom Search Dashboard generated output is globalized.

About this task

To enable globalization of the Custom Search Dashboard generated output, the IBM® Operations Analytics Log Analysis framework passes the locale that is used by your application.

For information about the limitations of the globalization process, see Globalization.

To globalize your Custom Search Dashboard, complete the following steps:

Procedure

  1. Open the script that the Custom Search Dashboard is based on.
    In most cases, this script is the <custom_search_dashboard_name>.app file that is stored in the relevant Insight® Pack folder, for example <HOME>/IBM/LogAnalysis/unity_content/WindowsOSEventsInsightPack_<version>/unity_apps/apps. The Custom Search Dashboard can be based on other languages, such as Python and Java™.
  2. To extract the locale information that is passed from IBM Operations Analytics Log Analysis to your Custom Search Dashboard, you must add a JSON compatible code to your Custom Search Dashboard script. For example:
    {
    "parameters":[
    {}
    ],
    "_fwParameters":[
    {
    "name": "locale",
    "value": "<locale>",
    "type": "String"
    }
    ]
    }

    The following example is in the Python language and it shows how you can extract the locale information that is passed to the Insight Pack or Custom Search Dashboard from IBM Operations Analytics Log Analysis:

    if len(sys.argv) > 1:
      filename = str(sys.argv[1])
      fk = open(filename,"r")
      data = json.load(fk)
      locale = data["_fwParameters"][0]["value"]

    In this example, the locale is sent to the script from IBM Operations Analytics Log Analysis in the following format:

    {
       "parameters":[
          {
          }
    ],
    "_fwParameters":[
      {
        "name": "locale",
        "value": "<locale>",
        "type": "String"
          }
      ]
    }
    where <locale> is the locale that you want to use. For example, "value": "en_US".
  3. Save and start the application to see the globalized Custom Search Dashboard.

Results

The extracted locale globalizes messages, errors and exceptions, and the Custom Search Dashboard generated output.