Splunk Search

How do I search using field components?

steveta_uk
Explorer

I'm a newbie to Splunk, and I'm having difficulty with field definitions and searches.

My input data (from syslog) contains one field of a form such as ":ABC1234I:" which means component "ABC" generate log message ID 1234 at level I (info). This is parsed fairly easily using this REGEX:

(?i):(?P[A-Z][A-Z][A-Z])(?P[\d][\d][\d][\d])(?P[DWIEF]):

The search shows Logger, Logno, and Sev under "interesting fields" as expected, and shows the set of values found for each one. All this seems fine.

But when I select one of the values under "Logger", I get no matches, despite it already listing some 26,000+ hits for that particular value.

The search term in this instance is

sourcetype="syslog" Logger="CGP"

What am I doing wrong?

Tags (2)
0 Karma

Ayn
Legend

What version of Splunk are you running? Your problem sounds very much like what is described here: http://blogs.splunk.com/2011/10/07/cannot-search-based-on-an-extracted-field/
But it's supposed to be fixed in 4.3.

0 Karma

Ayn
Legend

Interesting. Something for the Splunk people to have a look at. If your issue is solved, could you mark my answer as accepted? Thanks!

0 Karma

steveta_uk
Explorer

The solution described using that link worked. Thanks for the quick response.

I am using a fresh install of 4.3.1. I can move fields.conf out of the way and rerun a search and it will fail, so clearly the issue still exists with 4.3.1, with the same solution.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...