User activity report

The arv-user-activity tool generates a summary report of user activity on an Arvados instance based on the audit logs (the logs table).

Installation

Option 1: Install from a distribution package

This installation method is recommended to make the CLI tools available system-wide. It can coexist with the installation method described in option 2, below.

First, configure the Arvados package repositories

Install python3-arvados-user-activity

Red Hat and Centos

# yum install python3-arvados-user-activity

Debian and Ubuntu

# apt-get install python3-arvados-user-activity

Option 2: Install from source

Step 1: Check out the arvados source code

Step 2: Change directory to arvados/tools/user-activity

Step 3: Run pip install . in an appropriate installation environment, such as a virtualenv.

Note: depends on the Arvados Python SDK and its associated build prerequisites (e.g. pycurl).

Usage

Set ARVADOS_API_HOST to the api server of the cluster for which the report should be generated. ARVADOS_API_TOKEN needs to be a v2 token for an admin user, or a superuser token (e.g. generated with script/create_superuser_token.rb). Please note that in a login cluster federation, the token needs to be issued by the login cluster, but the report should be generated against the API server of the cluster for which it is desired. In other words, ARVADOS_API_HOST would point at the satellite cluster for which the report is desired, but ARVADOS_API_TOKEN would be a token that belongs to a login cluster user.

Run the tool with the option --days giving the number of days to report on. It will request activity logs from the API and generate a summary report on standard output.

Example run:

$ bin/arv-user-activity --days 14
User activity on pirca between 2020-11-10 16:42 and 2020-11-24 16:42

Peter Amstutz <peter.amstutz@curii.com> (https://workbench.pirca.arvadosapi.com/users/jutro-tpzed-a4qnxq3pcfcgtkz)
  organization: "Curii"
  role: "Software Developer"

  2020-11-10 16:51-05:00 to 2020-11-11 13:51-05:00 (21:00) Account activity
  2020-11-13 13:47-05:00 to 2020-11-14 03:32-05:00 (13:45) Account activity
  2020-11-14 04:33-05:00 to 2020-11-15 20:33-05:00 (40:00) Account activity
  2020-11-15 21:34-05:00 to 2020-11-16 13:34-05:00 (16:00) Account activity
  2020-11-16 16:21-05:00 to 2020-11-16 16:28-05:00 (00:07) Account activity
  2020-11-17 15:49-05:00 to 2020-11-17 15:49-05:00 (00:00) Account activity
  2020-11-17 15:51-05:00 Created project "New project" (pirca-j7d0g-7bxvkyr4khfa1a4)
  2020-11-17 15:51-05:00 Updated project "Test run" (pirca-j7d0g-7bxvkyr4khfa1a4)
  2020-11-17 15:51-05:00 Ran container "bwa-mem.cwl container" (pirca-xvhdp-xf2w8dkk17jkk5r)
  2020-11-17 15:51-05:00 to 2020-11-17 15:51-05:00 (0:00) Account activity
  2020-11-17 15:53-05:00 Ran container "WGS processing workflow scattered over samples container" (pirca-xvhdp-u7bm0wdy6lq4r8k)
  2020-11-17 15:53-05:00 to 2020-11-17 15:54-05:00 (00:01) Account activity
  2020-11-17 15:55-05:00 Created collection "output for pirca-dz642-36ffk81c8zzopxz" (pirca-4zz18-np35gw690ndzzk7)
  2020-11-17 15:55-05:00 to 2020-11-17 15:55-05:00 (0:00) Account activity
  2020-11-17 15:55-05:00 Created collection "Output of main" (pirca-4zz18-oiiymetwhnnhhwc)
  2020-11-17 15:55-05:00 Tagged pirca-4zz18-oiiymetwhnnhhwc
  2020-11-17 15:55-05:00 Updated collection "Output of main" (pirca-4zz18-oiiymetwhnnhhwc)
  2020-11-17 15:55-05:00 to 2020-11-17 16:04-05:00 (00:09) Account activity
  2020-11-17 16:04-05:00 Created collection "Output of main" (pirca-4zz18-f6n9n89e3dhtwvl)
  2020-11-17 16:04-05:00 Tagged pirca-4zz18-f6n9n89e3dhtwvl
  2020-11-17 16:04-05:00 Updated collection "Output of main" (pirca-4zz18-f6n9n89e3dhtwvl)
  2020-11-17 16:04-05:00 to 2020-11-17 17:55-05:00 (01:51) Account activity
  2020-11-17 20:09-05:00 to 2020-11-17 20:09-05:00 (00:00) Account activity
  2020-11-17 21:35-05:00 to 2020-11-17 21:35-05:00 (00:00) Account activity
  2020-11-18 10:09-05:00 to 2020-11-18 11:00-05:00 (00:51) Account activity
  2020-11-18 14:37-05:00 Untagged pirca-4zz18-st8yzjan1nhxo1a
  2020-11-18 14:37-05:00 Deleted collection "Output of main" (pirca-4zz18-st8yzjan1nhxo1a)
  2020-11-18 17:44-05:00 to 2020-11-18 17:44-05:00 (00:00) Account activity
  2020-11-19 12:18-05:00 to 2020-11-19 12:19-05:00 (00:01) Account activity
  2020-11-19 13:57-05:00 to 2020-11-19 14:21-05:00 (00:24) Account activity
  2020-11-20 09:48-05:00 to 2020-11-20 22:51-05:00 (13:03) Account activity
  2020-11-20 23:52-05:00 to 2020-11-22 22:32-05:00 (46:40) Account activity
  2020-11-22 23:37-05:00 to 2020-11-23 13:52-05:00 (14:15) Account activity
  2020-11-23 14:53-05:00 to 2020-11-24 11:58-05:00 (21:05) Account activity
  2020-11-24 15:06-05:00 to 2020-11-24 16:38-05:00 (01:32) Account activity

Marc Rubenfield <mrubenfield@curii.com> (https://workbench.pirca.arvadosapi.com/users/jutro-tpzed-v9s9q97pgydh1yf)
  2020-11-11 12:27-05:00 Untagged pirca-4zz18-xmq257bsla4kdco
  2020-11-11 12:27-05:00 Deleted collection "Output of main" (pirca-4zz18-xmq257bsla4kdco)

Ward Vandewege <ward@curii.com> (https://workbench.pirca.arvadosapi.com/users/jutro-tpzed-9z6foyez9ydn2hl)
  organization: "Curii Corporation, Inc."
  organization_email: "ward@curii.com"
  role: "System Administrator"
  website_url: "https://curii.com"

  2020-11-19 19:30-05:00 to 2020-11-19 19:46-05:00 (00:16) Account activity
  2020-11-20 10:51-05:00 to 2020-11-20 11:26-05:00 (00:35) Account activity
  2020-11-24 12:01-05:00 to 2020-11-24 13:01-05:00 (01:00) Account activity

Previous: Setting token expiration policy Next: Logging

The content of this documentation is licensed under the Creative Commons Attribution-Share Alike 3.0 United States licence.
Code samples in this documentation are licensed under the Apache License, Version 2.0.