Skip to main content
Skip table of contents

Build a Query

Syntax for a basic query includes the following elements:

ElementExamples
Searchable FieldUser, Origin Host IP, Collector ID
Operator=, CONTAINS, AND
TermJohn Smith, 10.128.65.193, linux

Axon is equipped with a navigation suggestion service that provides valid suggestions based on inputs the user supplies while building a search.

Basic Search Rules

Searches are case insensitive.

EXAMPLE

The following search terms return the same results:

  • john smith
  • John Smith
  • JOHn sMith


Quotes enforce order. 

EXAMPLE

user = "John Smith" 

  • The results include users with the order John Smith. A user with the order Smith John is excluded. 

user = John Smith

  • The results include users with John Smith and Smith John.

Blank or anything can be used as search terms.

EXAMPLE

Operator and Search TermResults
= Blank or = blankIncludes records where the searchable field has nothing in it.
CONTAINS anything

Includes records where the searchable field has any value in it.

This is an unrestricted search that is likely to return a large number of records.


Time fields can be searched using relative time terms.

EXAMPLE

Use the = operator with relative time terms:

Relative Time TermDescriptionRelative Time Options
now-15mThe last 15 minutes.

The examples in this table are not exhaustive. You can use any relative time. For example, if you want to search the last 24 hours, you can use now-1d, now-24h, or now-1440m.

now-30mThe last 30 minutes.
now-1hThe last hour.
now-12hThe last 12 hours.
now-1dThe last day.
now-7dThe last 7 days.
now-1MThe last month.
now-3MThe last 3 months.

Basic Search Examples

EXAMPLE - Exclude exact term with order enforced

Origin Account Name != "John Smith" 

Searchable FieldOrigin Account Name
Operator!=
Term

"John Smith"

Search results: Excludes logs with an origin account name field that contains the case insensitive exact phrase "John Smith" in that order. Results containing things such as "Johnson Smith" or "Adam John Smith" are still included. 

EXAMPLE - Include exact term in any order

Origin Account Name = john smith

Searchable FieldOrigin Account Name
Operator=
Term

john smith

Search results: Includes logs with an origin account name field that contains case insensitive instances of john smith and smith john.

EXAMPLE - Contains term with order enforced

general_information.raw_message CONTAINS  "accepted password" 

Searchable Fieldgeneral_information.raw_message
OperatorCONTAINS
Term

"accepted password"

Search results: Returns logs where general_information.raw_message contains the phrase "accepted password" in that order and is case insensitive. A phrase such as "accepted your password" does not match and is excluded.

EXAMPLE - Contains term in any order

general_information.raw_message CONTAINS password accepted 

Searchable Fieldgeneral_information.raw_message
OperatorCONTAINS
Term

password accepted

Search results: Returns logs where general_information.raw_message has the words password and accepted in no particular order and is case insensitive.

Compound Searches

Compound searches include additional requirements using NOT/AND/OR operators. This further narrows the parameters to limit the number of results a user needs to review. 

Compound Search Examples   

EXAMPLE - Include exact first term with order enforced AND contains second term with order enforced

Origin Account Name = "John Smith" AND raw message CONTAINS "unauthorized access"

First Searchable FieldOrigin Account Name
Operator=
First term"John Smith"
Compound OperatorAND
Second Searchable Fieldraw message
OperatorCONTAINS
Second Term"unauthorized access"

Search results: Includes any logs where the origin account name field matches the exact phrase "John Smith" that also have a raw message with the exact phrase "unauthorized access" in that order anywhere in the body of the message.

EXAMPLE - Contains first term OR contains exact second term

general_information.raw_message CONTAINS user OR unattributed.host.ip_address.value = 10.128.65.193

First Searchable Fieldgeneral_information.raw_message
OperatorCONTAINS
First termuser
Compound OperatorOR
Second Searchable Fieldunattributed.host.ip_address.value
Operator=
Second Term10.128.65.193

Search results: Includes logs where the raw message contains the word user OR where the Host IP Address is 10.128.65.193.

EXAMPLE - First searchable field from the last day contains any value

general_information.raw_message CONTAINS anything AND general_information.standard_message_time = now-1d

First Searchable Fieldgeneral_information.raw_message
OperatorCONTAINS
First termanything
Compound OperatorAND
Second Searchable Fieldgeneral_information.standard_message_time
Operator=
Second Termnow-1d

Search results: Includes logs from the last day where general_information.raw_message has any value in it.

EXAMPLE - Search scans a range of IP addresses

unattributed.host.ip_address.value BETWEEN 192.168.1.1 AND 192.168.1.5

First Searchable Fieldunattributed.host.ip_address.value
OperatorBETWEEN
First term192.168.1.1
Compound OperatorAND
Second Term192.168.1.5

Search results: Includes logs with unattributed Host IP Address values of 192.168.1.1, 192.168.1.2, 192.168.1.3, 192.168.1.4, and 192.168.1.5.

Special Character Search Rules

Searches for logs containing the following special characters must be contained in quotation marks:

  • Parentheses ( )
  • Brackets [ ]
  • Equals =
  • Backslash \
  • Dollar sign $

Special Character Search Examples

EXAMPLE - Search for raw message contents

general_information.raw_message CONTAINS "[5381]"

First Searchable Fieldgeneral_information.raw_message
OperatorCONTAINS
Term"[5381]"

Search results: Includes all logs with raw message that contains the exact term [5381].

As noted, without the quotation marks around [5381], this search would not execute correctly.

EXAMPLE - Search for raw message contents

general_information.raw_message CONTAINS "()"

First Searchable Fieldgeneral_information.raw_message
OperatorCONTAINS
Term"()"

Search results: Includes all logs with a raw message that contains both opening and closing parentheses.

As noted, without the quotation marks around the parentheses, this search would not execute correctly.

Searching using lists

The lists created by in the admin area of axon can be used in building a search query. 

The query parameters for utilizing list are unfortunately not that intuitive and it hasn't been integrated into assisted search yet. At this time if you are looking to do a search using a list; it is recommended to turn off assisted search. When assisted search is off you can start typing the name of the list and column and a suggested query will be displayed below the search input.

List Search Examples   

EXAMPLE - Search for logs using that have a target host county in the column 'Country' in the list 'Banned Countries'.

target.host.location.country IN LIST;0459172f-772e-45a0-adf8-64f31e238549;0f6e32fb-4192-4318-9860-2328778a000b

First Searchable FieldTarget Host Country
Operatorin
List OperatorLIST;
GUID of List0459172f-772e-45a0-adf8-64f31e238549;
GUID of List Column0f6e32fb-4192-4318-9860-2328778a000b

The GUID of the list and list column can be found on the list page in the administration area

Search results: Includes any logs where the target host county is in column 'Country' in the list 'Banned Countries'.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.