Splunk Search

How to combine information from 2 different sources?

Susannajuurinen
Explorer

Hi!

I have a small problem here.. I have two different sourcetypes named 'server' and 'metrics'.
Server-sourcetype has fields named customername, servername and server_id.
Metrics-sourcetype has fields _time, server_id, meter, value.
There are several different meters and many values per meter.

I'm trying to combine these two. I have a populating scrolldown-input for selecting server (as a $server$) but I'm unable to find information from metrics-sourcetype with the name of the server (server_id is the key value).

I have tried almost everything but nothing seems to be working.. Output should be a table or list of time , meters and values by the meter. Can you please help me with this one?

Tags (1)
0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Try combining with a join (kinda expensive search-wise - but should get the job done)

sourcetype=Metrics | join server_id [ search sourcetype=Server ] | eval rk=meter.":".servername | timechart avg(value) by rk

You can also use a lookup - generate it from your Serversourcetype.

sourcetype=Server | table server_id servername customername | outputlookup servers.csv

Then use it in your search

sourcetype=Metrics | lookup servers.csv server_id | eval rk=meter.":".servername | timechart avg(value) by rk

alacercogitatus
SplunkTrust
SplunkTrust

If this answered your question, please mark it accepted. Thanks.

0 Karma

Susannajuurinen
Explorer

Thank you so much! This helped me a lot.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...