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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...