# StarRocks

The **StarRocks** page connects to one frontend (FE) of a cluster over SQL, the way a MySQL client does, and reads what the cluster reports about itself: which nodes are up, which loads failed, what is running now, how big the tables are and how far compaction is behind. It also reads each node's metrics port for live charts, and the node's log files over Session Manager.

StarRocks is a [Labs](https://arnscope.com/docs/labs) page: it is off until you tick **StarRocks** in **Settings → Labs**, and then appears in the sidebar under Data. It is in Labs because it is not an AWS service and needs a database user and network access to the cluster before it shows anything.

The session is **read only** until you turn on the **Writes** switch in the header (see [Writes](#writes)). ARNscope never runs DDL, grants or loads for you. The actions that change something, **Stop query**, **Set profiling** and **Add forwards and restart**, each ask first (see [What changes something](#what-changes-something)).

## Find your way

| You want to know | Go to |
| --- | --- |
| Is the cluster healthy right now? | [Overview](#overview): health tiles, then live charts |
| Will a frontend run out of heap, and how fast do tablets grow? | [Capacity](#capacity) on the Overview |
| What failed, and why? | [Errors](#errors) on the Overview, and [Loads](#loads) for cancelled loads |
| Is a load slow or cancelled? | [Loads](#loads) |
| What is running, what just ran, and how do I stop one? | [Queries](#queries) |
| Which table is big, or has a high compaction score? | [Storage](#storage) |
| Which node is down, and who is the leader? | [Nodes](#nodes) and its [Leader](#leader) section |
| What did a node write to its log? | [Logs](#logs) |
| Why do some nodes have no charts? | [Live routes](#live-routes) |
| How do I stop a query or turn on profiling? | [Writes](#writes) |

## Add a cluster

1. Open **StarRocks**, choose the profile and region in the title bar, and click **Add cluster** (the + in the **Clusters** pane).
2. Fill in:
   - **Host**: a frontend's address, and **Port**: its query port, usually `9030`.
   - **Connect through**: **ARNscope tunnel** (a saved [SSM tunnel](https://arnscope.com/docs/ssm-tunnels) to the FE), **My own tunnel** (a local port you forward yourself) or **Direct**.
   - **User** and the password, from a **Secrets Manager** secret or typed in (**Enter password**).
3. Save, select the cluster and click **Connect** (or **Start tunnel and connect** when its tunnel is stopped).

StarRocks has no IAM login, so a cluster saved with IAM shows "StarRocks has no IAM login. Edit this cluster to use a Secrets Manager secret or a typed password." We recommend a Secrets Manager secret: ARNscope reads it with your AWS profile when you connect, so access stays under IAM and no password is stored in the app. A typed password lasts for that session only.

A cluster saved without an AWS profile shows under every profile and region.

### Which user to connect as

Any StarRocks user can connect. `root`, or a user with `OPERATE ON SYSTEM`, sees everything; other users see fewer views.

If you would rather not keep an admin login in ARNscope, open **Optional: a read-only observer user** on the connect panel. It shows SQL for a user that can look but not change anything, with the user name you type (default `arnscope_observer`). ARNscope never runs it. Run it yourself as an admin, in your own client or a write-mode Query console, and keep the password in a Secrets Manager secret (`username`/`password`):

```sql
CREATE USER IF NOT EXISTS 'arnscope_observer'@'%' IDENTIFIED BY '<password>';
GRANT OPERATE ON SYSTEM TO USER 'arnscope_observer'@'%';
-- Optional: task_runs only lists databases the user holds a privilege on.
-- This also lets the user read every table; leave it out if you only need the cluster views.
GRANT SELECT ON ALL TABLES IN ALL DATABASES TO USER 'arnscope_observer'@'%';
```

`OPERATE ON SYSTEM` is what lets `SHOW FRONTENDS`, `SHOW BACKENDS`, `SHOW COMPUTE NODES` and the `SHOW PROC` views run. Table queries are not part of this page; they live in the Databases page's Query console.

## The header

| Item | Meaning |
| --- | --- |
| Cluster name | Click to copy it. Right-click to copy `host:port` or the host. |
| **Connected** | The read-only session is open. |
| Access chip | What this user can see. **Full access**, **Limited · N views need a grant**, **Limited · N views unavailable** or **Not StarRocks**. Click it to open **Access**. |
| **Writes** | The switch **Allow writes**, with **Writes off** or **Writes on** beside it. Off by default for every connection. See [Writes](#writes). |
| **Disconnect** | Closes the session. Changing profile or region, or picking another cluster, also closes it. |
| **Version** | The server's `current_version()`. "Not StarRocks" when it did not answer: the server is not StarRocks or not reachable. |
| **User** | The StarRocks user you connected as. |

Version and User sit in the strip under the header.

### Access

The **Access** dialog runs a capability check: one harmless statement per source, and lists each view as **OK**, **Needs OPERATE ON SYSTEM** or **Unavailable**, with the server's error. When a grant is missing it shows the exact statement for your user (`GRANT OPERATE ON SYSTEM TO USER '<you>'@'%';`) with **Copy grant**.

| View | Needs |
| --- | --- |
| Health, Nodes, Errors | `SHOW FRONTENDS` and `SHOW BACKENDS` (`OPERATE ON SYSTEM`) |
| Loads | `information_schema.loads` (StarRocks 3.1 or later; lists only loads into tables this user can access) |
| Queries | `SHOW PROC '/global_current_queries'` (`OPERATE ON SYSTEM`) |
| Storage | `information_schema.partitions_meta` (StarRocks 3.x; lists only tables this user can access) |

**Optional sources** are shown as chips, marked "· off" when this user cannot read them or the version lacks them: Compute nodes, Routine loads, Load history, Task runs (24h), Query profiles and Tablet health (`SHOW PROC '/statistic'`, needs `OPERATE ON SYSTEM`). A view still opens without its optional sources; the parts they feed show "n/a" or a note.

A failed check is not kept: after you add a grant, **Refresh** on the tab (or **Run the capability check again**) picks it up without reconnecting.

## How reading works

- Nothing is read until you open a tab on a connected cluster. After that, a tab reads again only when you click its **Refresh** or, if you choose, on an interval (below). A section you fold on the Overview reads nothing.
- **Auto-refresh** is off until you pick an interval from the menu beside **Refresh**: 10 s, 30 s, 1 min or 5 min (Loads and Storage start at 30 s, because they scan `information_schema`). The menu says what a tick re-reads. Ticks run only while the page and the tab are on screen and the window is visible, skip while another read is still running, and back off after failures.
- Statements run one at a time on the one session.
- Each tab says when it was read: "Read at 14:02 (this Mac)".
- Each statement returns at most 1,000 rows or 1 MiB. When a result was cut off, the tab says "Some results were cut off at the per-statement limit (1,000 rows or 1 MiB), so this view may be incomplete."

### Server times and your time zone

StarRocks writes its times on the cluster's own clock. ARNscope works out that clock's UTC offset once per session from `SELECT now()`, rounded to 15 minutes so a little drift or network delay does not matter, and converts every server time to the time zone you chose for the app (the zone chip in the title bar, or **Settings → Time zone**). So the **Errors** list, **Created**, **LastHeartbeat**, load start times and query start times all read on the same clock as the rest of ARNscope.

| Where | What you see |
| --- | --- |
| A converted time | Your chosen zone, 24-hour. Hover it for the value as the server wrote it, for example "Server wrote: 2026-11-12 20:36:58 (UTC+00:00)". Column headers say which zone, for example "Kolkata time, converted from the server clock (UTC+00:00)". |
| Copying a time | ISO 8601 with the shown zone's offset, for example `2026-11-13T02:06:58+05:30`. Export CSV writes UTC (`…Z`). |
| "Today" in the **Errors** list | Today in your chosen zone: a time from today shows only the clock, an older one shows the date ("Nov 12, 17:37"). |
| "Read at …" | When ARNscope read the data, in your chosen zone; hover for the date and zone. |
| "(server)" in a column name, for example **Created (server)** | Only when the server's clock did not answer: those times are shown exactly as StarRocks wrote them, unconverted. |
| Logs tab | The file list follows your zone. Log lines keep the node's own time zone (often UTC) and are never rewritten. |

If the cluster's own zone changes for daylight saving during a long session, converted times can be an hour off until the offset is read again, which happens when you reconnect to the cluster. The load "nights" on the Loads tab follow the server's date.

## Tabs at a glance

The tab names carry a short warning when something needs a look:

| Tab label | Shows when |
| --- | --- |
| **Overview · N errors** | The error list has entries. |
| **Loads · N cancelled** | Loads were cancelled in the last 24 hours. |
| **Queries · N slow** | Queries have been running for over 30 s. |
| **Storage · compaction N** | The worst partition's compaction score is above 100. |
| **Nodes · N down** | Nodes report `Alive` false or an `ErrMsg`. |

## Overview

Four sections, in this order: **Health**, **Live**, **Capacity**, **Errors**. Each folds, and the fold is remembered.

### Health tiles

Each tile links to the tab that explains it.

| Tile | What it means | Healthy | When to worry |
| --- | --- | --- | --- |
| **Frontends alive** | Frontends answering, out of all frontends. The detail names the leader. | All alive, a leader named. | Any frontend down (red), or "No leader reported": the cluster cannot accept DDL or loads without a leader. **Show nodes** to see which one and its `ErrMsg`. |
| **Backends and compute nodes alive** | Backends (BE) and compute nodes (CN) answering, with how many of each. | All alive. | Any down (red): queries and loads lose that node's capacity, and its tablets lose a replica. Zero nodes at all is amber. |
| **Versions** | How many different StarRocks versions the nodes run. | 1. | More than 1 (amber): a rolling upgrade is in progress or stalled. The detail lists them. |
| **Nodes reporting ErrMsg** | Nodes whose `ErrMsg` column is not empty, with their addresses. | 0. | Any (red). Usually a missed heartbeat; the error text is in the Errors list and on the Nodes tab. |
| **Paused routine loads** | Routine loads (continuous loads, typically from Kafka) in state `PAUSED`. | 0. | Any (amber): that stream is not loading. The reason is in the Errors list. StarRocks pauses a routine load, for example, after too many bad rows. Fix the cause, then an admin resumes it (`RESUME ROUTINE LOAD`). **Show routine loads** filters the Loads tab. |
| **Failed MV task runs (24h)** | Task runs (materialized view refreshes and submitted tasks) in state `FAILED` in the last 24 hours. | 0. | Any (amber): a view may be stale. **Show failed runs** filters the Errors list. |
| **Cancelled loads (24h)** | Loads in state `CANCELLED` in the last 24 hours. StarRocks reports a failed load as `CANCELLED`. | 0. | Any (amber): data from that load is missing. **Show cancelled loads** opens them on the Loads tab. |
| **Running queries** | Queries running now, the same list as the Queries tab. | Few, none for long. | Any running over 30 s turns it amber ("N over 30 s"). |
| **Queries running on backends** | Shown instead when this user cannot read the running-query list: the sum of each backend's `NumRunningQueries`. This counts query fragments on backends, not frontend queries. | | Use it only as a rough load signal. |
| **Worst partition compaction score** | The highest compaction score of any partition, and which partition. See [Compaction score](#compaction-score). | Under 10. | 10 to 100 is amber (building up); above 100 is red. **Show storage**. |

"n/a" means the source is not available to this user or on this version.

### Live

Below the health tiles, **Live** reads each node's metrics port (the `HttpPort` the node reports) and charts the cluster.

| Tile | What it means | Healthy | When to worry |
| --- | --- | --- | --- |
| **CPU (average)** | Average CPU use of the backends and compute nodes. | Has headroom for your peaks. | Pinned near 100 % for long: queries queue and slow down. Look for heavy queries on the Queries tab. |
| **Process memory** | Memory used by the backend and compute node processes, summed. | Steady. | Climbing without coming back down, or near the machines' memory: queries may fail with memory errors. |
| **Queries per second** | Queries per second, across all frontends. | Your usual level. | A sudden drop to 0 (clients cannot reach the cluster) or an unexpected spike. |
| **Errors per second** | Failed queries per second, across all frontends. Amber when above 0. | 0. | Any sustained rate. The Queries tab and the Logs tab show what is failing. |
| **p99 latency** | The 99th-percentile query time, in ms, of the slowest frontend: 99 % of queries finish faster. | Steady at your usual level. | Rising: a few queries are getting slow. Often comes with high compaction scores or high CPU. |
| **Disk available** | Free disk space on the backends and compute nodes, summed. | Plenty, and not shrinking fast. | Falling quickly or near zero: loads will fail when disks fill. |
| **Tablet compaction score (node)** | The worst compaction score any node reports right now. The line at 100 on its chart marks the danger level. | Under 10. | Above 100 (red); 10 to 100 is amber. **Show storage** to find the partition. |

Six charts follow: CPU % (BE and CN average), process memory (GiB), queries and errors per second (errors on their own right-hand axis, since they are usually far fewer), p99 latency, compaction score (worst node, with the 100 line) and disk available. A chart shows from the first reading; rates (per second) need two readings.

- **Live starts off.** Until you click **Start updates**, the bar reads "Live updates are off", the charts say "Start updates to see charts." and nothing reads the metrics ports. Once started, it keeps running while the page stays open.
- **Updating every 10 s**: choose 5, 10 or 30 s. **Pause updates** stops reading; the figures dim because they are the last reading, not the current one. "slower while nodes answer slowly" means ARNscope stretched the interval because nodes took long to answer.
- Updates run only while the Overview or Nodes tab is on screen, the page is shown and the window is visible. They stop when you leave the tab. While they run over a tunnel, the tunnel's 10-minute idle stop is held off.
- **Fold Live** (click its heading) and it polls nothing, not even the node list. The heading then reads "paused while folded" with the last CPU and p99 readings. The Overview's sections each fold, and the heading of each folded section carries a summary: Health shows "all fine" or "2 warnings", Capacity its heap and runway, Errors a count.
- ARNscope keeps about one hour of points (360 per node per series), reads at most 32 nodes, four at a time, and waits at most 5 s for each node.

### Live routes

**Live routes** (collapsed on the Overview, for example "Live routes · 2 of 8 unavailable") lists the nodes without charts and why:

| Chip | Meaning |
| --- | --- |
| **Live** | The node answered ("Answered in 41 ms"). |
| **Waiting** | No answer yet. |
| **No route** | "The tunnel has no forward to host:port." See below. |
| **Down** | "The cluster reports this node down, so it is not asked." |
| **Unreachable** | The node or the route failed; the reason is shown. |

Live charts need an ARNscope tunnel or a direct connection. A **My own tunnel** (local port) route reaches only the query port, so the page says "Live charts need an ARNscope tunnel or a direct connection."

When the cluster's tunnel has no forward to the nodes' metrics ports, the page offers **Add forward and restart** (or **Add forwards and restart**). It adds a forward for the FE leader and one backend or compute node (pick it with **Node to watch**; the others stay without charts). If the tunnel runs on the node's own instance, it adds each missing local port instead. The prompt names each `host:port`, how many SSM sessions that uses, and that "The tunnel restarts, so open connections and queries on it end, and this page reconnects." **Not now** dismisses it. With no free SSM session it says so and asks you to stop another tunnel first.

**On-instance tunnels.** A tunnel that runs on one node's own instance forwards only that instance's `localhost`, so it can reach that node's metrics port and no other node's. For the rest, **Live routes** says "Tunnel "name" forwards only localhost (it runs on one instance), so it can't reach the other nodes' metrics ports. Switch it to a remote-host tunnel that forwards each node's address to see them." and offers **Edit tunnel**, which opens the tunnel's form (see [SSM tunnels](https://arnscope.com/docs/ssm-tunnels)) so you can change it to a remote-host tunnel. Nothing changes until you save there.

### Capacity

**Capacity** answers "how long until a frontend runs out of heap?" and "how fast are tablets growing?". It sits between Live and Errors. Its heading shows a summary such as "heap 3.1 of 8 GB · ≈ 11 months". It reads only while the section is open and the Overview is on screen, once per session and again when you click **Read capacity again**.

| Tile | What it means |
| --- | --- |
| **Heap after GC · worst frontend** | The old generation in use on the frontend closest to its maximum heap, with its share of that maximum. It is **an estimate** of heap after garbage collection (what survives young collections). When a frontend reports no old generation (ZGC), it uses the whole heap in use and the note says so. |
| **Heap runway** | Weeks or months until that frontend reaches its maximum at the current growth, for example "≈ 6 weeks", "over 2 years" or "not growing". Amber under about 9 weeks. |
| **Tablets** | Total tablets across backends and compute nodes, from the node list the Overview already read, with growth per week. |
| **Tablets per node** | The node with the most tablets, the average and its growth. Shared-data compute nodes hold no tablets and are listed on one line. |

Below the tiles, when there is more than one frontend or node, you get heap per frontend and tablets per node, then two daily charts: heap after GC (worst frontend, against its maximum) and total tablets.

Where the heap comes from: one statement on `information_schema.fe_metrics` (StarRocks 3.1 or later), which needs no route from your Mac to the frontends. If that fails, ARNscope reads each reachable frontend's metrics port instead. If neither works, the tablets still show and the tile says why, with **Show live routes**.

**History is kept on this Mac only.** While the section is open, ARNscope stores one reading per cluster per day in the app's local storage (for heap, the lowest reading of the day, which is closest to "after GC"). Nothing is uploaded and nothing is written to the cluster. Growth per week and the runway appear once two readings are **7 days apart**; until then the tile says "Not enough history yet" and when it will be ready. The trend uses the last 90 days, and about 400 days are kept. A day you did not open Capacity has no reading, so open it now and then.

### Errors

One list, newest first, from four sources:

| Source | What it lists |
| --- | --- |
| **node** | Nodes with an `ErrMsg`, timed by their last heartbeat. |
| **routine load** | Routine loads that are paused or cancelled now, with the reason StarRocks recorded. |
| **load** | Loads cancelled in the last 24 hours, with their error message. |
| **task run** | Task runs that failed in the last 24 hours, with their error code and message. |

The routine load, load and task run sources return at most 200 rows each. Use the **Source** chips to filter. Click a row to see the full message and the statement it came from ("From"), with **Copy statement**. If a source could not be read, a note says which one and why. With nothing to show: "No errors found".

## Loads

From `information_schema.loads`: every load into tables this user can access, as far back as StarRocks keeps them ("Your tables only; old loads are pruned").

### Summary by database

The top four databases by number of loads over the last 7 days (routine loads are left out of the counts, since they run continuously; "+N routine loads" says how many there were):

- **Verdict**: "7 of 7 nights OK" when the database loaded on at least 4 of the 7 days; otherwise "3 loads in 7 days" (plus ", cancelled" or ", N cancelled"). For a nightly database the verdict is red when a night had a cancelled load and amber when a night has not finished; otherwise it is amber when a load was cancelled.
- **last run**: the start time (server clock) of the newest night's loads, the night's state, rows loaded, rows filtered (amber) and how long it took.
- **Dots**, one per night, oldest first, by the server's date: green "all finished", amber "a load was cancelled", blue "still running", hollow "no loads". Hover a dot for the date and number of loads.
- **Show runs** filters the table to that database for 7 days and selects the run the line quotes.

### Filters and table

**Range** (1, 3 or 7 days), **Type**, **State** and **Database**, with **Clear filters**. The table starts on the most-loaded database and its usual load type. It shows the newest 500 loads; narrow the filters to see older ones.

| Column | Meaning |
| --- | --- |
| **Created (server)** | When the load was submitted, server clock. |
| **Table** | `database.table`. |
| **Type** | `INSERT` (INSERT INTO … SELECT), `BROKER` (Broker Load, for example from S3), `STREAM` (Stream Load over HTTP) or `ROUTINE` (Routine Load). |
| **State** | See below. Cancelled rows are tinted amber. |
| **Rows** | Rows written to the table. |
| **Filtered** | Rows rejected for bad data (amber when above 0). |
| **Duration** | Finish time minus start time (or created time). "—" while running. |
| **Queued** | Start time minus created time: how long it waited to start. Long waits mean the cluster is busy with other loads. |
| **User**, **Label** | Who ran it, and its label. |

| State | Meaning |
| --- | --- |
| `PENDING`, `QUEUEING` | Submitted, waiting to start. |
| `LOADING` | Reading and writing data. |
| `PREPARING`, `PREPARED`, `COMMITED` | Finishing the transaction (`COMMITED` is StarRocks' spelling). The data is not visible yet. |
| `FINISHED` (green) | Done; the data is visible. |
| `CANCELLED` (amber) | Failed or cancelled; nothing from this load was kept. The error says why. |

**Cancelled vs failed**: a load never says "failed". StarRocks reports a failed load as `CANCELLED` and puts the reason in its error message. Task runs (materialized view refreshes) do say `FAILED`. Routine loads say `PAUSED` (stopped, can be resumed) or `CANCELLED` (stopped for good).

Select a load for its details: **Copy label**, **Copy load ID**, **Open profile** (when it has one), the **Error** ("No error recorded." when there is none), and the **Tracking SQL**, the statement that returns the rejected rows. **Open in Query console** puts it in the Databases page's Query console for this cluster without running it. The server records tracking SQL only for loads that filtered rows. The details also list created, started and finished times (server clock), rows loaded, filtered and unselected (dropped by the load's own `WHERE`), rows and bytes scanned, and progress.

## Queries

### Running queries

From `SHOW PROC '/global_current_queries'`, the queries running on every frontend, longest first, with the SQL text from `SHOW FULL PROCESSLIST`. ARNscope's own statements are left out.

Each row shows how long it has run (amber and tinted over 30 s), user, database, memory, data and rows scanned, the frontend, and the query ID (**Copy**). Long SQL shows three lines with **Show full SQL**. "SQL text not visible: another user's session or another FE." means the processlist did not include that connection. **Copy SQL** and **Open in Query console** (without running it) are under the SQL.

A query running over 30 s is not wrong in itself: big reports and loads take minutes. Look at memory and data scanned to judge whether it is the one slowing everything else down.

### Stop query

**Stop query** cancels a running query. It needs **Writes** on (see [Writes](#writes)); with writes off the button is disabled and the list says "Turn on writes to stop queries". It also asks first:

1. ARNscope checks on a second connection that the query is still running ("Query 7f3c1a2b… is no longer running." if not).
2. A native dialog, **Stop query?**, names the query, who runs it, on which database and for how long. If the query is a load (an `INSERT`), it adds that stopping it "leaves the target table without this run's data until it is re-run". It ends: "Stopping it cancels the work done so far. This can't be undone." Buttons: **Stop query** and **Keep running**.
3. Only after **Stop query** does ARNscope send `KILL QUERY '<id>'`, once. The row shows **Stop requested**, and the list is read again every 2 s (at most 10 times) until the query is gone.

An unanswered dialog expires after a minute and the query keeps running. One stop dialog is open at a time. Stopping another user's query needs `OPERATE ON SYSTEM` ("Needs OPERATE ON SYSTEM to stop other users' queries."). Every attempt, including cancelled ones, goes to the local activity log with the query ID, whose query it was and the outcome, never the SQL. Stopping a query needs the desktop app.

### Finished queries

Under the running queries, **Finished queries** has two views. **Profiles** is the default.

**Profiles** lists up to 100 query profiles (`SHOW PROFILELIST LIMIT 100`): **Started (server)**, **Time**, **State** (Finished, Error, Running), **Query ID** and **Statement**. Click a row or press Enter to read its raw profile in a read-only viewer, with a summary line such as "Total 41 s · planner 182 ms · peak memory 3.8 GB". **Copy profile**, **Close (Esc)**. A profile larger than 1 MiB is cut off.

**Recent** lists the last 15 minutes of queries, short ones included, from the AuditLoader table (`starrocks_audit_db__.starrocks_audit_tbl__`), at most 200 rows. Filter by minimum duration, user and state (finished or failed). Without the AuditLoader plugin StarRocks keeps no history of finished queries, so the view says so and offers **Read fe.audit.log in Logs**; if the table exists but this user cannot read it, it shows the `GRANT SELECT` statement for an admin to run. ARNscope never runs that grant.

### Turn on profiling

"No query profiles. Profiling is off, so slow queries aren't recorded." means the cluster does not record profiles. The empty view offers **Set to 30 s (recommended)** and **Custom…** (a duration such as `500ms`, `10s`, `2m` or `1h`). Either one sets the cluster-wide `big_query_profile_threshold`:

```sql
SET GLOBAL big_query_profile_threshold = '30s';
```

This changes a setting on the cluster, so it needs **Writes** on, and ARNscope shows a native confirmation before it sends the statement once. Only new queries are profiled, and profiling costs a little on every query it records. With writes off, the same statement is shown with a copy button for an admin to run elsewhere.

## Storage

From `information_schema.partitions_meta`, tables this user can access, largest first (at most 500).

| Tile | What it means | Healthy | When to worry |
| --- | --- | --- | --- |
| **Total size** | Size of the listed tables. "approximate" when the cluster does not report exact sizes and ARNscope adds up the text sizes instead. | | Growth you did not expect. |
| **Largest table** | The biggest table and its size. | | |
| **Worst partition compaction score** | The highest compaction score, with its partition. | Under 10. | 10 to 100 amber, above 100 red. |
| **Unhealthy or inconsistent tablets** | Tablets (the pieces a partition is split into, each stored as replicas on several nodes) that are missing or have a bad replica, plus tablets whose replicas disagree, out of all tablets. From `SHOW PROC '/statistic'`. | 0. | Any (red). Right after a node goes down this is expected while StarRocks repairs the replicas; if it stays above 0 after the node is back, check the Nodes tab and the backend logs. |

Tablet health needs `OPERATE ON SYSTEM`; without it the page says so with **Open Access**.

The table lists **Database**, **Table**, **Partitions**, **Rows**, **Size** and **Max compaction score** (rows above 100 tinted red). Click a table, or press Enter, for its partitions:

- **Model and keys**: **Model**, **Primary key**, **Sort key**, **Partition key**, **Distribution** and **Buckets**, from `information_schema.tables_config`.
- **Partitions**, worst compaction score first (at most 1,000): **Partition**, **Range** (a one-day range shows as its date), **Buckets**, **Rows**, **Size**, **Avg score**, **P50 score**, **Max score** (100 or more tinted red), **Visible ver.** (the newest version queries read), **Compacted** (the version compaction has merged up to) and **Version time (server)**.
- **Copy table name**, **Open in Query console** with `SHOW PARTITIONS FROM` the table (not run), **Copy SHOW PARTITIONS statement**, **Close (Esc)**.

### Compaction score

Every load into a StarRocks table writes a new small batch of data (a version). Queries have to read and merge all the batches that have not been compacted yet. Compaction runs in the background and merges them into fewer, larger files. The compaction score measures how much merging is waiting: roughly how many un-merged batches a query has to read.

| Score | ARNscope shows | Meaning |
| --- | --- | --- |
| Under 10 | Normal | Compaction keeps up. |
| 10 to 100 | Amber | Building up. Watch it. |
| Above 100 | Red | "Writes are outpacing merges, and queries slow down." |

The usual cause is many small, frequent loads into the same partitions, faster than compaction can merge them. What helps: load less often in bigger batches, check that the backends are healthy and have spare CPU and disk, and find the hot partition here (the partition list sorts worst first). A **Compacted** version far behind the **Visible ver.** means compaction is lagging on that partition.

The partition score (Storage, Overview tile) comes from `partitions_meta`. The node score (Live) comes from each node's metrics: the frontend leader's maximum tablet score, and on backends the worse of their base and cumulative compaction scores. Both use the same thresholds.

## Nodes

The tab opens with **Leader**, then the node tables, then **Live per node**.

### Leader

**Leader** is about the frontends only. Its heading summarises it: "fe-1 for 3 days · quorum 3 of 3 voting · lag 0". Fold it to hide the detail.

| Tile | What it means |
| --- | --- |
| **Leader** | The frontend that is `LEADER` now. Red when there is none. |
| **Quorum** | Voting frontends (leader and followers) alive out of all voting frontends, and how many more can be lost. A majority must be alive for elections and for metadata writes, so loads cannot commit and DDL fails without one. At the minimum it says "can lose 0 more"; with no majority it says "metadata writes stop". Observers do not vote. |
| **Replay lag** | The worst follower's (or observer's) `ReplayedJournalId` behind the leader's, in journal ids. A frontend that is far behind (10,000 ids or more) or falling further behind across the last three reads shows a notice: queries sent to it see older metadata. |
| **Observers** | How many observers are alive. |
| **Restarted in the last 24 h** or **Last heartbeat (oldest)** | A frontend whose `StartTime` is within a day, or the oldest heartbeat. |

The **Frontends** table adds **Behind leader**, and **Trend**, a small chart of that lag at each **Refresh** in this session. A trend needs a few refreshes (or auto-refresh) to draw. When the leader changed between two of your reads, a notice says from whom to whom.

**Election history** reads nothing until you ask. **Read history from fe.log** finds each frontend's instance, asks you to confirm the instances (it starts Session Manager sessions, like the [Logs](#logs) tab), then reads each frontend's `fe.log` and `fe.gc.log` (the newest 14 `fe.log` files, 8 GC files). It lists each leadership move: when it happened, **No leader for** (from the first sign the old leader was lost to the new leader's election), and what the logs show. A line chart shows who led over time. Select a move for:

- **Lines around the move**: the merged `fe.log` lines of all frontends, with a window of ±30 s, ±2 min or ±10 min, and **Open in Logs** on any line, which opens that frontend's file in the [Logs](#logs) tab at that line.
- **Why**: the old leader's heap after GC that day (from [Capacity](#capacity), so only if that section was open that day), its longest GC pause before the move from `fe.gc.log` (pauses over 1 s are looked for), and the BDB heartbeat timeout. A pause longer than the timeout makes the followers treat the leader as gone and elect another. ARNscope shows these readings side by side; it does not decide the cause. **Open Capacity** jumps to the Overview's Capacity section.

History reaches back only as far as the logs on disk: `fe.log` rolls daily and StarRocks keeps about 7 days by default (`sys_log_delete_age = 7d`). If there was no change in that time, the view says who has led throughout.

### Node tables

Three tables, exactly as `SHOW FRONTENDS`, `SHOW BACKENDS` and `SHOW COMPUTE NODES` return them, so a newer version's extra columns still show. `Alive` and `ErrMsg` are moved right after the node's address. Rows that are down or erroring are tinted red, and the table heading says "N down or erroring". Time columns are marked "(server)". A cluster in shared-data mode runs compute nodes instead of backends, so "No backends" is normal there.

| Column | What it means | Healthy | When to worry |
| --- | --- | --- | --- |
| `Alive` | The leader hears this node's heartbeat. | `true` | `false`: the node is down or unreachable. |
| `ErrMsg` | The last heartbeat error. | Empty | Any text, for example a heartbeat timeout. Open the node's logs. |
| `LastHeartbeat` | When the leader last heard from it (server clock). | A few seconds ago. | Minutes old. |
| `Role` (frontends) | `LEADER`, `FOLLOWER` or `OBSERVER`. | Exactly one `LEADER`. | No leader. |
| `Version` | StarRocks version on that node. | The same on every node. | Mixed versions outside an upgrade. |
| `TabletNum` | Tablets stored on the node. | Similar across nodes. | One node far above the others (uneven data). |
| `UsedPct`, `MaxDiskUsedPct`, `AvailCapacity` | Disk use. | Room to grow. | Close to full: loads fail when disks fill. |
| `NumRunningQueries`, `CpuUsedPct`, `MemUsedPct` | Current load on the node. | Your usual level. | One node much busier than the rest. |
| `SystemDecommissioned`, `ClusterDecommissioned` | The node is being removed. | `false` | `true` when you did not plan it. |

Below the tables, **Live per node** charts each node separately (one line per node): CPU %, memory (process memory on backends and compute nodes, JVM heap on frontends), queries and query errors per second, p99 latency, tablet compaction score (with the 100 line) and disk available. **Live routes** is open here and lists every node with how it is reached.

## Logs

The **Logs** tab reads a node's StarRocks log files (such as `fe.log`) from `/var/log/starrocks/fe`, `/var/log/starrocks/be` or `/var/log/starrocks/cn` on the node's EC2 instance, over Session Manager, with the same machinery as [EC2 Files](https://arnscope.com/docs/ec2-files). It is read only and confined to those folders. A frontend also lists `/opt/starrocks/fe/log`, where `fe.audit.log` stays by default.

1. **Node**: pick one (grouped by Frontends, Backends and Compute nodes; nodes that are down are dimmed).
2. ARNscope finds the node's instance:
   - When the cluster's tunnel runs on the node's own instance, it reads that instance.
   - Otherwise it matches the node's private IP to an EC2 instance in the page's profile and region. Because that is a best guess, it asks first: **Confirm the instance** shows `10.0.11.4 → i-0697d3b1e8c42a5f9 (name)` with the profile and region, "This instance was matched by its private IP, not taken from the tunnel. Opening it starts a Session Manager session." Click **Read its logs** or **Cancel**.
   - Several instances with that IP: pick one. None: "No EC2 instance in … has the private IP …, so its logs can't be read from here."
3. Pick a folder and a file. ARNscope reads the last 64 KB and shows the last 200 lines. **Load 200 older lines** shows more of what was already read.

Sessions may be recorded by your account, including file contents.

### The reader

- **Parsed columns.** Frontend (log4j) and backend or compute node (glog) lines are split into **Time**, **Level**, **Thread**, **Source** and **Message**, with line numbers. Narrow windows drop the Source and Thread columns first. Error lines are tinted. Times keep the node's own time zone (often UTC) and are never rewritten.
- **Folded traces.** A stack trace sits under its line as "+N lines"; click to open it.
- **Level chips** (ERROR, WARN, INFO, DEBUG, with counts) filter the lines read; hidden lines fold into "N lines hidden". Right-click a line's thread for **Only thread …**.
- **Find** (⌘F) searches the lines already loaded, highlights matches, and steps with Enter and Shift+Enter.
- **Search whole file** runs `grep -F` on the instance: plain text, case-sensitive, over the whole file, not only the 64 KB read. The newest 2,000 matches come back with their **real line numbers** in the file, and the header says how many there were in all. The ERROR and WARN chips filter there too, and a level alone with no text works. Searches take at most 200 characters on one line.
- **Search with /greplog** (backends and compute nodes only, when their HTTP port is reachable, see [Live routes](#live-routes)): the node searches its own logs by regular expression, **Level** (Info, Warning, Error or above, or Fatal) and **Time** (last hour, 6 hours, 24 hours, or all kept logs), at most 2,000 lines. Backend and compute node logs mark levels as `E`, `W`, `I`, not `ERROR`, so search by level rather than by the word. It also works when the node's instance cannot be found.
- **fe.audit.log** opens as a table of queries: time, user, database, state, duration and statement, with **All**, **Failed** and **Slow ≥ 5 s** filters and a details pane (rows and bytes scanned, memory, query ID). **Find in fe.log** searches the frontend's `fe.log` for that query's ID.
- **Follow** is off until you turn it on, and it turns off for every file you pick. Every 5 seconds it reads only the bytes written since the last read (at most 256 KB each time), not the whole file again. It pauses while the page, the tab or the window is hidden, and stops with a message if the session ends; a rotated file is read again from its newest lines.

Other controls: **Jump to the newest line**, **Wrap lines**, **Read the last lines again** and **Open in Files**, which opens the same file in EC2 → Files. A log file that is a link pointing outside the log folder is refused.

The Session Manager session opens when you pick a node and closes when you disconnect, pick another cluster or cancel.

## Writes

The session starts read only. The **Allow writes** switch in the header turns on the actions that change the cluster, for this connection only. Turning it on asks for a native confirmation, shows **Writes on** with the minutes left, and turns itself off again after 15 minutes without a write. See [Writes and confirmations](https://arnscope.com/docs/writes).

On this page two actions need Writes on, and each still asks again before it runs:

- **Stop query** (Queries tab): `KILL QUERY`.
- **Set profiling** (Queries tab, Profiles): `SET GLOBAL big_query_profile_threshold`.

A StarRocks write only succeeds when the user you connected as has the privileges for it; ARNscope does not grant any. Everything else on this page reads. How the switch works across all connection types, and what it blocks, is on [Writes](https://arnscope.com/docs/writes).

## What changes something

| Action | What it changes | How it asks |
| --- | --- | --- |
| **Stop query** | Cancels one running query (`KILL QUERY`). | Needs Writes on. Native dialog naming the query, user and database; sent once; logged locally. |
| **Set profiling** | Sets `big_query_profile_threshold` for the whole cluster. | Needs Writes on. Native confirmation; sent once. |
| **Add forward(s) and restart** | Adds forwards to the cluster's saved tunnel and restarts it, ending connections on it. | Only on the button; the prompt names each forward and the SSM sessions it uses. |
| **Edit tunnel** (Live routes) | Opens the tunnel's form. | Nothing changes until you save the form. |
| Picking a node on **Logs**, or **Read history from fe.log** | Starts a Session Manager session on that instance (logged in CloudTrail). | An IP match asks first. |
| **Connect** through a stopped tunnel | Starts the tunnel's SSM sessions. | Only on **Start tunnel and connect**. |
| **Capacity** | Stores one reading a day in this app on your Mac. Nothing is written to the cluster. | Only while the section is open. |

Everything else reads. The observer user SQL, the audit table grant and **Open in Query console** never run anything from this page.

## Permissions

| What | AWS actions |
| --- | --- |
| Connect with a Secrets Manager password (also read again for **Stop query**, **Set profiling** and the live metrics, which use a second connection) | `secretsmanager:GetSecretValue` |
| Pick a secret in the cluster dialog | `secretsmanager:ListSecrets` |
| Connect through an ARNscope tunnel | The tunnel's SSM permissions, see [SSM tunnels](https://arnscope.com/docs/ssm-tunnels#permissions) |
| Logs tab and **Read history from fe.log** | `ec2:DescribeInstances` (to match the node's IP), `ssm:StartSession`, `ssm:TerminateSession` |

On the StarRocks side, `OPERATE ON SYSTEM` covers the node views, running queries, tablet health and stopping other users' queries. `SELECT` on a database's tables lets the user see that database's loads, partitions and task runs. `SELECT` on the AuditLoader table is needed for **Recent** queries. **Stop query** on another user's query and **Set profiling** need the matching StarRocks privileges as well as Writes on. The [IAM permission check](https://arnscope.com/docs/iam-permission-check) shows which AWS actions your role has.

## Limitations

- StarRocks has no IAM login. Use a Secrets Manager secret (recommended) or a typed password.
- One frontend per cluster connection. The page does not fail over to another frontend.
- The session is read only until you turn on Writes, and a StarRocks write needs a user with the privileges for it. Only **Stop query** and **Set profiling** are offered; there is no DDL, grant, load or other setting change from this page.
- Restricted users see only the loads, tables and task runs they have privileges on, so counts can be lower than the cluster's real totals.
- Load history goes back only as far as StarRocks keeps it, and the Loads table shows at most 500 loads per read.
- Results are cut at 1,000 rows or 1 MiB per statement; the Storage tab lists the 500 largest tables and 1,000 partitions per table. **Recent** queries covers the last 15 minutes, at most 200 rows, and needs the AuditLoader plugin.
- Auto-refresh is opt-in and off by default, and there are no alerts.
- Live charts need an ARNscope tunnel or a direct connection; a local port route gets no charts. A tunnel that runs on one node's instance reaches only that node's metrics port, not the other nodes'. At most 32 nodes are charted, and charts keep about one hour.
- **Heap after GC** is an estimate, taken from the old generation in use (or the whole heap on collectors that report no old generation), not from the garbage collector's own log.
- **Capacity** needs `information_schema.fe_metrics` (StarRocks 3.1 or later) or a reachable frontend metrics port. Growth and runway need readings at least 7 days apart, one reading is kept per day and only while the section is open, and the history lives only on this Mac: it is not shared with your team and is lost if you clear the app's data.
- **Election history** reaches back only as far as `fe.log` and `fe.gc.log` still exist on disk, about 7 days by default. It reads logs only when you ask, and shows readings next to a move without naming a cause. The **Why** heap figure exists only for days you had Capacity open.
- The Logs tab reads only `/var/log/starrocks/{fe,be,cn}` (and a frontend's `/opt/starrocks/fe/log`) on EC2 instances it can find in the page's profile and region. It reads the last 64 KB of a file; older lines need **Search whole file**. Follow reads only new bytes, every 5 seconds.
- `information_schema.loads` needs StarRocks 3.1 or later, and the Storage tab needs 3.x.

Missing something, or run a cluster that works differently? Write to [hello@arnscope.com](mailto:hello@arnscope.com) and tell us what you use. We read every request.

Source: https://arnscope.com/docs/starrocks
