问题描述
在Logstash中,我们能否在输出中将webhook URL作为目标URL 需要发送logstash日志数据到VictorOps 例如:类似这样的
output {
webhook {
hosts => [""]
}
}
使用http输出,下面是conf:
input{
file{
path =>"C:/Users/a.sury/Downloads/ELK/access*"
type =>"Nginx"
start_position =>"beginning"
}
}
output {
http {
url => "https://alert.victorops.com/integrations/generic/20131114/alert/2f4bdd-a45c-496a-bf8e-44cfa8fae950/Demo_RoutingKey"
http_method => "post"
}
}
出现以下错误:
[2020-09-02T18:38:16,039][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2020-09-02T18:38:52,533][ERROR][logstash.outputs.http ][main][db5cd031830f887c23b60d02834d7bc990827d4a8fc129e20bba156a3643e0a0] [HTTP Output Failure] Encountered non-2xx HTTP code 400 {:response_code=>400,:url=>"https://alert.victorops.com/integrations/generic/20131114/alert/db4bdd-a45c-496a-bf8e-44cfaae950/Demo_RoutingKey",:event=>#<LogStash::Event:0x56bb19>}
有什么主意吗? 当我使用弹性搜索作为输出时,对于相同的日志文件,可以在kibana中看到预期的日志。 无法将其发布到VictorOps Webook 任何想法都应该在VictorOps中使用什么来接收事件
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)