linuxserver / docker-radarr

GNU General Public License v3.0
658 stars 104 forks source link

Healthcheck #104

Closed KucharczykL closed 4 years ago

KucharczykL commented 4 years ago

Would there be interest in adding healthcheck to this image? Something like: https://github.com/KucharczykL/radarr-healthcheck

The actual script I have now for Radarr v3 (tagged as preview in your image) that works just fine is:

#!/bin/bash
curl ${RADARR_URL}/api/v3/health?apiKey=${APIKEY} 2>&1 | grep -q error
if [ "$?" -eq 1 ]
then
  echo "No errors."
    exit 0
else
  echo "Errors occurred. Check the web interface."
    exit 1
fi

If there's interest, I would create a PR.

github-actions[bot] commented 4 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

j0nnymoe commented 4 years ago

Hey, sorry we don't have any plans to add healthcheck within our containers, ref: https://github.com/linuxserver/docker-tautulli/issues/79#issuecomment-546721863 .

GAS85 commented 6 months ago

Simply add to your docker compose for radarr:

    healthcheck:
      test: curl -f http://localhost:7878/api/v3/health?apikey=<API KEY> || exit 1
      interval: 5m00s
      timeout: 10s
      retries: 2
      start_period: 30s
zatricky commented 1 month ago

In case anyone comes across this in future, the /ping api endpoint is not locked behind auth, so you can change the URI in healthcheck.test to http://localhost:7878/ping without having to insert an API key into your compose file.