All Apps and Add-ons

How to use dbx to lookup Ids?

plynch52
Explorer

I have a variable portion of a log file that is structured, all IDs are numeric. There are over 100K possible different IDs. It is not a fixed set of IDs, so coding individual field names doesn't work.
[id-1=cnt-1, id-2=cnt2, id-3=cnt3, ...,id-n=cnt-n]

this is parsed as
| rex field=stats max_match=100 "(?\d*=\d*)"

I want to replace the numeric id-n with a name from a table. I have the dbx lookup defined that provides
id-n, name.

Thanks from a newbie

Tags (1)
0 Karma

plynch52
Explorer

Thanks,
I goofed on copy the parse
rex field=stats max_match=100 "(? kvpair \d*=\d*)"
with angle brackets around kvpair

0 Karma

woodcock
Esteemed Legend

I usually start a search with |dbxquery and end it with | outputlookup MyLookup and schedule this to run every evening. Then I just use |lookup MyLookup in searches.

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