Health check URL?

Does RT have a path / URL appropriate for health checking?

One of our instances came up without a database connection yesterday, and our current health check just fetching one of the static files happily succeeded in this scenario.

Hey there, my suggestion would be to either write a script to access the front page, login and expect certain output from the front page.

Alternatively you could use an API token to communicate to RT via API and fail on absence of expected data… e.g.

curl -s \
  -H "Authorization: token $RTTOKEN" \
  "$RTSERVER/REST/2.0/ticket/3874" \
  | jq '.Subject'
"Open DWG files"

Thanks @cgb – it’s a good idea to run a command that accesses the API as a validation.

The symptom I’m trying to fix is that if the container starts without having database access RT starts up but in the “you are a new configuration, let me help get you started” mode.

@cgb I had another mini outage and thought I’d look into this again. Searching for how to generate the API token I came to REST - Request Tracker Wiki which doesn’t mention it existing at all.

Hi,

You will find the documentation at this URL :
https://docs.bestpractical.com/rt/5.0.4/authentication.html#Token-Authentication

Kind regards,