Getting Data In

Index only rows that match a pattern

jiaqya
Builder

i have a file with following pattern : SERVICESTATE::CRITICAL , which updates everyday.
this file also has many other rows which does not have the above pattern.
i would like to only index the rows that match this pattern.
could i get help on how this can be done...

thanks,
john.

Tags (1)
0 Karma

somesoni2
Revered Legend

You believe you want to do - "Keep specific events and discard the rest". So follow instruction from below link and use appropriate REGEX for your pattern.

http://docs.splunk.com/Documentation/Splunk/7.1.1/Forwarding/Routeandfilterdatad#Keep_specific_event...

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!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

Data Management Digest – May 2026

Welcome to the May 2026 edition of Data Management Digest!   As your trusted partner in data innovation, the ...