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