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!

Get Agentic with Splunk Lantern: Connect to Cisco Cloud Control, Transform ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

July Community Events: Master ITSI 5.0 & Automate Splunk

Struggling with alert fatigue or feeling like you're spending more time on infrastructure maintenance than ...

New Release of Federated Search: Bringing Splunk Analytics to More of Your Data

Organizations today are generating more data than ever and storing it across cloud object stores, data lakes, ...