Skip to content

Instantly share code, notes, and snippets.

@gauravarora
Created June 11, 2014 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gauravarora/32b03a28d6af903923a0 to your computer and use it in GitHub Desktop.
Save gauravarora/32b03a28d6af903923a0 to your computer and use it in GitHub Desktop.
aggregation bytes by ip
time curl -XPOST "http://localhost/es/logstash-2014.04.01-v2/_search?pretty" -d'
{
"size": 0,
"aggregations": {
"the_name": {
"terms": {
"field": "clientip",
"order": {
"rating_avg": "desc"
}
},
"aggregations": {
"rating_avg": {
"sum": {
"field": "bytes"
}
}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment