Dashboards & Visualizations

Area Chart - Dashboard

Ram2
Explorer

Query1:

|tstats count as Requests sum(attributes.ResponseTime) as TotalResponseTime where index=app-index NOT attributes.uriPath("/", null, "/provider") 
|eval TotResTime=TotalResponseTime/Requests
|fields TotResTime

 Query2:

|tstats count as Requests sum(attributes.latencyTime) as TotalatcyTime where index=app-index NOT attributes.uriPath("/", null, "/provider") 
|eval TotlatencyTime=TotalatcyTime/Requests
|fields TotlatencyTime

We want to combine these 2 queries and create area chart panel. 

how to do this??

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Putting the queries together is pretty simple, but getting a usable graph from the result is another matter.

| tstats count as Requests sum(attributes.ResponseTime) as TotalResponseTime sum(attributes.latencyTime) as TotalatcyTime where index=app-index NOT attributes.uriPath("/", null, "/provider") 
| eval TotResTime=TotalResponseTime/Requests, TotlatencyTime=TotalatcyTime/Requests
| fields TotResTime TotlatencyTime

This will produce two single-value fields, which isn't enough for an area chart.  What is it you want to show in the chart?

---
If this reply helps you, Karma would be appreciated.
0 Karma

Ram2
Explorer

@richgalloway , I want to show the total data coming from each query by _time in area chart.

For example:

When we run 1st query i will get output as 100.0789, I want to show this same output as _time in area chart.
I mean to say i want to split this 100.0789 by _time and shown it in area graph.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

To graph data over time requires the _time field and a charting command.  Usually, I use timechart, but it only supports a single field so this query uses chart.

| tstats count as Requests sum(attributes.ResponseTime) as TotalResponseTime sum(attributes.latencyTime) as TotalatcyTime where index=app-index NOT attributes.uriPath("/", null, "/provider") by _time span=1d
| eval TotResTime=TotalResponseTime/Requests, TotlatencyTime=TotalatcyTime/Requests
| chart max(TotResTime) as TotResTime, max(TotlatencyTime) as TotlatencyTime over _time
---
If this reply helps you, Karma would be appreciated.

Ram2
Explorer

@richgalloway , thank you so much it worked 

Get Updates on the Splunk Community!

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...

AI for AppInspect

We’re excited to announce two new updates to AppInspect designed to save you time and make the app approval ...

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...