Dashboards & Visualizations

how to show a table with fields values from multiple different sourcetypes having different fields

maniishpawar
Path Finder

Hi,

I have perfmon counter data which has two fields "value" & "countername"
and then I have IIS log data which gives me time_taken.

How can I calculate avg of all perfmon counters respectively and also avg time_taken and show all this in a single table which looks like

avg(value) MeasureName

18.0% Memory
592 TimeTaken

Tags (1)
0 Karma

somesoni2
SplunkTrust
SplunkTrust

Try like this

(your base search for perfmon counter data) OR (your base search for IIS log data)
| eval MeasureName=coalesce(countername,"TimeTaken")
| eval value=coalesce(value,time_taken)
| stats avg(value) as Avg_Value by MeasureName

maniishpawar
Path Finder

Thank you so much

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Can you post your current search to calculate both separately?

0 Karma

DalJeanis
SplunkTrust
SplunkTrust
your perfmon search for counter data  
| stats avg(value) as avgvalue by countername 
| rename COMMENT as "The above gets your counters."

| rename COMMENT as "The below adds your time taken."
| append 
    [ your IIS search for events with time_taken 
    | stats avg(time_taken) as avgvalue 
    | eval countername="TimeTaken"]

| rename COMMENT as "And now we rename to match your headings."
| table avgvalue countername
| rename countername as MeasureName 
| rename avgvalue as "avg(value)" 

maniishpawar
Path Finder

out of curiosity is there any other way apart from using append.
Also if we use append, is it an expensive search

0 Karma

DalJeanis
SplunkTrust
SplunkTrust

In this case, the append isn't appreciably worse than the basic search, but somesoni2's answer is slightly more efficient and better general practice.

If you CAN write it without append, then you probably SHOULD.

0 Karma
Get Updates on the Splunk Community!

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

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...