fields

Use this command to specify which fields to add or remove from the retrieved results, based on the field names.

Note

  • Original Log Content is added by default, if no fields command is specified. The default field can be excluded if necessary. If the default field is excluded, and no other field is specified, then an empty response with just the matching number of results available is returned, unless that is explicitly excluded, as well.

  • If there are several field names with the same prefix, then you can use the wildcard * to filter all of them. For example, instead of:

    fields Derived Field1, Derived Field2, Derived Field3

    You can use:

    fields Derived*

    or

    field -Derived*

    Similarly, the wildcards % and ? are supported too. For more information on wildcards, see Use Keywords, Phrases, and Wildcards.

Syntax

fields [+|-] <field_name> (,[+|-]<field_name>)*

Parameters

The following table lists the parameters and variables used with this command, along with their descriptions.

Parameter Description

field_name

Use this variable to specify the field from or to which files are to be added.

The following query returns a list of logs, with their timestamp, target, target type, and severity.

* | fields Time, Target, 'Target Type', Severity