- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
abhijitd
New Member
09-03-2019
06:12 PM
index=app sourcetype=accesslog uri="some uri" user!="-" (context="display" OR context="pages") earliest=-7d | rex field=page ^"(?<spacekey_or_action>\S+)(\/|\?|spaceKey\=|draftId\=|pageId\=|key\=)|(?<pid_or_sk>[0-9|a-z|A-Z|\+\%\-\:\(\)\.]{1,})|\&(?<article>\S+)" max_match=0 | search spacekey_or_action="123" OR (spacekey_or_action="viewpage.action" AND pid_or_sk="123")
| stats dc(user) as users by page
| sort -users
| eventstats sum(users) as totalUsers
I get the display as :
- Page1 100 150
- Page2 50 150
Basically, my question is how do i get a % so Page 1 is 66% of total events and Page 2 is 33% of total events and so on
The base rex and this followup rex searches all pages for the content group 123.
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

renjith_nair
Legend
09-04-2019
12:51 AM
@abhijitd ,
Just add this to your search
| eval perc=round((users/totalUsers)*100,2)
---
What goes around comes around. If it helps, hit it with Karma 🙂
What goes around comes around. If it helps, hit it with Karma 🙂
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
abhijitd
New Member
09-04-2019
06:06 AM
Thanks! this worked.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

renjith_nair
Legend
09-04-2019
12:51 AM
@abhijitd ,
Just add this to your search
| eval perc=round((users/totalUsers)*100,2)
---
What goes around comes around. If it helps, hit it with Karma 🙂
What goes around comes around. If it helps, hit it with Karma 🙂
