CB Server User Session details

Hi CB Forum,

Does anybody know how can we get end user session details (eg. Username, Source IP, Login time etc) on CB Server ? Unable to find any such thing in documentation.

Example: In Postgres, we have view named “pg_stat_activity”. In Oracle DB we have a view named “v$session”. What do we have in CB Server ? How to check User details on CB ?

Pratik Mehta

If you are looking for user info for other services please ignore this.

If you are using N1QL, want to know which user query ran and info specific query.

select * from system:active_requests;
select * from system:completed_requests; (only entries that took more than 1 sec).

   "remoteAddr": "",
            "requestId": "31255ed6-cbba-4539-ab13-9b2f5ee84638",
            "requestTime": "2021-04-22T13:45:56.996-07:00",
            "scanConsistency": "unbounded",
            "state": "running",
            "statement": "select * from system:active_requests;",
            "useCBO": true,
            "userAgent": "Go-http-client/1.1 (CBQ/2.0)",
            "users": "Administrator"

If you need all the requests you can change how completed requests stored or you can enable Audit and audit log will have the info.