Getting Data In

How to remove some event from log while indexing..

gajananh999
Contributor

Hello Everyone,

I want to remove some lines from log file while indexing the data. my log file is like

date time s-computername Client-IP cs-uri-stem cs-uri-query s-contentpath sc-status cs(Referer) sc-win32-status sc-bytes cs-bytes W3WP-PrivateBytes cs-username cs(User-Agent) time-local TimeTakenMS sc-substatus s-sitename s-ip s-port RequestsPerSecond s-proxy cs-version c-protocol cs-method cs(Host) EndRequest-UTC local date CPU-Utilization cs(Cookie) BeginRequest-UTC date BeginRequest-UTC local

10/5/2012 00:01.2 AEPLWEB2 66.249.73.41 /research/comparecars/compareAllFeatures.aspx car1=1587&car2=343&car3=&car4= E:\sites\carwale\research\comparecars\compareAllFeatures.aspx 200 - 0 8575 332 - - Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) 30:01.2 9469 0 WWW.CARWALE.COM 192.168.1.15 80 0.9863 - HTTP/1.1 http GET www.carwale.com 10/5/2012 00:01.2 10/5/2012 59.09 - 10/5/2012 59:51.7

error..... 121

error......186

So Here i want to remove the lline which is starting with error and starting date which is first line .

Please can anybody help me on this?

Thanks

Gajanan Hiroji

Tags (1)
0 Karma

MuS
SplunkTrust
SplunkTrust

Hi gajananh999,

find all needed information and examples in the docs about Discard specific events and keep the rest.

cheers, MuS

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...