Splunk Search

How to assign field name as primary key in kvstore lookup table

hemalalli
Explorer

I need to insert some records to lookup table and make sure that the lookup table should not allow the duplicate insertion
I'm using service.request POST REST call to insert the records to the collection via Splunk HTML view.

NOTE: I don't want to use "dedup" to display, because I need to avoid insert if the lookup table has another record.

Please help !

Tags (3)
0 Karma
1 Solution

hemalalli
Explorer

I have implemented the workaround to avoid duplication while inserting to the KV store collection

Once the fields are entered in the splunk view, I'm running the search query and getting the key(_key) if the fields are matching in the KV store collection, if the key is available then I'm popping up the messaging saying "Record already exist", otherwise I'm inserting the record.

Thanks and Regards,
Hema

View solution in original post

0 Karma

hemalalli
Explorer

I have implemented the workaround to avoid duplication while inserting to the KV store collection

Once the fields are entered in the splunk view, I'm running the search query and getting the key(_key) if the fields are matching in the KV store collection, if the key is available then I'm popping up the messaging saying "Record already exist", otherwise I'm inserting the record.

Thanks and Regards,
Hema

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...