Health Check

PRO

System monitoring component that periodically checks HTTP endpoints and reports health status, response time, uptime, and per-endpoint history with configurable auto-refresh.

Pro Features

Unlock advanced capabilities with the Pro version

Endpoint Health Checks

Fetches each endpoint and marks it healthy or unhealthy based on the expected status codes

Auto-Refresh Polling

Re-checks all endpoints on a configurable interval, with manual refresh on demand

Response Time Metrics

Measures per-endpoint response time and shows the average across services

Uptime Tracking

Calculates a rolling uptime percentage per endpoint and overall

Status History

Keeps a mini history chart of the most recent checks per endpoint (maxHistory)

Critical Endpoints

The overall status is derived from the endpoints marked as critical

Status Change Callback

onStatusChange fires with the latest results so you can wire up your own alerting or logging

Request Timeouts

Each check aborts after a per-endpoint timeout to avoid hanging requests

Custom Requests

Configure HTTP method, headers, body, and expected status codes per endpoint

Installation

Install via CLI

npx @moontra/moonui-cli add health-check

Usage

Pro Required

System Health
WARNING

0.0%
Uptime
0
Healthy
0
Unhealthy
0ms
Avg Response
0
Services

No endpoints configured

Examples

Basic Health Monitoring

PRO

Minimal configuration — two endpoints, manual refresh, history disabled

Pro Required

System Health
WARNING

0.0%
Uptime
0
Healthy
0
Unhealthy
0ms
Avg Response
0
Services

No endpoints configured

Real-time System Monitoring

PRO

Live dashboard that re-checks every endpoint on a 30s interval (autoRefresh) and keeps a rolling per-endpoint history. The CDN check uses a lightweight HEAD request.

Pro Required

System Health
WARNING

0.0%
Uptime
0
Healthy
0
Unhealthy
0ms
Avg Response
0
Services

No endpoints configured

Advanced Configuration with Callbacks

PRO

Per-endpoint request options in one place: a GET check with custom headers and expected status codes, and a POST check that sends a JSON body. The POST target here is a static asset that rejects the method (HTTP 405), so it reports unhealthy on purpose — because it is marked critical: false the overall status stays healthy, while onStatusChange reports 1 / 2 healthy.

Pro Required

Advanced Configuration

Awaiting first check

System Health
WARNING

0.0%
Uptime
0
Healthy
0
Unhealthy
0ms
Avg Response
0
Services

No endpoints configured

Multi-Region Monitoring

PRO

Monitor services across multiple geographic regions with a region switcher — switching regions swaps the endpoint list and triggers a fresh check

Pro Required

Multi-Region Health Status

System Health
WARNING

0.0%
Uptime
0
Healthy
0
Unhealthy
0ms
Avg Response
0
Services

No endpoints configured