Splunk Search

automatic lookups

a212830
Champion

Hi,

I configured a lookup that works fine, if I explicitly use the lookup statement in my search, but I want the field to auto-populate, based upon the sourcetype. Is there a way to do this?

Tags (2)
0 Karma
1 Solution

kristian_kolb
Ultra Champion

As Ayn states, this can be done with a LOOKUP-statement in props.conf, but you also need the corresponding transforms.conf stanza to make it work. I recently posted an answer to this type of question;

http://splunk-base.splunk.com/answers/5916/using-cidr-in-a-lookup-table?page=1&focusedAnswerId=46866...

Have a look, and if you don't figure it out, feel free to provide more information regarding what you're trying to do.

Hope this helps,

Kristian

View solution in original post

0 Karma

kristian_kolb
Ultra Champion

As Ayn states, this can be done with a LOOKUP-statement in props.conf, but you also need the corresponding transforms.conf stanza to make it work. I recently posted an answer to this type of question;

http://splunk-base.splunk.com/answers/5916/using-cidr-in-a-lookup-table?page=1&focusedAnswerId=46866...

Have a look, and if you don't figure it out, feel free to provide more information regarding what you're trying to do.

Hope this helps,

Kristian

0 Karma

Ayn
Legend

Yes, you set this in props.conf using the LOOKUP directive. For instance

[mysourcetype]
LOOKUP-foo = mylookuptable somefield OUTPUT somelookedupfield

http://docs.splunk.com/Documentation/Splunk/4.3/admin/Propsconf

a212830
Champion

Did that - doesn't work.

LOOKUP-hostdb = hostdb_lookup srcIP OUTPUTNEW deviceName

0 Karma

AllenZhang
Explorer

needs restart to make it work?

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...