Skip to navigation

AIStore Observability: CLI

View as MarkdownOpen in Claude

AIStore operators and developers can use the AIS CLI to inspect cluster status, alerts, performance, and logs when investigating capacity or performance issues. For flags and syntax specific to a command, run ais COMMAND --help (for example, ais show cluster --help) or refer to the CLI reference.

Table of Contents

Installation

There are several ways to install AIS CLI:

  1. Using the installation script (recommended):
./scripts/install_from_binaries.sh --help

This script installs aisloader and CLI from the latest or previous GitHub release and enables CLI auto-completions.

  1. Follow the quick-start instructions.

  2. For detailed introduction (including installation) and usage, see the CLI Overview.

After installation, configure your AIS endpoint via the ais config cli command or environment variables:

## HTTP
export AIS_ENDPOINT=http://your-ais-cluster-endpoint:port
## or HTTPS
export AIS_ENDPOINT=https://your-ais-cluster-endpoint:port

Cluster Status

QuestionCommandTypical flags
Nodes and their respective health? Any alerts? Out of space? Out of memory?ais show cluster--refresh 1m
How much space is left?ais storage summary--cached, --units, --prefix, --refresh
Are any mountpaths down?ais storage mountpathTo test a selected path: ais storage mountpath fshc 'NODE_ID=MOUNTPATH'; to revalidate its disks: ais storage mountpath rescan-disks 'NODE_ID=MOUNTPATH'
# Get summary of cluster membership, capacity, and health
ais show cluster
# As always, this (and all other) command's options are available via `--help`
ais show cluster --help

Example: Node-level Alerts

$ ais show cluster
PROXY MEM AVAIL SYS CPU(%) UPTIME STATUS ALERT
p[KKFpNjqo][P] 127.77GiB 32% 108h30m40s online **tls-cert-will-soon-expire**
...
TARGET MEM AVAIL CAP USED(%) CAP AVAIL SYS CPU(%) UPTIME STATUS ALERT
t[pDztYhhb] 98.02GiB 16% 960.824GiB 61% 108h30m1s online **tls-cert-will-soon-expire**
...
...

Node Alerts

The following node state flags are examples of red alerts, warnings, and informational states:

  1. Red Alerts - Critical issues requiring immediate attention:

    • OOS - Out of space condition
    • OOM - Out of memory condition
    • OOCPU - Out of CPU resources
    • DiskFault - Disk failures detected
    • HighNumGoroutines - Critical Go scheduler latency: runnable goroutines wait too long to run (name kept for compatibility)
    • CertificateExpired - TLS certificate has expired
    • CertificateInvalid - TLS certificate is invalid
  2. Warning Alerts - Potential issues that may require attention:

    • VoteInProgress - Primary election is in progress
    • Rebalancing - Rebalance operation in progress
    • RebalanceInterrupted - Rebalance was interrupted
    • Resilvering - Resilvering operation in progress
    • ResilverInterrupted - Resilver was interrupted
    • NodeRestarted - Node was restarted (powercycle, crash)
    • MaintenanceMode - Node is in maintenance mode
    • LowCapacity - Low storage capacity (OOS possible soon)
    • LowMemory - Low memory condition (OOM possible soon)
    • LowCPU - Low CPU availability
    • CertWillSoonExpire - TLS certificate will expire soon
    • KeepAliveErrors - Recent keep-alive errors detected
    • NumGoroutines - High Go scheduler latency (name kept for compatibility)
  3. Information States - Normal operational states:

    • ClusterStarted - Cluster has started (primary) or node has joined cluster
    • NodeStarted - Node has started (may not have joined cluster yet)

Node state flags are also exposed via Prometheus metrics - for details, see:

For NumGoroutines and HighNumGoroutines - how scheduler latency is graded, and common causes - see Scheduler Latency Alerts.

Live Performance Monitoring

ais performance (alias ais show performance) exposes six sub‑commands. The two most used are throughput and latency.

# 30‑second rolling throughput for all targets
$ ais performance throughput --refresh 30
# 10‑second latency slice, filter to GET operations
$ ais performance latency --refresh 10 --regex "get"

Key Flags

FlagMeaning
--refresh <dur>Continuous mode; prints every dur
--count <n>Stop after n refreshes
--regex <re>Show only columns matching the regexp
--no‑headersSuppress table headers

See cli-performance.md for sub‑command specifics.

Log Management

TaskCommand
Tail a given node’s logais log show 'NODE_ID' --refresh 10s
Download all logs for a support bundleais cluster download-logs
Rotate logs on one nodeais advanced rotate-logs 'NODE_ID'

For more details on log configuration and analysis, see Observability: Logs.

Common Command Examples

Here are some frequently used command combinations for everyday operations:

# Daily capacity & health snapshot
ais show cluster && ais storage summary
# Watch GET latency for a single target
ais performance latency 't[pDztYhhb]' --refresh 30 --regex "get(\(t\)|cold)"
# Verify no misplaced objects in GCS buckets (non‑recursive)
ais scrub gs --nr --refresh 20s --count 3

Flags such as --refresh <duration>, --count <n>, --regex <re>, --no-headers, and --units are accepted by most monitoring commands; see --help for the definitive list.

Best Practices

  • Regular Health Checks: Run ais show cluster and ais storage summary daily to ensure cluster health and capacity
  • Performance Baselines: Establish baseline performance with ais performance after initial deployment
  • Monitoring Script: Create a shell script with key monitoring commands for daily checks
  • Alert Integration: Pipe CLI output to monitoring systems for automated alerting
  • Log Collection: To collect logs, integrate with a Kubernetes monitoring stack or (at least) use ais cluster download-logs

Troubleshooting Common Issues

IssueCLI CommandWhat to Look For
Node experiencing problems or went offlineais show clusterCheck the ALERT column (example above)
Disk failuresais storage mountpathLook for disabled or detached mountpaths
Performance degradationais performance --refresh 30sCompare against baseline numbers
Failed operationsais log show 'NODE_ID' --severity errorErrors and warnings in the selected node’s log
Network issuesais performance latency --refresh 30sCompare request latency with a baseline; inspect node logs for timeout errors

CLI Resources

DocumentDescription
OverviewIntroduction to AIS observability
LogsConfiguring, accessing, and utilizing AIS logs
PrometheusConfiguring Prometheus with AIS
Metrics ReferenceComplete metrics catalog
GrafanaVisualizing AIS metrics with Grafana
KubernetesWorking with Kubernetes monitoring stacks