Splunk Search

How can I determine if a field is an integer (whole number)

Builder

I want to use an if statement determine if a number is a integer or decimal. Is that possible? example

if(field1/field2 = "whole number","true","false")

0 Karma
1 Solution

Esteemed Legend

Esteemed Legend

Builder

Isint() works for what i need. Thanks

0 Karma

Champion

Perhaps a little modulus action:

if(field1%field2==0, "true", "false")
0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!