This page explains how to use the has_ipv4 function in APL.
The 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"
The function returns true
if the IP address is valid and present in the text; otherwise, it returns false
.
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.
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.Identify requests coming from a specific IP address in HTTP logs.
Query
Output
_time | has_ip | status |
---|---|---|
2024-11-14T10:00:00 | true | 200 |