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

# Get Worker Queue Metrics

> Get comprehensive metrics for a worker queue.

Returns worker health metrics, task statistics, and performance data.



## OpenAPI

````yaml https://control-plane.kubiya.ai/api/openapi.json get /api/v1/worker-queues/{queue_id}/metrics
openapi: 3.1.0
info:
  title: Agent Control Plane API
  description: Multi-tenant agent orchestration with Temporal workflows
  version: 1.0.0
servers: []
security:
  - BearerAuth: []
tags:
  - name: health
    description: 🏥 **Health & Status** - Check API health and availability
  - name: authentication
    description: 🔐 **Authentication** - Token validation and auth management
  - name: agents
    description: 🤖 **Agents** - Create and manage AI agents with custom capabilities
  - name: skills
    description: 🛠️ **Tool Sets** - Manage agent skills and tool configurations
  - name: integrations
    description: 🔌 **Integrations** - Connect to external services (Kubiya managed)
  - name: custom-integrations
    description: >-
      ⚙️ **Custom Integrations** - User-defined integration instances with env
      vars, secrets, and files
  - name: integration-templates
    description: >-
      📦 **Integration Templates** - Pre-configured templates for common
      services (PostgreSQL, Redis, MongoDB, etc.)
  - name: secrets
    description: 🔑 **Secrets** - Secure credential storage and retrieval
  - name: teams
    description: 👥 **Teams** - Team management and collaboration
  - name: workflows
    description: 📊 **Workflows** - Multi-step automation and orchestration
  - name: executions
    description: ▶️ **Executions** - Track and monitor workflow runs
  - name: jobs
    description: ⏰ **Jobs** - Scheduled and webhook-triggered tasks
  - name: policies
    description: 🛡️ **Policies** - Access control and security policies
  - name: analytics
    description: 📈 **Analytics** - Usage metrics and performance monitoring
  - name: projects
    description: 📁 **Projects** - Project organization and management
  - name: environments
    description: 🌍 **Environments** - Environment configuration (dev, staging, prod)
  - name: models
    description: 🧠 **Models** - LLM model configuration and management
  - name: runtimes
    description: ⚡ **Runtimes** - Agent execution runtime environments
  - name: workers
    description: 👷 **Workers** - Worker registration and heartbeat monitoring
  - name: storage
    description: 💾 **Storage** - File storage and cloud integration
  - name: context-graph
    description: 🕸️ **Context Graph** - Knowledge graph and context management
  - name: temporal-workflows
    description: >-
      ⚙️ **Temporal Workflows** - Background workflows for context graph
      ingestion, connector operations, and scheduled jobs
  - name: templates
    description: 📝 **Templates** - Reusable configuration templates
paths:
  /api/v1/worker-queues/{queue_id}/metrics:
    get:
      summary: Get Worker Queue Metrics
      description: |-
        Get comprehensive metrics for a worker queue.

        Returns worker health metrics, task statistics, and performance data.
      operationId: get_worker_queue_metrics_api_v1_worker_queues__queue_id__metrics_get
      parameters:
        - name: queue_id
          in: path
          required: true
          schema:
            type: string
            title: Queue Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkerQueueMetricsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WorkerQueueMetricsResponse:
      properties:
        queue_id:
          type: string
          title: Queue Id
          description: Worker queue UUID
        active_workers:
          type: integer
          title: Active Workers
          description: Number of active workers
        idle_workers:
          type: integer
          title: Idle Workers
          description: Number of idle workers
        busy_workers:
          type: integer
          title: Busy Workers
          description: Number of busy workers
        total_workers:
          type: integer
          title: Total Workers
          description: Total number of workers
        tasks_processed_24h:
          type: integer
          title: Tasks Processed 24H
          description: Tasks completed in last 24 hours
        tasks_failed_24h:
          type: integer
          title: Tasks Failed 24H
          description: Tasks failed in last 24 hours
        tasks_pending:
          type: integer
          title: Tasks Pending
          description: Tasks currently pending
        avg_task_duration_ms:
          type: number
          title: Avg Task Duration Ms
          description: Average task duration in milliseconds
        error_rate_percent:
          type: number
          title: Error Rate Percent
          description: Error rate percentage
        last_error_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Error At
          description: Timestamp of last error
        task_queue_backlog:
          type: integer
          title: Task Queue Backlog
          description: Number of tasks in backlog
          default: 0
        task_queue_pollers:
          type: integer
          title: Task Queue Pollers
          description: Number of active pollers
          default: 0
        last_activity_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Activity At
          description: Last activity timestamp
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Metrics update timestamp
      type: object
      required:
        - queue_id
        - active_workers
        - idle_workers
        - busy_workers
        - total_workers
        - tasks_processed_24h
        - tasks_failed_24h
        - tasks_pending
        - avg_task_duration_ms
        - error_rate_percent
        - updated_at
      title: WorkerQueueMetricsResponse
      description: Comprehensive metrics for a worker queue
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your Kubiya API token (format: Bearer <token>)'

````