Skip to main content

Protrak Services Health Check

This section provides documentation on monitoring the health of Protrak services using dedicated health check endpoints. You’ll find instructions for accessing and interpreting health checks for API, Service Host, and Messaging Consumer services, both locally and in production environments.

Health Check Endpoints and How to Use

1. Protrak API Service (Hosted on Azure App Service & Local)

  • Endpoint: {APIUrl}/healthz

Local Use

Visit:

http://localhost:<port>/healthz

You should see:

Healthy

Azure App Service Use

If hosted on Azure App Service:

  1. Go to Azure Portal → App Service → Settings → Health Check.
  2. Set Health check path to:
    /healthz
  3. Save.

Azure will probe:

https://<your-app-name>.azurewebsites.net/healthz

Response Codes

StateHTTP CodeDescription
Healthy200 OKApp is running normally
Unhealthy503App failed one or more checks

Azure App Service uses this response to decide whether to restart the app if it becomes unhealthy.


2. Protrak Service Host Service (Windows Service)

  • Endpoint: http://localhost:5020/healthz (locally)
  • VM Network URL: http://<vm-ip>:5020/healthz (if firewall and port forwarding are set)

Local Use

Visit:

http://localhost:5020/healthz

You should see:

Healthy

Remote Use (Hosted on Windows VM)

Steps:

  1. Ensure the Windows Service hosts an HTTP listener on http://+:5020.
  2. On the VM:
    • Allow inbound traffic on port 5020 via Windows Firewall.
    • (Optional) Add port mapping if using NAT or container.
  3. From any machine in the network, visit:
    http://<vm-ip>:5020/healthz

You can also test it with curl or Postman from another device.

Ensure:

  • HTTP listener is running on port 5020
  • Windows Firewall allows inbound traffic

Response Codes

StateHTTP CodeDescription
Healthy200 OKService is functioning properly
Unhealthy503Service failed internal checks

3. Protrak Messaging Consumer Host Service (Windows Service)

  • Endpoint: http://localhost:5010/healthz (locally)
  • VM Network URL: http://<vm-ip>:5010/healthz

Local Use

Visit:

http://localhost:5010/healthz

Expected response:

Healthy

Remote Use (Hosted on Windows VM)

Same steps as above, but for port 5010:

  1. Expose the listener on http://+:5010.
  2. Open port 5010 in Windows Firewall.
  3. Access remotely:
    http://<vm-ip>:5010/healthz

Response Codes

StateHTTP CodeDescription
Healthy200 OKMessage consumer is running
Unhealthy503Unhealthy state or error