> ## Documentation Index
> Fetch the complete documentation index at: https://docs.logfleet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Push Metrics

> Submit extracted metrics to the platform

Pushes extracted metrics from the edge agent to LogFleet. Called every 60 seconds with batched metrics.

Metrics are extracted at the edge based on the configured metric extraction rules, significantly reducing bandwidth compared to shipping raw logs.


## OpenAPI

````yaml POST /api/v1/edge/metrics
openapi: 3.0.3
info:
  title: LogFleet API
  description: >
    LogFleet is a distributed edge observability platform for fleet management.


    ## Overview

    LogFleet collects logs from distributed edge devices, stores them locally
    with

    configurable retention, extracts metrics for cloud observability platforms,

    and provides on-demand log streaming and remote access.


    ## Authentication

    LogFleet uses two authentication methods:


    - **JWT Bearer Token**: For dashboard and user operations. Obtain via
    `/auth/login`

    - **API Key**: For edge agents. Create via `/api-keys` endpoint


    ## Rate Limits

    - General endpoints: 100 requests/minute

    - Streaming endpoints: 20 requests/minute

    - Edge/metrics endpoints: 1000 requests/minute


    ## Multi-Tenancy

    All resources are scoped to organizations. Users can only access resources

    belonging to their organization.
  version: 1.0.0
  contact:
    name: LogFleet Support
    email: support@logfleet.io
    url: https://logfleet.io
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
servers:
  - url: https://api.logfleet.io
    description: Production
  - url: http://localhost:8080
    description: Local development
security: []
tags:
  - name: Authentication
    description: User registration and authentication
  - name: Organization
    description: Organization management
  - name: Agents
    description: Edge agent management
  - name: API Keys
    description: API key management for edge agents
  - name: Dashboard
    description: Dashboard metrics and summaries
  - name: Streaming
    description: Real-time log streaming
  - name: Billing
    description: Plans, quotas, and invoices
  - name: Metric Configs
    description: Custom metric extraction configuration
  - name: Edge API
    description: Edge agent communication endpoints
paths:
  /api/v1/edge/metrics:
    post:
      tags:
        - Edge API
      summary: Submit metrics
      description: Submit extracted metrics to the platform
      operationId: edgeMetrics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EdgeMetricsRequest'
      responses:
        '202':
          description: Metrics accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EdgeMetricsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    EdgeMetricsRequest:
      type: object
      required:
        - agent_id
        - metrics
      properties:
        agent_id:
          type: string
          format: uuid
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/EdgeMetric'
          minItems: 1
    EdgeMetricsResponse:
      type: object
      properties:
        status:
          type: string
          example: accepted
        metrics_received:
          type: integer
    EdgeMetric:
      type: object
      required:
        - name
        - value
        - timestamp
      properties:
        name:
          type: string
        value:
          oneOf:
            - type: number
            - type: integer
        timestamp:
          type: integer
          format: int64
          description: Unix timestamp in milliseconds
        tags:
          type: object
          additionalProperties:
            type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
        message:
          type: string
          description: Additional details
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Access denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for edge agents

````