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

Utility Functions - len

Table of contents
  1. len
  2. Example

len

  • len(variable)

If the variable is string type, return length of the string.

Example

search {from="-30d@d", to="-20@d"} sContent("@source","cloudtrail")
let {sourceIPAddress,eventName,eventSource} =f("@cloudtrail")
where eventSource=="ec2.amazonaws.com" and sContains(eventName,"Describe")==false
aggregate count_sourceIPAddress=count() by sourceIPAddress
let lens=len(sourceIPAddress)