On This Page

Home / Search/ Language Reference/ Functions/ Scalar Functions/ String Functions/new_guid

new_guid ​

The new_guid function generates a random version 4 universally unique identifier (UUID), also called a globally unique identifier (GUID).

Alias: uuid (new_guid and uuid are synonyms.)

Syntax ​

new_guid()

Arguments ​

None.

Results ​

Returns a new random UUID v4 as a string, in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Cribl Search generates a new value for each event.

Examples ​

This example returns a single random UUID:

print new_guid()

This example adds a unique id field to each of 10 events:

dataset="cribl_search_sample"
| limit 10
| extend id=new_guid()