我正在嘗試使用在index =>docker 上運行的 elasticsearch logstash 輸出選項在 elasticsearch 中創建索引:
output {
elasticsearch {
cloud_id => "..."
data_stream => "true"
ssl => "true"
api_key => "..."
document_id => "%{_log_id}"
index => "%{target_index}"
}
}
如果我評論索引行,管道將作業并且資料被發送到默認索引。但是,使用定義的索引(無論是否為常量字串),在攝取任何資料之前啟動時會出現以下錯誤
elasticsearch - Invalid data stream configuration, following parameters are not supported: {"index"=>"%{target_index}"}
target_index在過濾器中決議的 JSON 正文中的條目在哪里。
并中斷Could not execute action: PipelineAction::Create<firmware_pipeline>表示這是在實際觸發管道之前。
不確定我是否只是錯誤地閱讀了檔案,但這似乎也是其他人正在做的。
日志版本: 7.13.2
uj5u.com熱心網友回復:
當您使用資料流時,事件會根據 [data_stream] 欄位中的值自動路由到索引。您不能在使用該index => "%{target_index}"選項的顯式路由的同時進行自動路由。那是什么
following parameters are not supported: {"index"=>"%{target_index}"}
正在告訴你。如果要使用資料流,請洗掉索引選項。如果你想顯式路由洗掉 data_stream 選項。
如果您需要將資料發送到兩個目的地,請使用第二個輸出。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/363499.html
