Splunk Search

tonumber Not Working?

andrewkenth
Communicator

I have windows logs and I have extracted the Process ID's and Login ID's. I thought the | eval tonumber would work but it doesn't return anything.

In this example my Login Id is 0x29019c75

index=charlesriver sourcetype="windows_events" WindowsLogonID=0x29019c75 | eval WindowsLoginID=tonumber(WindowsLoginID) | table _time ADLogon WindowsLoginID | sort -WindowsLoginID

(In case you are asking why, we are comparing the login id to what is logged in an application log)

Tags (1)
0 Karma

somesoni2
Revered Legend

The WindowsLoginID field is represented in Hex format so use following. (see tonumber)

index=charlesriver sourcetype="windows_events"   WindowsLogonID=0x29019c75 | eval WindowsLoginID=tonumber(WindowsLoginID,16)  | table  _time ADLogon WindowsLoginID  | sort  -WindowsLoginID
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...