

# Status variables

In a database cluster group for Aurora, each member cluster keeps its own status counters, as a standalone Aurora DB cluster does. Read status counters on each member cluster, through a direct connection or a pinned session, and combine the results in your client. A session pinned to a member cluster passes status reads through, and the member cluster answers with its own counters.

A member cluster's counters include the sessions and statements that reach it through the routing layer, and its direct connections. For how to compare member clusters, see [Monitoring member clusters side by side](databaseclustergroups-monitoring.md#databaseclustergroups-monitoring-member-clusters-side-by-side). To connect to a member cluster, see [Connecting to a member cluster directly](databaseclustergroups-connecting.md#databaseclustergroups-connecting-direct).

## Status reads and counters
<a name="databaseclustergroups-status-variables-where"></a>

The following table shows what each status read returns at the routing endpoint and on a member cluster.

In a session that isn't pinned, `SHOW STATUS`, `SHOW GLOBAL STATUS`, and `SHOW SESSION STATUS` return their two columns with no rows. A monitoring agent at the routing endpoint gets no counters, so point it at each member cluster endpoint. The routing layer doesn't answer other server-wide reads in a session that isn't pinned. `SHOW ENGINE INNODB STATUS` returns an error. Run it on each member cluster, or in a session pinned to it. The following table shows what each read returns.


| Read | At the routing endpoint, unpinned | On a member cluster | 
| --- | --- | --- | 
| SHOW STATUS, SHOW GLOBAL STATUS, and SHOW SESSION STATUS | The column names, with no rows | The member cluster's counters, for the instance that you're connected to | 
| SHOW ENGINE INNODB STATUS | An error. Pin the session to a member cluster, or connect to the member cluster directly | The member cluster's state, for the instance that you're connected to | 
| Any of the preceding reads in a session pinned to a member cluster | Passed through to the pinned member cluster, which answers with its own counters | Not applicable | 
| LAST\_INSERT\_ID(), ROW\_COUNT(), FOUND\_ROWS() | Routed to the member cluster that served the statement they report on, so a follow-up read returns that member cluster's value | The member session's values | 

`SHOW STATUS` returns no rows at the routing endpoint with or without a `LIKE` or `WHERE` filter. The routing layer exposes no status counters of its own through SQL, including `Ssl_cipher` and `Ssl_version`; read the negotiated TLS version from the client.

**Reading counters on member clusters**

A member cluster's counters behave as they do on a standalone Aurora MySQL DB cluster. For the counters, see [Aurora MySQL global status variables](AuroraMySQL.Reference.GlobalStatusVars.md).

The following read runs on a member cluster, over a direct connection to one of its instances.

```sql
SHOW GLOBAL STATUS WHERE Variable_name IN ('Threads_connected', 'Threads_running', 'Questions');
```

The following statements read the same counters through the routing endpoint, in a session pinned to member cluster `member-b`, then unpin.

```sql
SET SESSION router_cluster_pin = 'member-b';
SHOW GLOBAL STATUS LIKE 'Threads_connected';
SET SESSION router_cluster_pin = DEFAULT;
```