Splunk AppDynamics

active users by region query

Amr_Elsayed
New Member

hello , 

I want to get active users count per region for my mobile application , I used the following query : 

select georegion,distinctcount(cguid) from mobile_snapshots
where (geocountry='xxx' and mobileappversion='xxxx' and appkey='xxxxx')
 
but it returned non-logic numbers , the returned number is not the same as the active users per region widget in the sessions tab 
 
I need to know the query of the active users per region widget in the session tab , in order to use it in dashboards so is the query that I used is wrong or I missed something
 
thanks
Labels (1)
Tags (2)
0 Karma

Mudassir_mir2
Engager

Hello ,

you can use the below query to get the active unique users

SELECT distinctcount(agentID) FROM mobile_session_records

--

kind regards

Mudassir Mir

Morelz
Motivator

Hi Amr

Within AppD inside the Mobile App records it used the "closed" field inside the mobile_session_records to determine if a session is active or not

To view the data in a graphical over time format you can use the below, can adjust the series time depending on the timeframe.

SELECT series(eventTimestamp, "120m"), georegion, count(*) AS "Active Sessions" FROM mobile_session_records WHERE closed = false

To view it as a single count in table format

SELECT georegion, count(*) AS "Active Sessions" FROM mobile_session_records WHERE closed = false

As it uses the field "closed" to check if a session is open or not, you will only ever see the current open sessions, and it won't show you a historical view of open sessions as you see in the Session Tab

If you want that type of view, you will need to create metrics that will store the "Active Sessions" data for you to show in the dashboard

Ciao

Amr_Elsayed
New Member

hello Mario , 

Thanks a lot for your response , I really appreciate it 

but it is not the case , I don't want to get the count of active sessions . I want to get the unique count of application users not sessions .

I need to know how many users install and uses the application.

for example :

I have 100 k  sessions but I'm sure that users of my app are less than that as it only published for potential 20 k users , so I need to know how many users out of these 20 k uses the app 

this is provided in session tab in active users widget

thanks 

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...