Skip to content

Alternative monitoring

Node Exporter Integration

Combine with node-exporter metrics:

scrape_configs:
- job_name: "xray-checker"
static_configs:
- targets: ["localhost:2112"]
- job_name: "node"
static_configs:
- targets: ["localhost:9100"]

Healthchecks.io

Use with run-once mode:

Terminal window
curl -fsS --retry 3 https://hc-ping.com/your-uuid-here && \
./xray-checker --subscription-url="..." --run-once

Status Page Integration

Expose status endpoints to status page providers:

  • BetterStack
  • UptimeRobot
  • StatusCake

Example URL format:

https://your-server:2112/config/0-vless-example.com-443

Custom Monitoring

HTTP API examples for custom monitoring:

Check all proxies:

Terminal window
curl -s localhost:2112/metrics | grep xray_proxy_status

Check specific proxy:

Terminal window
curl -s localhost:2112/config/0-vless-example.com-443

Parse metrics with jq:

Terminal window
curl -s localhost:2112/metrics | grep xray_proxy_status | \
jq -R 'split(" ") | {name: (.[0] | split("{")[1] | split("}")[0]), value: .[1]}'