Getting Data In

Can't get all rows from CSV

twtyj
New Member

I monitor folder on one server with SplunkUniversalForwarder installed. the configuration of input.conf as below:
[monitor://E:\A530\archive\Powershell_User]

  sourcetype = Powershell_User

  crcSalt = <SOURCE>

  disabled = false

  followTail = 0

then I do search in search head with Splunk query:
source="E:\A530\archive\Powershell_User\20180614_get_aduser_all_for_Splunk.csv"

the total rows of this CSV file are 7168, but only return 5139 rows.

the CSV is well formatted

How can I get all rows in Splunk query?

Thanks

Tags (1)
0 Karma

woodcock
Esteemed Legend

You are pretty much out of luck. You can get the date from your filename but the events must have a timestamp in them and yours do not. See here:

https://www.splunk.com/blog/2009/12/02/configure-splunk-to-pull-a-date-out-of-a-non-standard-filenam...

You can use DATETIME_CONFIG = CURRENT to timestamp with the index time.

0 Karma

woodcock
Esteemed Legend

Are you ABSOLUTELY sure that it is well-formatted? Splunk will abort the import (possibly without indicating an error) if it hits something that is wonky. The best way to check is using the Lookup Editor App (https://splunkbase.splunk.com/app/1724/). You simply upload the lookup file and it checks for you and you will see the error straight away because it will complain. It will even show you what kind of error and on what line!

0 Karma

renjith_nair
Legend

Do you have a timestamp column in csv and what's the timerange you are using in search?

Happy Splunking!
0 Karma

twtyj
New Member

Hi nair,

I am fresh to use SPLUNK, I use all time range in search.

How can i find timestamp information?

thanks.

0 Karma

renjith_nair
Legend

If you are selecting "All Time" timestamp does not really matter. Are you uploading it to the same index or do you have some props to split it? also try index=* source="E:\\A530\\archive\\Powershell_User\\20180614_get_aduser_all_for_Splunk.csv" Is it possible to identify one of the rows which is missing and find the difference of that from other rows?

Happy Splunking!
0 Karma

twtyj
New Member

Hi Nair,
I know why only part of rows are returned. Splunk index the CSV file with timestamp but there is no dedicated filed for that.
Splunk extract the timestamp of CSV from modified time. the problem is some rows can added the timestamp with modified time.

do you know how to extract timestamp based on file name? we have 20180614 within file name.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...