Splunk Search

Generate lookup files via webservices

nebel
Communicator

Hi there,

I want to avoid to copy via scp files on my cloudsearch for using them in lookups.
Is it possible to create lookup files by using API or some other webservices?

Thanks in advance

Tags (1)
0 Karma
1 Solution

Marinus
Communicator

You have two options as I see it.

You either have to fetch the data for lookup from outside of Splunk using something like SCP + some parsting or call a python program to look the data up in real time.

You need to consider the performance impact. You could always implement some kind of caching strategy with your python program if the data is rather static.

Here's an example props and transform

[mylookup]
LOOKUP-bucket_lookup=lookup_buckets narrative account OUTPUT bucket

[lookup_buckets] 
external_type = python external_cmd = bucket_lookup.py fields_list = narrative,account,bucket

If you are planning to call a SOAP web service from Python I'd suggest you use SUDS.

View solution in original post

0 Karma

Marinus
Communicator

You have two options as I see it.

You either have to fetch the data for lookup from outside of Splunk using something like SCP + some parsting or call a python program to look the data up in real time.

You need to consider the performance impact. You could always implement some kind of caching strategy with your python program if the data is rather static.

Here's an example props and transform

[mylookup]
LOOKUP-bucket_lookup=lookup_buckets narrative account OUTPUT bucket

[lookup_buckets] 
external_type = python external_cmd = bucket_lookup.py fields_list = narrative,account,bucket

If you are planning to call a SOAP web service from Python I'd suggest you use SUDS.

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