Splunk Search

How to capture the date from my sample inputlookup CSV file?

trevorQmulos
New Member

I have a CSV that has the setup as shown below.

Date     |Score
1/1/2016 | 4.3
2/1/2016 | 5.7 

I need to extract that date to be able to do trends on the scoring. I have no other way to ingest the CSV aside from just using an inputlookup.

0 Karma
1 Solution

sundareshr
Legend

Try this

| inputlookup csvfilename.csv | eval time=strptime(Date, "%-m/%-d/%Y") | bin span=1mon | stats count by time

View solution in original post

0 Karma

sundareshr
Legend

Try this

| inputlookup csvfilename.csv | eval time=strptime(Date, "%-m/%-d/%Y") | bin span=1mon | stats count by time
0 Karma

trevorQmulos
New Member

bin command needed another argument with _time but that did work

| eval _time=strptime(Date, "%-m/%-d/%Y") | bin span=1mon _time |

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...