This alert is triggered when the Elasticsearch node's average search_time_fetch
exceeds the warning or critical thresholds over a 10-minute window. The search_time_fetch
measures the time spent fetching data from shards during search operations. If you receive this alert, it means your Elasticsearch search performance is degraded, and fetches are running slowly.
Run the following command to check the health of your Elasticsearch cluster:
curl -XGET 'http://localhost:9200/_cluster/health?pretty'
Look for the status
field in the output, which indicates the overall health of the cluster:
Run the following command to gather information on slow search queries:
curl -XGET 'http://localhost:9200/_nodes/stats/indices/search?pretty'
Look for the query
, fetch
, and take
fields in the output, which indicate the time taken by different parts of the search operation.
Ensure the Elasticsearch node has sufficient resources (CPU, memory, disk space, and disk I/O). Use system monitoring tools like top
, htop
, vmstat
, and iostat
to analyze the resource usage on the Elasticsearch node.
If slow search queries are identified in Step 2, consider optimizing them for better performance. Some techniques for optimizing Elasticsearch search performance include using filters, limiting result set size, and disabling expensive operations like sorting and faceting when not needed.
Check your Elasticsearch configuration to ensure it is optimized for search performance. Verify settings such as index refresh intervals, query caches, and field data caches. Consult the Elasticsearch documentation for best practices on configuration settings.
If your Elasticsearch node is experiencing high search loads regularly, consider adding more nodes to distribute the load evenly across the cluster.