Getting Data In

How to convert alphnumeric values to numeric values

sureshkumaar
Path Finder

How to convert the alphnumeric values to numeric values, each time the length of the values changes.

 

Can someone suggest?

 

ClusterCPUUsed=31684

ClusterCPUHALimit=383880

HARamGBLimit=589

ClusterMemUsedGB=201

Labels (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

I'm not quite sure what you would like to achieve.
Are these different fields from a single event or are they separate events? What would you like to have as output?

0 Karma

sureshkumaar
Path Finder

Hi @PickleRick - Those values are from same events, Looking to show only the numbers

The numbers whichever coming after equal to symbol has to show for the field names

ClusterCPUUsed                    --------------------> Field name

ClusterCPUUsed=31684                    --------------------> Field values

31684                                        -------------------------> Expected output

ClusterCPUHALimit                    --------------------> Field name

ClusterCPUHALimit=383880                    --------------------> Field values

383880                                                         -------------------------> Expected output

HARamGBLimit                    --------------------> Field name

HARamGBLimit=589                    --------------------> Field values

589                                                            -------------------------> Expected output

ClusterMemUsedGB                    --------------------> Field name

ClusterMemUsedGB=201                    --------------------> Field values

201                                        -------------------------> Expected output

0 Karma

sureshkumaar
Path Finder

Now i am able to get the numeric values alone when i use ltrim command, but the values after ClusterCPUUsed= keeps changing, is there any way to read all the values when we are using ltrim or any other command. Kindly help

 

| eval CPUUsed=tonumber(ltrim("ClusterCPUUsed=10145", "ClusterCPUUsed="))

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...