elasticsearch config_error ai_generated partial

Elasticsearch异常:无法启动汇总作业 [my_rollup],因为索引模式 [logs-*] 不匹配任何具有匹配汇总配置的现有索引

ElasticsearchException: Rollup job [my_rollup] cannot be started because the index pattern [logs-*] does not match any existing indices with matching rollup configuration

ID: elasticsearch/rollup-job-configuration-mismatch

其他格式: JSON · Markdown 中文 · English
78%修复率
82%置信度
1证据数
2024-01-10首次发现

版本兼容性

版本状态引入弃用备注
7.13.0 active
8.6.0 active
8.12.0 active

根因分析

汇总作业的索引模式不匹配任何具有所需汇总配置的索引,或者索引是在汇总作业定义之后创建的,缺少正确的元数据。

English

The rollup job's index pattern does not match any indices that have the required rollup configuration, or the indices were created after the rollup job was defined without proper metadata.

generic

官方文档

https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-getting-started.html

解决方案

  1. Delete the rollup job and recreate it after ensuring the index pattern matches existing indices: DELETE /_rollup/job/my_rollup, then PUT /_rollup/job/my_rollup with the correct index pattern and matching field definitions.
  2. Use the Rollup Index Capabilities API to check which indices have rollup metadata: GET /logs-*/_rollup/data, then manually add the rollup metadata to missing indices using the Update Index Settings API: PUT /logs-2025/_settings { 'index.rollup.meta': { 'job': 'my_rollup' } }.

无效尝试

常见但无效的做法:

  1. 75% 失败

    Manually creating indices with the same name pattern does not automatically set the rollup metadata; the indices must be created through the rollup job or have the _rollup.meta field set.

  2. 90% 失败

    Restarting the rollup job with the same configuration will fail again because the underlying indices are still mismatched.