< RETURN_TO_LOGS

Multi-Protocol Status Checker

# Multi-Protocol Status Checker Routes: GET /api/status-checker/all · GET /api/status-checker/stats Checks the health of every monitored service in an internal target matrix — a hardcoded list of groups and endpoints. Checks run on a background timer every 60 seconds and cache results for serving. Supported check types are HTTP/HTTPS (via HEAD, with a GET fallback) and raw TCP/SMTP/POP3/IMAP/ICMP sockets (a fast port-connect probe). Each check records the response code, the latency in milliseconds, and the timestamp. Results are persisted to an internal database and retained for 90 days, which powers the historical queries exposed by the stats endpoint.

Endpoints

Live status (/all) — current state of every monitored service.
Uptime stats (/stats) — historical uptime and response times.


Live Status

Route: GET /api/status-checker/all Returns the cached status of every endpoint in the monitor matrix, grouped by parent group. No parameters required.

Response fields

Each group contains a group_name and an endpoints map:
FieldDescription
group_nameHuman readable name for the group.
endpoints.<key>.nameHuman readable name of the service.
endpoints.<key>.typeProtocol used for the check, e.g. HTTPS, SMTP, TCP.
endpoints.<key>.addressThe URL (HTTP checks) or host:port (socket checks).
endpoints.<key>.last_checkedRelative time since the last probe, e.g. 5s ago.
endpoints.<key>.response_codeHTTP status code or 200 for a successful socket connect. A 504 means the probe timed out; 503 a connection error.
endpoints.<key>.response_timeLatency in milliseconds, e.g. 42ms.

Examples

curl -s https://api.xnite.net/api/status-checker/all
Inspect just the breakblocks group:
curl -s https://api.xnite.net/api/status-checker/all | jq '.data["breakblocks"]'

Sample response

{
  "plugin": "status-checker",
  "success": true,
  "data": {
    "xnite": {
      "group_name": "xnite",
      "endpoints": {
        "blog": {
          "name": "My Blog",
          "type": "HTTPS",
          "address": "https://www.xnite.me/index.html",
          "last_checked": "9s ago",
          "response_code": 200,
          "response_time": "78ms"
        }
      }
    },
    "breakblocks": {
      "group_name": "BreakBlocks.com",
      "endpoints": {
        "main": {
          "name": "Break Blocks - Website",
          "type": "HTTPS",
          "address": "https://www.breakblocks.com",
          "last_checked": "2s ago",
          "response_code": 200,
          "response_time": "61ms"
        }
      }
    }
  }
}

Uptime Stats

Route: GET /api/status-checker/stats Aggregates the 90 days of stored results for every target across several timeframes, giving uptime percentage, average response time, and the number of checks performed in each window.

Parameters

Query paramRequiredDescription
(none)NoAggregates run for every monitored target.

Supported timeframes

FrameWindow
24hLast 24 hours
3dLast 3 days
7dLast 7 days
14dLast 14 days
30dLast 30 days
90dLast 90 days

Response fields

Responses are nested by group → target key → timeframe:
FieldDescription
data.<group><key><frame>.uptime_percentagePercentage of successful checks (200–499) in the window. 100.00 if no checks are recorded yet.
data.<group><key><frame>.avg_response_time_msAverage response time in ms, rounded to an integer.
data.<group><key><frame>.avg_response_timeSame value in human readable form, e.g. 42ms.
data.<group><key><frame>.total_checksNumber of recorded checks in the window.

Examples

curl -s https://api.xnite.net/api/status-checker/stats
Look at only the 7-day window for the netportal target:
curl -s https://api.xnite.net/api/status-checker/stats | jq '.data["xnite"]["netportal"]["7d"]'

Sample response

{
  "plugin": "status-checker",
  "success": true,
  "data": {
    "xnite": {
      "netportal": {
        "24h": {
          "uptime_percentage": 100,
          "avg_response_time_ms": 91,
          "avg_response_time": "91ms",
          "total_checks": 24
        },
        "7d": {
          "uptime_percentage": 99.76,
          "avg_response_time_ms": 87,
          "avg_response_time": "87ms",
          "total_checks": 167
        }
      }
    }
  }
}