Splunk Search

Can I generate a table in which I list every event with the four variables?

leon12
Loves-to-Learn

Hey Guys, I have the following data in Splunk. Each eventdata has 4 lines (which are seperated through newLines) and every line in a event represent the value of a variable. 

My Question: Can I generate a table in which I list every event with the four variables. The table I wont to have should look like the following excel table :

excelfile.PNG

 

Darstellung.PNG

Thanks for your help!

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @leon12,

I suppose that the Datum is also the timestamp of the event.

In this case, please try something like this:

<your_search>
|  rex "(?ms).*Description:\s(?<Description>.*).*Node:\s+(?<Node>.*).*Severity:\s+(?<Severity>.*)"
| table _time Description Node Severity

That you can test at https://regex101.com/r/tCns4x/1

If Datum isn't also the timestamp, you have two ways:

  • modify your props.conf to use Datum as timestamp (_time),
  • insert datum in the regex

I hint the first solution.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

[Coming Soon] Splunk Observability Cloud - Enhanced navigation with a modern look and ...

We are excited to introduce our enhanced UI that brings together AppDynamics and Splunk Observability. This is ...