parseUrl() Query Function

Extracts URL components from a field. The attributes url.scheme, url.username, url.password, url.host, url.port, url.path, url.fragment and url.query are added to the event.

Parameters

Name

Type

Required

Default

Description

field

string

No

url

The field from which to parse URL components.

as

string

No

Use a prefix for the attributes added to the event.

The implied parameter is field.

Examples

Parses the field named url and adds URL components to the event.

humio
parseUrl()

Parses the field named endpoint and adds URL components to the event.

humio
parseUrl(field=endpoint)

Parses the field named endpoint and adds URL components to the event with url as a prefix.

humio
url := parseUrl(field=endpoint)

Parses the field named endpoint and adds URL components to the event with apiEndpoint as a prefix.

humio
parseUrl(field=endpoint, as=apiEndpoint)