Steps to create a Custom Search Dashboard
Complete these steps to create a Custom Search Dashboard.
Procedure
- The source log file you want to use must be loaded and processed by IBM® Operations Analytics Log Analysis.
- Using python, shell scripting, or Java™, create a script. The script and its corresponding application or template file must reside in the same directory: <HOME>/AppFramework/Apps.
If no value is specified for the
type
parameter at the top of the application file, the application file runs the script from the same folder as the application file.Insight Packs and applications: If you want to include the application in an Insight® Pack project, the script and the associated application file must be in the same folder within the project: src-files/unity_apps/apps under the project folder.In the script, you need to specify the actions:- Connect to IBM Operations Analytics Log Analysis .
- Use an HTTP POST to run a search request to a IBM Operations Analytics URL for JSON data. The query uses the same method as the queries you can run in the Search Workspace. For the query, use the JSON format for Search requests as described in the Search runtime API. If you need to narrow down the returned data further, you can parse the data within the script.
- Format the returned JSON data into a structure that can be consumed by the charts.
- Create a JSON application file and save it to the <HOME>/AppFramework/Apps/ directory
or a sub-directory within this directory.
If you want to include the application in an Insight Pack project, create the JSON application file in the src-files/unity_apps/apps folder. The application file references your script and specifies the chart type and parameters for the dashboard display.
Note: If you are using the Insight Pack Tooling, build the Insight Pack containing the application, and use the pkg_mgmt utility to install the Insight Pack on your IBM Operations Analytics system. - From the Custom Apps pane in the
Search workspace, run your application and determine if it is displaying
your data as you intended. Amend the script and application file as
required. Refresh Custom Apps: If you do not see you application listed, refresh the Custom Apps pane in the Search workspace in order to list the newly installed Custom app.Note: If you close a chart portlet, you must run the Custom Search Dashboard again to reopen the chart.
- (Optional) If you want to create a template for your application,
create a template in the directory: <HOME>/AppFramework/Templates.
If a template name has been specified in the
type
field, the application file references that template and executes the script in the same directory as that template. That is, the application file and script must be located in the same directory as the template file.Insight Packs and templates: If you want to include the application in an Insight Pack project, the script, the application, and template file must reside in the same in the folder within the project: src-files/unity_apps/templates under the project folder.