This page explains how to use the has_ipv4 function in APL.
has_ipv4
function in Axiom Processing Language (APL) allows you to check if a specified IPv4 address appears in a given text. The function is useful for tasks such as analyzing logs, monitoring security events, and processing network data where you need to identify or filter entries based on IP addresses.
To use has_ipv4
, ensure that IP addresses in the text are properly delimited with non-alphanumeric characters. For example:
192.168.1.1
in "Requests from: 192.168.1.1, 10.1.1.115."
192.168.1.1
in "192.168.1.1ThisText"
true
if the IP address is valid and present in the text; otherwise, it returns false
.
Splunk SPL users
match
or similar regex-based functions to locate IPv4 addresses in a string. In APL, has_ipv4
provides a simpler and more efficient alternative for detecting specific IPv4 addresses.ANSI SQL users
LIKE
or regular expressions. APL’s has_ipv4
function provides a more concise and purpose-built approach.Name | Type | Description |
---|---|---|
source | string | The source text where to search for the IP address. |
ip_address | string | The IP address to look for in the source. |
true
if ip_address
is a valid IP address and is found in source
.false
otherwise._time | has_ip | status |
---|---|---|
2024-11-14T10:00:00 | true | 200 |