Skip to main content

isValidIP, isValidIPv4, isValidIPv6 Search Operators

The isValidIP operator checks if the value is a valid IP address. The isValidIPv4 and isValidIPv6 operators check if the value is a valid IPv4 or IPv6 address respectively. 

Syntax

isValidIP

isValidIP("<IP_string>") as <field>
isValidIP(<IP_string_field>) [as <field>]

isValidIPv4

isValidIPv4("<IP_string>") as <field>
isValidIPv4(<IP_string_field>) [as <field>]

isValidIPv6

isValidIPv6("<IP_string>") as <field>
isValidIPv6(<IP_string_field>) [as <field>]

Rules

  • Returns true if the input is a valid IP address.

Examples

| isValidIP(dest_host)

The following returns true:

| isValidIP("10.255.255.255") as isIP

The following returns true:

| isValidIP("192.168.0.1") as isIP

The following returns false:

| isValidIP("127.0.500.1") as isIP
Legal
Privacy Statement
Terms of Use

Copyright © 2023 by Sumo Logic, Inc.