Monitor resource usage
Report on what your datamart consumes: the cost of each query, and the volume ingested.
Your goal
Understand what your datamart consumes - which queries cost what, and how much data you ingest - so consumption is a number you manage rather than a surprise.
Expected outcome
A consumption report per datamart that you can break down by resource and follow over time.
What is measured
Each datamart resource that leads to write or read access on the platform is tracked, and its consumption is measured - segments, exports, imports, and the rest.
The report gives you:
the cost of each query executed on the platform,
the amount of data ingested.
Metrics and dimensions
read_count
The number of top-level selectors of an OTQL or GraphQL query, the id selector excluded.
read_size
The number of elements read from the database by the query's selection.
scan_size
The number of elements read from the database to apply the query's filters, its WHERE part.
scan_duration
The time spent applying the query's filters.
source
The feature being measured, such as segment computation or export.
sub_source
Context about the source, such as INSERT_PHASE for a segment computation.
resource_id
The resource that led to the read or write operations.
execution_id
One execution of that resource. A resource has several executions.
date_time
When the consumption was measured.
datamart_id
The datamart the resource belongs to.
organisation_id
The organisation the datamart is linked to.
community_id
The community the datamart is linked to.
Read the report
Select the data source
In the selector above the query builder, which shows OTQL by default, choose Resources usage. See Choose a data source.
The endpoint is a mediarithmics data cube, like the other monitoring APIs.
metrics
Array
The metrics to retrieve. Required.
dimensions
Array
The dimensions to group by. Required.
dimension_filter_clauses
Object
Filters on dimensions before calculating the metric. Required.
date_ranges
Array
The periods to analyse - each with a start_date and an end_date. Required.
The response is a report view with columns_headers and rows, in the same shape as the other data cubes. The available dimensions and metrics are the ones listed above.
The full request and response, and the operations that list the available metrics and dimensions, are in the Platform Monitoring API reference.
Retention
What to do with it
Review what is indexed
Every indexed property costs index size and query performance. If consumption grows without a use case behind it, the schema is the place to look. See Schema definition.
Compare against the documented limits
Several platform limits are defaults that can be raised, and knowing your actual consumption is what makes that conversation concrete. See Platform limits.
Related pages
Last updated
Was this helpful?