Splunk Search

What's the best way to compare data in two different environments with outputlookup?

AydinCan
Loves-to-Learn Lots

Hallo splunk users,

What is the best way to compare the same data in two different environments (producktion and lab) with outputlookup?

thanks Aydin

0 Karma

gcusello
Esteemed Legend

Hi
why do you speak about "outputlookup"?

At first you can ingest logs from both your environments and put them into one or two indexes:

  • probably you're not interested to maintain lab logs for the same time of production logs, so it could be better to put logs into two different indexes (e.g. my_prod and my_lab)
  • then you can configure the same ingestion (sourcetypes) in bothe the environments so you can compare fields
  • so you can put in the same search both the indexes and run something like this:

    index=my_prod OR index=my_lab
    | chart count over field1 BY index
    in this way you can compare the number of occurrances of field1 in both the environments.

If instead you want to compare values you can run something like this:

index=my_prod OR index=mt_lab
| eval field1_prod=(if index="my_prod", field1,""), field1_lab=(if index="my_lab", field1,"")
| table _time field1_prod field1_lab

in this way you can compare field1 values in both the environments.
Following the above methods you can performa other comparations.

Bye.
Giuseppe

0 Karma

AydinCan
Loves-to-Learn Lots

Thanks for your answer. I need to keep those both environments separate. Thats why i wanted to make a lookup at one to compare it to the other environment. I'am new with Splunk so don't know how to do check if in "old" environment has the same data as in the "new" environment.

Thanks

0 Karma

gcusello
Esteemed Legend

Hi AydinCan,
if you're satisfied by this answer, please accept or upvote it.
Bye.
Giuseppe

0 Karma

niketn
Legend

Can you add some sample data from Prod and Lab (mask or anonymize any sensitive information before posting)?

What is the type of data and also explain what are the type of differences you are trying to capture? Please add more details for community to assist you better.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) v3.54.0

The Splunk Threat Research Team (STRT) recently released Enterprise Security Content Update (ESCU) v3.54.0 and ...

Using Machine Learning for Hunting Security Threats

WATCH NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more for ...

New Learning Videos on Topics Most Requested by You! Plus This Month’s New Splunk ...

Splunk Lantern is a customer success center that provides advice from Splunk experts on valuable data ...