Skip to content

Instantly share code, notes, and snippets.

@pmuellr
Created August 18, 2022 04:53
Show Gist options
  • Save pmuellr/d87c2ddb86b0fe764686ebf4c54bfad9 to your computer and use it in GitHub Desktop.
Save pmuellr/d87c2ddb86b0fe764686ebf4c54bfad9 to your computer and use it in GitHub Desktop.
query the event log for signs of flapping
POST .kibana-event-log-8.5.0/_search
{
"size": 0,
"query": {
"bool" : {
"must" : {
"range": { "@timestamp": { "gte": "now-18s" }}
},
"filter": {
"terms" : { "event.action" : ["new-instance", "active-instance", "recovered-instance"] }
}
}
},
"aggs": {
"alerts": {
"terms": { "field": "kibana.alerting.instance_id" },
"aggs": {
"counts": {
"terms": { "field": "event.action" }
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment