Skip to content

Instantly share code, notes, and snippets.

@apurvadave
Created August 17, 2015 22:34
Show Gist options
  • Save apurvadave/b94f8ae9f0a8347718f9 to your computer and use it in GitHub Desktop.
Save apurvadave/b94f8ae9f0a8347718f9 to your computer and use it in GitHub Desktop.
Showing off a basic use case of operations analytics with scatter chart in Jut

Scatterchart is a great way to correlate two metrics visually. This example shows off response time vs requests.

(
read -demo 'srch_cluster' -from :2 minutes ago: -max_samples '2000' name = 'response_ms';
read -demo 'srch_cluster' -from :2 minutes ago: -max_samples '2000' name = 'requests'
)
| put *name = value
| join
| keep time, requests, response_ms, service
| @scatterchart -o {
valueField: 'response_ms',
controlField: 'requests',
keyField: 'service',
xScales: {
primary: {
label: 'Requests',
}
},
yScales: {
primary: {
label: 'Response Time (ms)'
}
},
display: {
duration: :5m:
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment