The notification server exposes two unauthenticated endpoints for monitoring and observability: a standardized health check and a Prometheus-compatible metrics scrape endpoint. Use these to verify service availability, inspect process metadata, and integrate with monitoring infrastructure.
Service Health Check
Section titled “Service Health Check”GET /api/v1/notifications/health
Section titled “GET /api/v1/notifications/health”Returns the standardized health response. Unauthenticated. Always returns HTTP 200 with application/json when the service is up.
This endpoint takes no parameters.
curl -X GET https://api.hoody.com/api/v1/notifications/healthawait client.notifications.health.check();Service is healthy.
{ "status": "ok", "service": "notifications", "built": "2024-01-15T10:30:00Z", "started": "2024-01-15T12:00:00Z", "memory": { "rss": 52428800, "heap": null }, "fds": 42, "pid": 12345, "ip": "10.0.0.5", "userAgent": "curl/8.4.0"}Response fields
Section titled “Response fields”| Name | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Health status. Always "ok" when the service is running. |
service | string | Yes | Service identifier. |
built | string | No | Executable mtime as RFC3339 string. null if unavailable. |
started | string | Yes | Process start time as RFC3339 string. |
memory | object | No | Process memory usage snapshot. null if unavailable. |
fds | integer | No | Count of open file descriptors. null if unavailable. |
pid | integer | Yes | Process ID. |
ip | string | Yes | Bound IP address. |
userAgent | string | No | Client user agent string. null if unavailable. |
memory object
Section titled “memory object”| Name | Type | Required | Description |
|---|---|---|---|
rss | integer (int64) | Yes | Resident set size in bytes. |
heap | integer (int64) | No | Language runtime heap in bytes. null for Rust services. |
Metrics
Section titled “Metrics”GET /api/v1/notifications/metrics
Section titled “GET /api/v1/notifications/metrics”Returns server metrics in Prometheus text exposition format. Unauthenticated and safe to scrape from a Prometheus server or compatible collector.
This endpoint takes no parameters.
curl -X GET https://api.hoody.com/api/v1/notifications/metricsawait client.notifications.health.getMetrics();Metrics in Prometheus text format.
# HELP notifications_up Service status# TYPE notifications_up gaugenotifications_up 1
# HELP notifications_sent_total Total notifications delivered# TYPE notifications_sent_total counternotifications_sent_total 1284932
# HELP process_resident_memory_bytes Resident set size in bytes# TYPE process_resident_memory_bytes gaugeprocess_resident_memory_bytes 52428800
# HELP process_open_fds Number of open file descriptors# TYPE process_open_fds gaugeprocess_open_fds 42
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds# TYPE process_start_time_seconds gaugeprocess_start_time_seconds 1705312800