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!

Casting Call: Compete in Cyber Games

Lights, Camera, SecOps: Apply to Compete in Cyber Games     Think you have what it takes to beat the clock? ...

Data Management Digest – June 2026

Welcome to the June 2026 edition of Data Management Digest! This month’s update is short and sweet, with a ...

Think Like an Architect: Introducing the Splunk Certified Cybersecurity Defense ...

In cybersecurity, defenders respond to threats. Architects design the systems that stop them.    As ...