Skip to main content

Inspect cluster state

There are two ways to see what a cluster is doing: read-only SQL run against the database, and shell diagnostics run inside a pod. SQL is always available. Shell diagnostics are disabled by default.

Built-in SQL checks

A fixed catalogue of read-only statements ships with the product. Sixteen at present:

Nodes and sessions

CommandAnswers
show-frontendsCoordinator nodes, their roles and liveness
show-compute-nodesCompute nodes, their warehouse and liveness
show-warehousesWarehouses on a shared-data cluster
show-processlistActive client sessions
show-running-queriesQueries running right now

Jobs and profiles

CommandAnswers
show-loadsThe most recent 100 load jobs
show-routine-loadRoutine load jobs
show-profilelistRecent query profiles
show-proc-statisticPer-database tablet and replica health

Configuration and variables

CommandAnswers
show-frontend-configCoordinator configuration items
show-variablesSession variables
show-variables-changedOnly the session variables that differ from their defaults
show-time-zoneThe cluster's time_zone and system_time_zone
show-resource-groupsResource groups

Catalogs

CommandAnswers
show-databasesDatabases in the default catalog
show-catalogsInternal and external catalogs

Use show-variables-changed rather than show-variables when diagnosing. A full listing runs to thousands of rows.

A request names a saved command rather than carrying a statement, so only catalogue entries run.

Adding your own checks

Custom commands are validated when they are saved, not when they run. A statement must:

  • begin with SELECT or SHOW
  • be a single statement
  • contain no comment markers
  • not write to external storage

Only administrators can add, edit or remove catalogue entries, because entries run with elevated credentials.

Shell diagnostics

Disabled by default. When enabled, anyone who can reach Anywhere can run any command in any pod of the cluster.

The setting is enablePodExec, in Anywhere's configuration file rather than in the Helm chart values. Configuration is read once at startup, so changing it takes a restart to have any effect.

The built-in thread-dump preset works whether or not it is enabled, and is administrator-only.