Splunk Search

Correlate value between 2 columns

mfirmanf
New Member

hi, i am a newbie in Splunk here and i am not a native speaker, so please bare my grammar.
can someone explain how to correlate between two columns that is present in a table and remove the other values?

for example table below,
i want to correlate between the Number and Router, because one Number only belongs to one Router.
and the first digit of the Number is correlated to the R(1-7)
for example:
- Number 21938 belongs to SWW- R2 -896
- Number 12439 belongs to HIT- R1 -141

alt text

and i need to remove the other value that is not correlated, so there is only one Number, one IP Address and one Router in each row. so the proper table would look like below.

alt text

any answer and help would be really appreciated.
thank you.

Tags (1)
0 Karma

to4kawa
Ultra Champion
....
|eval head_num=substr(NUMBER,1,1), head_r=substr(ROUTER,6,1)
| where head_num==head_r
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @mfirmanf,
could you share an example of your logs?
it's difficoult to help you whitout them.

Ciao.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...