Skip to main content Link Search Menu Expand Document (external link)

Concepts - env

Table of contents
  1. env

env

Example:

function countBySource()
  search
  assign source=f("@source"), size=f("__size__"), timestamp=f("@timestamp")
  timechart {span="1h", limit=10} count=count() by source
end

function sizeBySource()
  search
  assign source=f("@source"), size=f("__size__"), timestamp=f("@timestamp")
  timechart {span="1h", limit=10} size=sum(size) by source
end

env from="-48h<h", to="-1h>h"
stream eventCount=countBySource()
stream eventSize=sizeBySource()