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 

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...