Zurab Kiknavelidze
06/09/2026, 7:52 AMRocky
06/09/2026, 7:52 AMfe.audit.log and loads them into a StarRocks table (usually named starrocks_audit_tbl__).
* Verify Data: Run a query in StarRocks to ensure logs are arriving:
sql
SELECT * FROM starrocks_audit_db*.starrocks_audit_tbl* LIMIT 10;
If you haven't set this up yet, follow the AuditLoader documentation to create the database/table and install the plugin.
2. Connect Grafana to StarRocks
Since StarRocks is MySQL-compatible, you can use the built-in MySQL data source in Grafana to query the audit table directly.
1. In Grafana, go to Connections > Data sources.
2. Click Add data source and select MySQL.
3. Configure the settings:
* Host: <FE_IP>:9030
* Database: starrocks_audit_db__
* User: Your StarRocks user (ensure it has SELECT privileges on the audit table).
* Password: Your StarRocks password.
3. Create Dashboards
Once connected, you can create panels using SQL. Here are common metrics you can visualize:
* Query Count Over Time:
sql
SELECT $__timeGroupAlias(timestamp, 1m), count(*) as query_count
FROM starrocks_audit_tbl__
WHERE $__timeFilter(timestamp)
GROUP BY 1 ORDER BY 1;
* Slow Queries (Top 10):
sql
SELECT stmt, queryTime, user, clientIp
FROM starrocks_audit_tbl__
WHERE $__timeFilter(timestamp)
ORDER BY queryTime DESC
LIMIT 10;
* Average CPU/Memory Cost per User:
sql
SELECT user, avg(cpuCostNs/1000000) as avg_cpu_ms, avg(memCostBytes/1024/1024) as avg_mem_mb
FROM starrocks_audit_tbl__
WHERE $__timeFilter(timestamp)
GROUP BY user;
Note on Official Templates
While StarRocks provides official Grafana templates for system metrics (via Prometheus), there is no single official JSON template for AuditLoader tables because table schemas can vary by version. Most users create custom panels based on the specific fields they need (e.g., scanRows, returnRows, planCpuCosts).
References
• administration/management/monitoring/Monitor_and_Alert.md
• integrations/BI_integrations/Tableau_Desktop.md
• integrations/BI_integrations/Querybook.mdZurab Kiknavelidze
06/09/2026, 7:58 AMRocky
06/09/2026, 7:58 AMRUNNING).
* Endpoint: GET http://<FE_IP>:8030/api/query_detail
* Prerequisite: Ensure enable_collect_query_detail_info = true is set in your FE configuration.
* Grafana Setup:
1. Install the Infinity or JSON API data source plugin in Grafana.
2. Configure the data source with your FE's IP, port (8030), and Basic Auth (StarRocks username/password).
3. In your dashboard panel, use the data source to parse the JSON response. You can filter for queries where "state": "RUNNING".
2. Using Information Schema (SQL) — Recommended
Since you already have a MySQL connection for AuditLoader, querying the information_schema is the simplest way to see active queries without extra plugins.
* Table: information_schema.warehouse_queries (Available in v3.2+)
* Grafana Query:
sql
SELECT
QUERY_ID,
STATE,
QUERY,
QUERY_START_TIME,
QUERY_DURATION
FROM information_schema.warehouse_queries
WHERE STATE = 'RUNNING';
3. Alternative SQL Commands
If you are on an older version or need broader details, you can use these commands, though they are harder to format in Grafana because they are "PROC" commands rather than standard tables:
* `SHOW PROC '/current_queries'`: Shows queries on the specific FE you are connected to.
* `SHOW PROC '/global_current_queries'`: Shows queries across all FEs (v3.4+).
* `SHOW RUNNING QUERIES`: Best for monitoring the Query Queue status (v3.1.4+).
Summary of Monitoring Options
Metric Type | Method | Best For
Historical | AuditLoader Table | Long-term trends, slow query analysis.
Real-time (Active) | information_schema | Dashboards showing what's running now.
Detailed Profiles | Query Detail API | Deep dives into memory/CPU cost of specific queries.
Counts Only | Prometheus | Monitoring total query load/concurrency.
References
• using_starrocks/running_queries.md
• administration/http_interface/query_detail.md
• sql-reference/information_schema/warehouse_queries.md
• administration/management/resource_management/query_queues.md
References
• using_starrocks/running_queries.md
• administration/management/resource_management/query_queues.md
• sql-reference/information_schema/warehouse_queries.md
• sql-reference/information_schema/information_schema.md