Getting Data In

How to find monitored csv files with more than a 100k rows?

jiaqya
Builder

Is there a log or a command output that I can use to determine the number of rows each CSV file that is being monitored has?

I am looking for this info so I can find out how many of the CSV files are more than 100k rows to resolve another issue that I am facing.

Thanks

0 Karma
1 Solution

niketn
Legend

@jiaqya, based on whether you have defined a specific index or sourcetype for the CSV files you can try tstats command to get count of events

| tstats count where index=<yourIndexName> by source

OR

| tstats count where index=<yourIndexName> AND sourcetype=<yourSourceType> by source

Following is a run anywhere search based on Splunk's _internal index for sourcetype=splunkd

| tstats count where index=_internal AND sourcetype=splunkd by source
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@jiaqya, based on whether you have defined a specific index or sourcetype for the CSV files you can try tstats command to get count of events

| tstats count where index=<yourIndexName> by source

OR

| tstats count where index=<yourIndexName> AND sourcetype=<yourSourceType> by source

Following is a run anywhere search based on Splunk's _internal index for sourcetype=splunkd

| tstats count where index=_internal AND sourcetype=splunkd by source
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

jiaqya
Builder

This surely is one way, thanks.

john.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...