Splunk Search

Extract values to be shown in table

adityapavan18
Contributor

I have a event similiar to one below:

Server Status - ServerName - RUNNING

JMS Queue - ServerName : Module1!JMSServer1@QueueName1 , 0, 0, 13, 45, 0, 1345, 800

JMS Queue - ServerName : Module2!JMSServer1@QueueName2 , 0, 0, 3, 14, 0, 15, 800

JMS Queue - ServerName : Module3!JMSServer2@QueueName3 , 0, 0, 23, 24, 0, 13, 800

JMS Queue - ServerName : Module4!JMSServer3@QueueName4 , 0, 0, 25, 35, 0, 1, 800

JMS Bridge - ServerName:BridgeName1,Forwarding messages.

JMS Bridge - ServerName:BridgeName2,Forwarding messages.

This complete snippet is a single event.
This gets written onto a file at regular interval (JMS Queues and JMS Bridges status) which is monitored by splunk,and this complete thing is indexed as a single event with multiple lines,

Now i would like to extract info from this event and show in following table format in panel in dashboard

QueueName Field1 Field2 Field3 Field4 Field5 Field6 Field7

QueueName1 0 0 13 45 0 1345 800

QueueName2 0 0 3 14 0 15 800

QueueName3 0 0 23 24 0 13 800

QueueName4 0 0 25 35 0 1 800

Tags (1)
0 Karma

bmacias84
Champion

You could build a field extraction for a every field or you could build one for the entire event. Below is a regex statement I've tested with your sample.


(?ms)(?P<queuename>[^\s@]+)\s,\s(?P<value1>[^\s,]+),\s(?P<value2>[^\s,]+),\s(?P<value3>[^\s,]+),\s(?P<value4>[^\s,]+),\s(?P<value5>[^\s,]+),\s(?P<value6>[^\s,]+),\s(?P<value7>[^\s,]+)$

bmacias84
Champion

Then you would append ...|queuename =

Or

...| chart span=5m avg(value4) as value by queuename.

I dont know what your trying to accomplish with your report or chart.

0 Karma

adityapavan18
Contributor

even if i do it, that complete thing being a single event.
If I need to extract details for only 1 queue say QueueName3.
I will get all the details for all Queues as it is a single event.

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!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...