【发布时间】:2015-08-25 07:22:14
【问题描述】:
我想从 logstash 更新我的文档/登录 elasticsearch 的一个字段。
我的 logstash 配置文件
input {
http {
host => "127.0.0.1" # default: 0.0.0.0
port => 31311 # default: 8080
}
}
output {
stdout { codec => json },
elasticsearch {
action => "update"
bind_host => "127.0.0.1"
bind_port => 9200
document_id => "ET00009682"
index => "in12"
type => "event"
}
}
我想将我的计数字段增加一,如何在我的 logstash 输出中指定它。
注意:我知道更新我需要使用这个脚本
"script" : "ctx._source.count += 1"
但我不确定将其放置在 logstash 的输出中的什么位置?
请帮助 谢谢
【问题讨论】:
标签: elasticsearch logstash elastic-stack