For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex XSIAM

parse_cisco

Use `parse_cisco` in Cortex XSIAM Parsing Rules.

Syntax

parse_cisco(<string>)

Description

The parse_cisco() function processes a Cisco string and returns an object whose structure (key and value pairs) is determined by the input parameters. This function isn't available through the autocomplete when defining a user defined parsing rule. Yet, it is used in the parsing rule syntax for default parsing rules. Only a subset of Cisco ASA message types is supported as detailed in the Marketplace content pack.

Example

This example shows how to parse a Cisco string called _raw_log into a JSON field called _json in a parsing rule.

Where the _raw_log field contains the following input:

<166>Apr 06 12:14:15 172.16.1.5 : %ASA-6-302014: Teardown TCP connection 1764964360 for TAP-Interface2:172.16.1.130/34206 to TAP-Interface:10.10.10.188/8000 duration 0:00:30 bytes 783 SYN Timeout

Updated [INGEST] section in the parsing rule:

[INGEST:vendor="cisco", product="asa", target_dataset="cisco_asa_raw", no_hit = keep]
alter _json = parse_cisco(_raw_log)
| alter
        tmp_time = _json -> date
| alter
        _time = if(tmp_time contains "Z", parse_timestamp("%Y-%m-%dT%H:%M:%SZ", tmp_time), tmp_time ~= "[+-]\d{1,2}:\d{1,2}", parse_timestamp("%Y-%m-%dT%H:%M:%S%Ez", tmp_time))
| fields - tmp_time;

Where the _json field contains the following output:

Last updated

Was this helpful?