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

# Get system health information



## OpenAPI

````yaml /openapi.json get /admin/system-health
openapi: 3.0.0
info:
  title: Uptime Monitor API
  description: >-
    API documentation for the Uptime Monitor application. This API allows users
    to create and manage website monitors, perform checks, and view statistics.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.justanotheruptime.com
security: []
tags:
  - name: auth
    description: Authentication endpoints
  - name: projects
    description: Project management endpoints
  - name: monitors
    description: Monitor management endpoints
  - name: checks
    description: Check-related endpoints
  - name: statistics
    description: Monitor statistics endpoints
paths:
  /admin/system-health:
    get:
      tags:
        - Admin
      summary: Get system health information
      operationId: AdminController_getSystemHealth
      parameters:
        - name: includeHistory
          required: false
          in: query
          description: Include historical health data
          schema:
            type: boolean
      responses:
        '200':
          description: Returns system health information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemHealthDto'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: unhealthy
                  error:
                    type: string
                    example: Database connection failed
                  lastChecked:
                    format: date-time
                    type: string
      security:
        - bearer: []
components:
  schemas:
    SystemHealthDto:
      type: object
      properties:
        status:
          type: string
          example: healthy
          enum:
            - healthy
            - unhealthy
        lastChecked:
          format: date-time
          type: string
          example: '2025-01-01T00:00:00.000Z'
        cpuUsage:
          type: number
          example: 45.2
        memoryUsage:
          type: number
          example: 62.7
        totalMemoryMB:
          type: number
          example: 8192
        usedMemoryMB:
          type: number
          example: 5120
        diskUsage:
          type: number
          example: 78.3
        totalDiskMB:
          type: number
          example: 500000
        usedDiskMB:
          type: number
          example: 391500
        systemUptime:
          type: string
          example: 5d 12h 30m
        nodeHeapUsedMB:
          type: number
          example: 512
        nodeHeapTotalMB:
          type: number
          example: 1024
        eventLoopLagMs:
          type: number
          example: 5.2
        databaseConnected:
          type: boolean
          example: true
        dbConnections:
          type: number
          example: 25
        maxDbConnections:
          type: number
          example: 100
        dbConnectionUsage:
          type: number
          example: 45.8
        avgQueryTimeMs:
          type: number
          example: 12.3
        slowQueriesCount:
          type: number
          example: 5
        dbSizeMB:
          type: number
          example: 1024
        servicesRunning:
          type: boolean
          example: true
        apiRequestRate:
          type: number
          example: 250
        maxApiRequestRate:
          type: number
          example: 500
        avgResponseTimeMs:
          type: number
          example: 85.2
        errorRate:
          type: number
          example: 0.5
        activeUserSessions:
          type: number
          example: 120
        cacheHitRatio:
          type: number
          example: 95.7
        serviceDependencies:
          type: object
          example:
            email: healthy
            slack: healthy
            database: healthy
        error:
          type: string
          example: Database connection failed
          description: Error message if status is unhealthy
        trends:
          type: object
          example:
            cpuUsage: 5.2
            memoryUsage: -2.1
            apiRequestRate: 10.5
      required:
        - status
        - lastChecked
        - cpuUsage
        - memoryUsage
        - totalMemoryMB
        - usedMemoryMB
        - diskUsage
        - totalDiskMB
        - usedDiskMB
        - systemUptime
        - nodeHeapUsedMB
        - nodeHeapTotalMB
        - eventLoopLagMs
        - databaseConnected
        - dbConnections
        - maxDbConnections
        - dbConnectionUsage
        - avgQueryTimeMs
        - slowQueriesCount
        - dbSizeMB
        - servicesRunning
        - apiRequestRate
        - maxApiRequestRate
        - avgResponseTimeMs
        - errorRate
        - activeUserSessions
        - cacheHitRatio
        - serviceDependencies
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````