Getting Data In

How do I parse through my sample CSV type log to graph field values by date?

danielpa
New Member

Hi,

I am having trouble finding a good way of parsing through my log entries to try and grab the key-value pairs for plotting on a graph.

To be clear, I get one log a day in the format:

2016-06-03 05:00:00 date=201606030000 [Audit Report],ad=998,adExtension=0,adGroup=160,adunit=0,advertiser=0,advertiserFunds=0,app=0,bidModifier=0,campaign=0,control=0,dataDictionary=1,demandDefinition=0,forexVersion=0,fundTransaction=0,publisher=0,section=0,site=0,summary=0,supplyDefinition=0,targetingAttribute=3682,trackingPixel=0

I want to generate a graph where I have a line graph
x-axis = Date
y-axis = value

I want a line representing the value for each key for each date so that I can observe the trends for each key (i.e. the ad, adExtension, adunit, etc.)

However, I'm having trouble finding a good way of filtering out only the bolded section in the example log so that I can use it for graphing. I also have the flexibility of changing the format of my log if that would be the best solution.

Help is greatly appreciated.
Thanks!

0 Karma

somesoni2
Revered Legend

Assuming that Splunk is able to parse the timestamp which is at the start of event and setting _time field with that, then try this

your base search | _time ad* app bid...listall available fields ... | timechart span=1d values(*) as * 
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...