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!

Enterprise Security Content Update (ESCU) | New Releases

In November, the Splunk Threat Research Team had one release of new security content via the Enterprise ...

Index This | Divide 100 by half. What do you get?

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

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...