Search Log Visualization Configuration
About Search Log Visualization
Fess captures user search logs and click logs. The captured search logs can be analyzed and visualized using OpenSearch Dashboards.
Information That Can Be Visualized
With the default configuration, the following information can be visualized:
Average time to display search results
Search frequency per second
User Agent ranking
Search keyword ranking
Search keyword ranking with zero search results
Total number of search results
Search trends over time
You can build custom monitoring dashboards by creating new graphs using the Visualize feature and adding them to Dashboards.
Data Visualization Configuration with OpenSearch Dashboards
Installing OpenSearch Dashboards
OpenSearch Dashboards is a tool for visualizing data from the OpenSearch used by Fess. Install OpenSearch Dashboards following the OpenSearch official documentation.
Editing Configuration File
Edit the configuration file config/opensearch_dashboards.yml to make OpenSearch Dashboards recognize the OpenSearch used by Fess.
opensearch.hosts: ["http://localhost:9201"]
Change localhost to an appropriate hostname or IP address for your environment. In Fess’s default configuration, OpenSearch starts on port 9201.
Note
If the OpenSearch port number is different, change it to the appropriate port number.
Starting OpenSearch Dashboards
After editing the configuration file, start OpenSearch Dashboards.
$ cd /path/to/opensearch-dashboards
$ ./bin/opensearch-dashboards
After startup, access http://localhost:5601 in your browser.
Index Pattern Configuration
Select the “Management” menu from the OpenSearch Dashboards home screen.
Select “Index Patterns”.
Click the “Create index pattern” button.
Enter
fess_log*in Index pattern name.Click the “Next step” button.
Select
requestedAtfor Time field.Click the “Create index pattern” button.
This completes the preparation for visualizing Fess search logs.
Creating Visualizations and Dashboards
Creating Basic Visualizations
Select “Visualize” from the left menu.
Click the “Create visualization” button.
Select a visualization type (line chart, pie chart, bar chart, etc.).
Select the created index pattern
fess_log*.Configure necessary metrics and buckets (aggregation units).
Click the “Save” button to save the visualization.
Creating Dashboards
Select “Dashboard” from the left menu.
Click the “Create dashboard” button.
Click the “Add” button to add created visualizations.
Adjust the layout and click the “Save” button to save.
Timezone Configuration
If the time display is incorrect, configure the timezone.
Select “Management” from the left menu.
Select “Advanced Settings”.
Search for
dateFormat:tz.Set the timezone to an appropriate value (e.g.,
Asia/TokyoorUTC).Click the “Save” button.
Checking Log Data
Select “Discover” from the left menu.
Select the index pattern
fess_log*.Search log data will be displayed.
You can specify the period to display with the time range selection in the upper right.
Main Search Log Fields
Fess search logs contain information such as:
| Field Name | Description |
|---|---|
queryId | Unique identifier for search query |
searchWord | Search keyword |
requestedAt | Date and time when search was executed |
responseTime | Search result response time (milliseconds) |
queryTime | Query execution time (milliseconds) |
hitCount | Number of search result hits |
userAgent | User’s browser information |
clientIp | Client IP address |
languages | Language used |
roles | User role information |
user | Username (when logged in) |
You can analyze search logs from various perspectives using these fields.
Troubleshooting
If Data Is Not Displayed
Verify that OpenSearch is started correctly.
Verify that the
opensearch.hostssetting inopensearch_dashboards.ymlis correct.Verify that searches are being executed in Fess and logs are being recorded.
Verify that the time range of the index pattern is set appropriately.
If Connection Errors Occur
Verify that the OpenSearch port number is correct.
Check firewall or security group settings.
Check OpenSearch log files for errors.