Splunk Search

create dashboard from text log file

syedtabs
New Member

Dear All,

I am new to splunk, I want to extract data from one of the log file and like to create the dashboard visualization. I've tried using the material and Splunk doesn't recognize the data. Your kickstart will give me boost and confidence. I have copied the small part of the log which i am trying to extract data.

I would like to have a visualization of Type : LOC, Channel, offset level. I need all data of TXT

 

Printed on Aug 18, 2021 5:37:46

035: Aug 17, 2021 6:45:33 TYPE: LOC [+46.2 degC]
-0.3200 ddm [ 90 Hz pred] 90Hz: 35.15 %mod 150Hz: 3.15 %mod
Channel: 110.50 MHz -4.84 KHz offset level: -61.0 dBm

030: Aug 17, 2021 6:44:48 TYPE: LOC [+46.2 degC]
-0.2915 ddm [ 90 Hz pred] 90Hz: 33.82 %mod 150Hz: 4.67 %mod
Channel: 110.50 MHz -4.83 KHz offset level: -56.2 dBm

022: Aug 17, 2021 6:42:52 TYPE: LOC [+46.2 degC]
-0.3360 ddm [ 90 Hz pred] 90Hz: 36.02 %mod 150Hz: 2.42 %mod
Channel: 110.50 MHz -4.83 KHz offset level: -68.2 dBm 

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @syedtabs,

you have to extract the fields using a regex like this:

| rex "(?ms)LOC\s+\[(?<LOC>[^\]]+).*Channel:\s+(?<Channel>.*)\s+offset\s+level:\s+(?<offset>.*)"

that you can test at https://regex101.com/r/tdzGN7/1

then you could run something like this:

index=your_index
| rex "(?ms)LOC\s+\[(?<LOC>[^\]]+).*Channel:\s+(?<Channel>.*)\s+offset\s+level:\s+(?<offset>.*)"
| table _time LOC Channel offset

Ciao.

Giuseppe

0 Karma

syedtabs
New Member

Dear Gcusello,

Thank yo u so much for your response with the steps to perform. However I could not get what exactly i wanted. Honestly I am not in position now to dig into details, I just wanted to give some thing to my department but current situation is not allowing me to work on it and I almost lost my trail period given by splunk enterprise.

I appreciate your response..

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @syedtabs,

ok, tell me if and how I can help you more.

Otherwise, please accept the answer for the other people of Community.

Ciao and happy splunking.

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...