docs/en/administration/management/monitoring/metrics-materialized_view.md
From v3.1 onwards, StarRocks supports metrics for asynchronous materialized views.
To allow Prometheus to access the materialized view metadata in your cluster, you must add the following configurations in the Prometheus configuration file prometheus/prometheus.yml:
global:
....
scrape_configs:
- job_name: 'dev'
metrics_path: '/metrics'
# Add the following configurations.
basic_auth:
username: 'root'
password: ''
params:
'with_materialized_view_metrics' : ['all']
....
username: The username used to log into your StarRocks cluster. Unless using the root account, the user must be granted both the user_admin and db_admin roles.password: The password used to log into your StarRocks cluster.'with_materialized_view_metrics': The scope of the metrics to collect. Valid values:
'all': All metrics relevant to materialized views are collected.'minified': Gauge metrics and metrics whose values are 0 will not be collected.0(active) and 1(inactive).0 if the materialized view is not partitioned.