Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
03-26-2018 03:53 AM
Hi,
Can anyone please explain what does "count" option signify for session ID in analytics.
When i select "count distict" instead of count the value changes to 1, this is understandable since each user has a unique session ID.
PFB the screenshot.
Solved! Go to Solution.
03-27-2018 06:47 AM
Hi Rahul,
"Count" will ideally give you the total number of records that came in the selected time range whereas "distinctcount" will get you how many distinct types of those records were reported in that same time frame. So for session guids,so you can use it to plot number of Active Sessions overtime For example count distict user sessions recorded for any specific application(using its appkey):
SELECT distinctcount(sessionguid) FROM web_session_records WHERE appkey = "AD-AAB-AAB-PJZ" AND closed != true
SELECT series(eventTimestamp, '6m', 1503475998118, 1503479598118), distinctcount(sessionguid) FROM web_session_records WHERE appkey = "AD-AAB-AAE-MHF" LIMIT 2000
This will watch all open session per minute and create analytics metrics for the same so that over the period of time you will only see open active sessions count and the metric will roll over to 1min > 10min > 1 hr like other APM metric.
Refer to the doc lin for better clarity: https://docs.appdynamics.com/display/PRO44/Create+Analytics+Metrics+From+Scheduled+Queries
Hope that helps. Let me know in case you have any further queries.
Thank You,
Chitra
03-28-2018 02:58 AM
Hi Chitra,
Thank you very much for your valuable response. Both of the examples helped me to understand the concept of count and distinct count wrt session id's.
I do have another question, i hope user session metric is not availabe by default on the metric browser. If i had to plot the user session with respect to individual products present in an application, how can i plot the graph to show it on the dashboard.With the 2nd example:
SELECT series(eventTimestamp, '6m', 1503475998118, 1503479598118), distinctcount(sessionguid) FROM web_session_records WHERE appkey = "AD-AAB-AAE-MHF" LIMIT 2000
i have tried to create a custom metric, it gives me an error "only single field metrics are allowed". I have attached a screen shot, i am trying to achive the same dashboard. I will be able to fetch all the details except the user sessions. i have marked it in red box.
Can you please let me know how can i achieve fetching the user sessions.
Regards,
Rahul
04-06-2018 04:32 AM
Hi Rahul,
This is because you are trying to create a metric based on a search that is trying to fetch two fields at a time; You can give only a single field in the query for creating metrics, like:
SELECT series(eventTimestamp, '6m') FROM web_session_records WHERE appkey = "AD-AAB-AAF-XCP" LIMIT 2000
OR
SELECT distinctcount(sessionguid) FROM web_session_records WHERE appkey = "AD-AAB-AAF-XCP" LIMIT 2000
Thanks,
Chitra
10-22-2018 03:52 PM
Were you able to resolve the issue using the tips suggested by @Chitra.Lal?
If so, please mark her response as the accepted solution to enable easy and efficient searchability.
Let us know if you have further questions or concerns.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 |
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form