Skip to content

Instantly share code, notes, and snippets.

@apurvadave
Created June 6, 2015 04:05
Show Gist options
  • Save apurvadave/c4a664f44dfcdd2e510f to your computer and use it in GitHub Desktop.
Save apurvadave/c4a664f44dfcdd2e510f to your computer and use it in GitHub Desktop.
Create a streaming reduce in 3 lines of code
// Streaming reduce of maximum response time of host(s) every 10 seconds and plot it on a timechart
read -demo 'srch_cluster' -from :5 minutes ago: name = 'response_ms' service= 'search'
| reduce -every :10 seconds: max = max(value) by host
| @timechart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment