Splunk Search

index time extractions search

ankithreddy777
Contributor

I have did index time extractions for fields.
I have stored them in _meta. But when I search for the extracted field values, It is taking same time as search time extractions. Is there any query to search for index time extracted fields stored under _meta. Or should I store the extracted fields at different place for fast search of the queries.

0 Karma

somesoni2
Revered Legend

I'm guessing you need do add an entry in the fields.conf, on Search head for the new indexed time extracted field, so that they are treated as such. See this for more info.
http://docs.splunk.com/Documentation/Splunk/6.5.2/Data/Configureindex-timefieldextraction#Add_an_ent...

If your only dealing with indexed field in your query and want to just list/do aggregation on them, you can use tstats command which works on metadata/indexed fields. Something like this

| tstats count WHERE index-my_index_name sourcetype="Good to Specify" by err_code | table 

err_code
It'll be super duper fast then regular search.

0 Karma

koshyk
Super Champion

would be good to have some sample example data and your props/transforms to see how you are doing it

0 Karma

somesoni2
Revered Legend

Also, the search that you're using.

0 Karma

ankithreddy777
Contributor

It is something like

[netscreen-error]
REGEX = device_id=[w+](?[^:]+)
FORMAT = err_code::$1
WRITE_META = true

and my search is ,
index=my_index_name|table err_code

Is there any way to search error_code values quickly

0 Karma

s2_splunk
Splunk Employee
Splunk Employee

You can reference indexed fields using the syntax field::value.
You can also try this and see if it returns data:

| tstats count where index=my_index_name by error_code

If it doesn't produce a result, you may want to use the walklex command to validate that your field actually appears in the index.

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 ...