Splunk Search

Can I add two table values in a single table

rkishoreqa
Communicator

Hi team,

 

How can I add the below two queries into one single query and present in a single table.

query 1 : index="dev_envi" | chart count(ApplicationName) over ApplicationName by Status |addtotals
Result :   app1 5
                  app2 8

query 2 : index="dev_envi" | chart count(event.ApplicationName) over event.ApplicationName by event.Status |addtotals
Result :  app1  3
                 app2  6

 

Now I need a single query to add above both values and display in Dashboard like below (adding above both table data):
app1   8
app2  14

Labels (1)
0 Karma
1 Solution

rkishoreqa
Communicator

Hi rich,

Thanks for the quick response

For this single query I am getting results as same as below query results. 
- index="dev_envi" | chart count(ApplicationName) over ApplicationName by Status |addtotals

and missing the results of the query -  index="dev_envi" | chart count(event.ApplicationName) over event.ApplicationName by event.Status |addtotals

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Can you share some sample events of both types. please?

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

richgalloway
SplunkTrust
SplunkTrust

See if this helps.

index="dev_envi" 
| eval ApplicationName = coalesce(event.ApplicationName, ApplicationName),  Status = coalesce(event.Status, Status)
| chart count(ApplicationName) as count over ApplicationName by Status 
| addtotals
---
If this reply helps you, Karma would be appreciated.

rkishoreqa
Communicator

Hi rich,

Thanks for the quick response

For this single query I am getting results as same as below query results. 
- index="dev_envi" | chart count(ApplicationName) over ApplicationName by Status |addtotals

and missing the results of the query -  index="dev_envi" | chart count(event.ApplicationName) over event.ApplicationName by event.Status |addtotals

0 Karma
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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...