Servers

Get the database's health

GET/instances/database-health/

read Read: looks, changes nothing. Scopes

How the panel's database is doing: response time, size, connections, largest tables and the last backup, with each problem found as a warning in plain words. Panel operators only.

Response

200 OK

  • statusstringrequired

    ok, warn (see warnings) or down.

  • checked_atstring (date-time)required
  • errorstring

    Why the database cannot be reached (down only).

  • ping_msnumber

    How long a trivial query took.

  • versionstring

    The database server's version.

  • uptime_secondsinteger
  • size_bytesinteger
  • connectionsobject
    • activeintegerrequired
    • idleintegerrequired
    • idle_in_transactionintegerrequired
    • panel_totalintegerrequired

      Connections to the panel's database.

    • server_totalintegerrequired

      Connections to the whole database server.

    • maxintegerrequired

      The most the database server accepts.

  • cache_hit_rationumbercan be null

    Share of reads served from memory (0–1).

  • deadlocksinteger
  • commitsinteger
  • rollbacksinteger
  • temp_bytesinteger
  • stats_sincestring (date-time)can be null

    Since when the counters above count.

  • longest_transaction_secondsinteger
  • long_running_queriesinteger

    Queries running for over a minute.

  • lock_waitersinteger
  • pending_migrationsintegercan be null

    Database changes not applied yet (restart the panel).

  • largest_tablesobject[]
    • tablestringrequired
    • labelstringrequired

      What the table holds, in plain words.

    • size_bytesintegerrequired
    • rowsintegerrequiredcan be null
    • dead_rowsintegerrequiredcan be null

      Old rows waiting to be cleaned up.

    • last_vacuumstring (date-time)requiredcan be null
  • backupobjectcan be null
    • last_success_atstring (date-time)requiredcan be null
    • last_success_sizeintegerrequiredcan be null
    • last_failure_atstring (date-time)requiredcan be null
    • next_run_atstring (date-time)requiredcan be null
    • next_planstringrequiredcan be null

      The backup schedule that runs next.

    • runningbooleanrequired
    • warningstringrequiredcan be null
  • warningsobject[]required
    • levelstringrequired

      warn, or down when the database cannot be reached.

    • messagestringrequired

Errors

  • 401 No credential, or one that is wrong, expired or revoked.
  • 403 The account, or the key's or app's scopes, may not do this.
  • 429 Slow down: wait the seconds in the Retry-After header, then try again.

What each error means