Docs Home
Viewing docs for
Self-ManagedNot available for BYOC

Resource Usage Tracking

On this page

Ververica Platform can be configured to track the number of CPU cores used per Namespace.

Generating a Resource Usage Report

The endpoint for interacting with resource usage reports is /api/v1/status/resourceusage .

A resource usage report can be created and downloaded via a GET request containing the beginning and end date of the desired timeframe as request parameters from and to. These parameters:

  • should be in LocalDate format, e.g. 2020-04-20
  • are interpreted as 00:00 UTC on the given day
  • are inclusive (from) resp. exclusive (to)

The following example shows a request to obtain a resource usage report from 2019-09-01 to 2020-02-05.

TEXT
1GET /api/v1/status/resourceusage?from=2019-09-01&to=2020-02-05

This call will return a csv file with columns begin, end, namespace, used, sorted by begin, then namespace. Resource usage is tracked with a one-minute resolution. The report will contain a row whenever a change is detected for a namespace. If no change is detected for more than 24 hours, the latest value will be re-emitted.

YAML
1# Start: 2019-09-01
2# End: 2020-02-05
3begin,end,namespace,used
42019-09-01T14:01:20.336368Z,2019-09-02T14:01:20.336368Z,default,2
52019-09-01T14:01:20.336368Z,2019-09-01T14:32:12.392851Z,othernamespace,1.2
62019-09-01T14:32:12.392851Z,2019-09-02T14:32:12.392851Z,othernamespace,4.4
72019-09-02T14:01:20.336368Z,2019-09-02T16:03:20.788324Z,default,2

It is possible to delete all tracked resource usage before a specified date from the database via a similar DELETE request:

TEXT
1DELETE /api/v1/status/resourceusage?to=2020-02-05

By default, it is only possible to delete entries which are older than a quarter (92 days). If necessary, this restriction can be overridden by setting force=true.

Both operations require the admin role.

Configuration

To enable resource usage tracking, set the resourceConsumptionLogging property to true:

YAML
1vvp:
2  resourceUsageTracking: true
Was this helpful?