Hello How can i get the list of users that have l...
# all-things-deployment
r
Hello How can i get the list of users that have logged in into datahub in the past X days. @magnificent-notebook-88304
b
In your elasticsearch, you'll find an index with a name like
datahub usage event
. In there you'll want to query for events with type: LogInEvent (or PageViewEvent) and group by the actorUrn field
There's also a timestamp (ms) field you can use to filter for a particular time range
r
Timestamp is in epoch
b
right
r
Thanks 🙂
n
Here is my Search Query if its helpful to anyone.
Copy code
GET _search
{
  "size": 0,
  "aggs" : {
    "langs" : {
        "terms" : { "field" : "actorUrn.keyword",  "size" : 500 }
    }
}
}