Displays statistics about the fields within the current event stream.

ParameterTypeRequiredDefaultDescription
limitintegeroptional[a]200 Limits the number of fields to generate statistics for.
  Minimum1 
  Maximum10,000 

[a] Optional parameters use their default value unless explicitly set

The function returns an event set that contains statistics for the fields in the current event set; the returned fields include:

  • #type

    The name of the parsing used when the data was ingested.

  • field

    The name of field for the statistics.

  • _count

    The number of values for the named field within the incoming event set.

  • distinct

    The number of distinct values for the named field in the incoming event set.

fieldstats() Examples

Get stats about fields within the humio repository.

logscale
fieldstats()

Would return a table like the following (showing the first 20 rows only):

#type field _count distinct
humio sasl.kerberos.ticket.renew.window.factor 8001 1
humio numberOfQueries 12523 6
humio sasl.oauthbearer.expected.issuer 8001 1
humio globalOffset 14512 1
humio tx_fifo 34224 1
humio metrics.sample.window.ms 8001 1
humio receive.buffer.bytes 10419 4
humio request.timeout.ms 8037 3
humio humioClass 1205844 305
humio sasl.mechanism 8001 1
humio p75 135504 32416
humio sizeOfRunningQueriesBefore 84217 5
humio sasl.oauthbearer.token.endpoint.url 7614 1
humio time_ms 14132 5029
humio dataspaceId 33180 10
humio datasource 28114 25
humio @rawstring 3694920 3679434
humio tx_carrier 34224 1
humio p98 135504 37994
...