Last active
January 28, 2020 12:57
-
-
Save djptek/e112aa32eee0243f62d0482b822bc27d to your computer and use it in GitHub Desktop.
On which days did we not meet our SLAs (95% of the requests took less than 500ms)?
This file contains hidden or 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
# On which days did we not meet our SLAs (95% of the requests took less than 500ms)? | |
GET logs_server1/_search?filter_path=**.key_as_string | |
{ | |
"size": 0, | |
"aggs": { | |
"logs_by_day": { | |
"date_histogram": { | |
"field": "@timestamp", | |
"calendar_interval": "day" | |
}, | |
"aggs": { | |
"p95": { | |
"percentiles": { | |
"field": "runtime_ms", | |
"percents": [ | |
95 | |
] | |
} | |
}, | |
"sla_filter": { | |
"bucket_selector": { | |
"buckets_path": { | |
"kpi": "p95[95.0]" | |
}, | |
"script": "params.kpi > 500" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment