AIStor Files
Operate

Monitoring

Read export status and capacity, scrape the gateway metrics from AIStor, and set the alerts that matter.

AIStor collects the health and capacity of every export from the gateway on each node. Read them with mc, or scrape them with Prometheus from AIStor. For the gateway's log, see Logging.

Check exports with mc

mc files export list myaistor                    # status and usage of every export
mc files export list myaistor --status fenced    # only fenced exports
mc files export stats myaistor                   # bytes used against each limit

An export that is not serving needs attention. The statuses are listed in Manage exports.

Scrape the metrics

AIStor publishes the gateway's metrics on its own metrics API:

PathWhat it holds
/minio/metrics/v3/filesThis node's gateway: ownership, capacity, and health of its exports
/minio/metrics/v3/files/engineThe gateway's internal engine metrics

AIStor requires a bearer token for a scrape. This prints a Prometheus scrape job for /minio/metrics/v3/files that holds a token:

mc admin prometheus generate myaistor files --api-version v3

The token acts as the alias's user. Use an alias whose user has only the admin:Prometheus permission. The job has one target, the node in the alias. Add every AIStor node as a target, because each node reports only its own gateway.

Metrics

Metrics about one export carry an export_id label.

MetricMeaning
minio_files_gateway_up1 when the gateway on this node answered
minio_files_exportsThe number of exports this node serves
minio_files_exports_unreadExports the last read did not reach in time. They have no series.
minio_files_export_up1 when the gateway answered for the export
minio_files_lease_fenced1 when the export lost ownership and refuses writes
minio_files_lease_held1 when this node owns the export
minio_files_lease_epochThe ownership generation. It increases each time a node takes over
minio_files_lease_renew_age_secondsSeconds since the node last renewed ownership
minio_files_lease_ttl_secondsHow long ownership lasts without a renewal. AIStor sets it from lease_ttl
minio_files_used_bytesBytes stored in the export
minio_files_limit_bytesThe byte limit. 0 means no limit.
minio_files_used_inodesFiles and directories in the export
minio_files_limit_inodesThe file limit. 0 means no limit.
minio_files_build_infoAlways 1. Its version and build labels name the gateway build

Check versions across nodes

Group minio_files_build_info by its version and build labels. After an upgrade, every node reports the same version.

Alerts to set

groups:
  - name: aistor-files
    rules:
      - alert: FilesGatewayDown
        expr: minio_files_gateway_up == 0
        for: 2m
        annotations:
          summary: "AIStor Files on {{ $labels.server }} does not answer"

      - alert: FilesExportFenced
        expr: minio_files_lease_fenced == 1
        for: 1m
        annotations:
          summary: "Export {{ $labels.export_id }} lost ownership and refuses writes"

      - alert: FilesExportNotAnswering
        expr: minio_files_export_up == 0
        for: 2m
        annotations:
          summary: "Export {{ $labels.export_id }} does not answer on {{ $labels.server }}"

      - alert: FilesExportsUnread
        expr: minio_files_exports_unread > 0
        for: 5m
        annotations:
          summary: "The gateway on {{ $labels.server }} does not report {{ $value }} exports in time"

      - alert: FilesExportNearQuota
        expr: minio_files_limit_bytes > 0 and minio_files_used_bytes / minio_files_limit_bytes > 0.9
        for: 10m
        annotations:
          summary: "Export {{ $labels.export_id }} is over 90% of its limit"

The minio_files_limit_bytes > 0 condition skips exports without a limit.

FilesGatewayDown fires only while Prometheus can scrape the node. When a node is down, its gateway reports nothing. Alert on the scrape job's up == 0 as well, so a node that is down also pages.