Skip to content

Instantly share code, notes, and snippets.

@omarsar
Last active January 14, 2020 12:23
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 omarsar/b826f55bae3d99573a02aa02b5dd2c33 to your computer and use it in GitHub Desktop.
Save omarsar/b826f55bae3d99573a02aa02b5dd2c33 to your computer and use it in GitHub Desktop.
This timelion code snippet shows percentages per buckets

.es(index=apa*,q=geoip.country_code2:FR,metric=sum:bytes).label("France").divide(.es(index=apa*, q=geoip.country_code2:,metric=sum:bytes)).multiply(100).yaxis(units="custom::%"), .es(index=apa,q=geoip.country_code2:DE,metric=sum:bytes).label("Germany",).divide(.es(index=apa*, q=geoip.country_code2:*,metric=sum:bytes)).multiply(100).yaxis(units="custom::%")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment