elasticsearch版本1.4.5
kibana 4.1.1
logstash 1.5.2-1
如何在kibana 4的discover选项卡中构建搜索,只有在字段存在但不等于特定值时才返回结果?
我在logstash中有一些apache日志数据,我想返回已status_code定义但不等于200的所有条目.因此,如果可能的值为{undefined,200,403,404,500 等},我希望看到所有变体4xx和5xx错误,但没有定义字段的消息,而不是设置为200的消息.
我尝试过以下方法:
+status_code: (*) -status_code: (200)
((status_code: (*) AND NOT status_code: (200))
Run Code Online (Sandbox Code Playgroud)
我也看到了对elasticsearch curl查询的引用,但我不知道如何将它们变成我可以在kibana搜索栏中使用的东西.这是一个例子:
{
"query": {
"constant_score": {
"filter": {
"bool": {
"must": {
"exists": {
"field": "status_code"
}
},
"must_not": {
"term": {
"status_code": '200'
}
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢!
有没有办法在 opsworks 实例上从命令行更新自定义说明书?
我看不到使用AWS OpsWorks Agent CLI或AWS Command Line Interface 执行此操作的方法。
我能够做到的唯一方法是通过控制台。
谢谢!