Created
August 18, 2022 04:53
-
-
Save pmuellr/d87c2ddb86b0fe764686ebf4c54bfad9 to your computer and use it in GitHub Desktop.
query the event log for signs of flapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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