Skip to main content

Summarize Arvados cluster activity from audit logs and Prometheus metrics

Project description

This tool reports on the data and workflows in an Arvados cluster to help administrators understand growth and costs. It reports what it has access to: any Arvados user can run it to get a report of their own workflows and others they can see. An Arvados administrator can run a report on all data and workflows in the cluster. If you provide credentials for a Prometheus server in your Arvados cluster, the report includes additional information about compute use.

Running as a workflow from Workbench

We provide a CWL workflow to generate this report. It’s available as a single file in the Arvados source and included with this Python package. You can register the workflow on your cluster by running:

arvados-cwl-runner [--project-uuid=UUID] --create-workflow cluster-activity.cwl

Then you can launch the workflow from Workbench. All inputs have documented formats and values.

Running as a workflow from the command line

Alternatively, you can run the workflow directly with arvados-cwl-runner. Write an input file following this YAML template:

# Report start date as a `YYYY-MM-DD` string
reporting_start: "YYYY-MM-DD"

# Report end date as a `YYYY-MM-DD` string. Default today.
#reporting_end: "YYYY-MM-DD"

# The base URL of your Arvados cluster's Prometheus server, like
# `https://prometheus.arvados.example/`
#prometheus_host: ""

# Prometheus API token
#prometheus_apikey: ""

# Prometheus API username
#prometheus_user: ""

# Prometheus API password
#prometheus_password: ""

# A string with a Python regular expression.
# Workflows whose name match the expression will be excluded from the report.
#exclude: ""

# A boolean. If true, individual workflow steps will be reported alongside
# their parent workflows.
include_workflow_steps: false

Then run the workflow like this:

arvados-cwl-runner [--project-uuid=UUID] [options ...] cluster-activity.cwl YOUR-INPUTS.yml

Running as a command line tool

This Python package provides a command line tool you can run to generate reports on your own system. Install it with pipx like:

pipx install "arvados-cluster-activity[prometheus]"

If you don’t have a Prometheus server or don’t want Prometheus support, remove [prometheus] from the command line. Advanced users can install the tool to their own virtualenv or elsewhere.

The command line tool provides options to control the report generation. These correspond to the workflow inputs. Run the tool with --help for the full list:

arv-cluster-activity --help

The tool gets Arvados credentials the same as other client tools: it reads the ARVADOS_API_HOST and ARVADOS_API_TOKEN environment variables if those are set, or the ~/.config/arvados/settings.conf file if they are not.

The tool gets Prometheus credentials from the PROMETHEUS_HOST, PROMETHEUS_APIKEY, PROMETHEUS_USER, and PROMETHEUS_PASSWORD environment variables. The values follow the format of the workflow inputs above. You can write these environment variables in a dedicated file and load that with the tool’s --prometheus-auth option.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arvados_cluster_activity-3.2.1.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arvados_cluster_activity-3.2.1-py3-none-any.whl (51.4 kB view details)

Uploaded Python 3

File details

Details for the file arvados_cluster_activity-3.2.1.tar.gz.

File metadata

  • Download URL: arvados_cluster_activity-3.2.1.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for arvados_cluster_activity-3.2.1.tar.gz
Algorithm Hash digest
SHA256 ddae547c3af97aecbea715040d061416fc857f8369c618766f693799d86a4f46
MD5 e87cf17419af396aca659be249f56e22
BLAKE2b-256 33e0c6eaf53ed225dd6a096300f7d3a65cd5a48887883d62b5618af6022c6742

See more details on using hashes here.

File details

Details for the file arvados_cluster_activity-3.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for arvados_cluster_activity-3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba2e7e50728fbe1254d23005707ed70f1eda168d88d9c57c22c442e774f9f98e
MD5 3a104c970721a5ba920655d2ff53c220
BLAKE2b-256 4a6024ee818d937b5c76682cf9e19dcdf7bac8bae3e8ae94d39b7891b1935f45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page