Skip to content

Instantly share code, notes, and snippets.

@d-smith
Last active December 28, 2025 04:32
Show Gist options
  • Select an option

  • Save d-smith/3234a6d44f4cb01ab3b0 to your computer and use it in GitHub Desktop.

Select an option

Save d-smith/3234a6d44f4cb01ab3b0 to your computer and use it in GitHub Desktop.
Sumo Logic avg service time by service
_sourceCategory="xavisample_logs" AND _sourceName="/Users/a045103/goxavi/src/github.com/xtracdev/xavisample/xs.log" | parse "\"Duration\":*," as service_time_ns | parse "\"Name\":\"*\"," as service_name|timeslice 1m|avg(service_time_ns) by service_name,_timeslice
(_sourceCategory="xavisample_logs" AND _sourceName="/Users/a045103/goxavi/src/github.com/xtracdev/xavisample/xs.log") AND "\"Name\":\"echo-quote\"" | parse "\"Duration\":*," as service_time_ns |timeslice by 1m|service_time_ns/tolong(1000000) as ms|avg(ms) by _timeslice
_collector=vagrant-ubuntu-trusty-64 AND _source = "logs"|json auto | where name = "hotel-quote"|timeslice by 1m|duration/tolong(1000000) as ms|avg(ms) by _timeslice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment