Health Check
Section titled “Health Check”The notification server exposes two unauthenticated endpoints for operational visibility: a structured health probe and a Prometheus-compatible metrics scrape. Use them from container orchestrators, load balancers, and monitoring agents to verify the service is reachable and to collect runtime telemetry.
All endpoints live on the notification service subdomain of the container’s runtime URL. No authentication is required.
Health
Section titled “Health”GET /api/v1/notifications/health
Section titled “GET /api/v1/notifications/health”Returns a standardized 9-field health document describing the running notification process. This endpoint is unauthenticated and always responds with HTTP 200 when the service is reachable. Use it from readiness/liveness probes and from uptime monitors.
This endpoint takes no parameters.
curl https://{projectId}-{containerId}-n-1.{server}.containers.hoody.com/api/v1/notifications/healthimport { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-n-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.notifications.health.check();Service is healthy.
{ "status": "ok", "service": "notifications", "built": "2024-11-15T08:00:00Z", "started": "2024-11-15T12:34:56Z", "memory": { "rss": 134217728, "heap": 67108864 }, "fds": 42, "pid": 17, "ip": "10.0.0.5", "userAgent": "node/v20.10.0"}Response fields
Section titled “Response fields”| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | One of: ok. Indicates the service is healthy. |
service | string | Yes | Service identifier reported by the process. |
built | string | No | Executable mtime as an RFC3339 string. |
started | string | Yes | Process start time as an RFC3339 string. |
memory | object | No | Process memory snapshot. |
fds | integer | No | Count of open file descriptors. |
pid | integer | Yes | Host process ID. |
ip | string | Yes | Local IP address the process bound to. |
userAgent | string | No | Runtime user agent string. |
The memory object contains:
| Name | Type | Required | Description |
|---|---|---|---|
rss | integer | Yes | Resident set size in bytes. |
heap | integer | No | Language runtime heap in bytes (null for Rust). |
Metrics
Section titled “Metrics”GET /api/v1/notifications/metrics
Section titled “GET /api/v1/notifications/metrics”Returns runtime metrics in Prometheus text exposition format. Use this endpoint from a Prometheus scraper or any OpenMetrics-compatible collector to ingest counters, gauges, and histograms emitted by the notification server.
This endpoint takes no parameters.
curl https://{projectId}-{containerId}-n-1.{server}.containers.hoody.com/api/v1/notifications/metricsimport { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-n-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.notifications.health.getMetrics();Metrics in Prometheus text format. Content-Type is text/plain.
# HELP notifications_up Service is up# TYPE notifications_up gaugenotifications_up 1
# HELP notifications_memory_rss_bytes Resident set size in bytes# TYPE notifications_memory_rss_bytes gaugenotifications_memory_rss_bytes 134217728
# HELP notifications_memory_heap_bytes Language runtime heap in bytes# TYPE notifications_memory_heap_bytes gaugenotifications_memory_heap_bytes 67108864
# HELP notifications_fds_open Open file descriptors# TYPE notifications_fds_open gaugenotifications_fds_open 42
# HELP notifications_process_start_time_seconds Process start time# TYPE notifications_process_start_time_seconds gaugenotifications_process_start_time_seconds 1731674096