# at.happyproto.fleet.getIngestHealth

> Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getIngestHealth)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getIngestHealth/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getIngestHealth/examples)

## Definitions

### `at.happyproto.fleet.getIngestHealth#lag`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `max` | `integer` | Yes |  |
| `p50` | `integer` | Yes |  |
| `p90` | `integer` | Yes |  |

### `at.happyproto.fleet.getIngestHealth`

**Type**: `query`

Report lag, clock skew and schema-version spread. Lag and skew are separate facts and must not be averaged together. Admin only.

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `have` | `integer` | No | History available, when accruing. |
| `lag` | `ref` → `#lag` | No |  |
| `need` | `integer` | No | History required, when accruing. |
| `schemaVersions` | `array` | No |  |
| `skewed` | `array` | No |  |
| `status` | `string` | Yes | Why a figure is absent. Branch on this, never on field presence. |
| `unit` | `string` | No |  |
| `windowDays` | `integer` | No |  |

#### Errors

- **AuthRequired**: This endpoint requires an authenticated caller.
- **Forbidden**: The caller is not a HappyProto admin.
- **Upstream**: The telemetry store could not be queried.

### `at.happyproto.fleet.getIngestHealth#schemaVersion`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `instances` | `integer` | Yes |  |
| `version` | `integer` | Yes |  |

### `at.happyproto.fleet.getIngestHealth#skew`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `aheadSeconds` | `integer` | Yes | Seconds the snapshot was stamped ahead of receipt. A wrong clock makes every delta from this instance suspect. |
| `instanceId` | `string` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "lag": {
      "properties": {
        "max": {
          "type": "integer"
        },
        "p50": {
          "type": "integer"
        },
        "p90": {
          "type": "integer"
        }
      },
      "required": [
        "p50",
        "p90",
        "max"
      ],
      "type": "object"
    },
    "main": {
      "description": "Report lag, clock skew and schema-version spread. Lag and skew are separate facts and must not be averaged together. Admin only.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is not a HappyProto admin.",
          "name": "Forbidden"
        },
        {
          "description": "The telemetry store could not be queried.",
          "name": "Upstream"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "have": {
              "description": "History available, when accruing.",
              "type": "integer"
            },
            "lag": {
              "ref": "#lag",
              "type": "ref"
            },
            "need": {
              "description": "History required, when accruing.",
              "type": "integer"
            },
            "schemaVersions": {
              "items": {
                "ref": "#schemaVersion",
                "type": "ref"
              },
              "type": "array"
            },
            "skewed": {
              "items": {
                "ref": "#skew",
                "type": "ref"
              },
              "type": "array"
            },
            "status": {
              "description": "Why a figure is absent. Branch on this, never on field presence.",
              "knownValues": [
                "ok",
                "accruing",
                "withheld"
              ],
              "type": "string"
            },
            "unit": {
              "knownValues": [
                "days",
                "snapshots"
              ],
              "type": "string"
            },
            "windowDays": {
              "type": "integer"
            }
          },
          "required": [
            "status"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "schemaVersion": {
      "properties": {
        "instances": {
          "type": "integer"
        },
        "version": {
          "type": "integer"
        }
      },
      "required": [
        "version",
        "instances"
      ],
      "type": "object"
    },
    "skew": {
      "properties": {
        "aheadSeconds": {
          "description": "Seconds the snapshot was stamped ahead of receipt. A wrong clock makes every delta from this instance suspect.",
          "type": "integer"
        },
        "instanceId": {
          "type": "string"
        }
      },
      "required": [
        "instanceId",
        "aheadSeconds"
      ],
      "type": "object"
    }
  },
  "id": "at.happyproto.fleet.getIngestHealth",
  "lexicon": 1
}
```
