Splunk Search

how to take the data if in the data with time stamp the value is separated with space.

pritamkumar01
Engager

my data for buffer use for a particular time is:
00:00:04: port 1, buffer 12221,
00:00:04: port 2, buffer 22,
00:00:04: port 3, buffer 3333,
00:00:04: port 4, buffer 0,
00:00:04: port 5, buffer 0,
00:00:04: port 6, buffer 0,
00:00:04: port 7, buffer 0,
00:00:04: port 8, buffer 122,

i want a graph of use of buffer by all ports at a timestamp.
kindly help .thanks in advance.

Tags (3)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You can extract your port and buffer values like this:

... | rex "port (?<port>\d+), buffer (?<buffer>\d+)"

and then chart that over time like this:

... | timechart sum(buffer) by port

I've chosen sum(), but you may also be looking for avg() instead depending on your requirements.

Once you're happy with the field extraction within the search you should move it to the configuration, go to Settings -> Fields -> Field Extraction and add the expression there for your sourcetype, without the double quotes.

pritamkumar01
Engager

thanks for the help Mr Martin.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...