Skip to main content
Documentation

My uptime check is failing

An incident on an uptime check names a failure reason. This page covers the four where your server did answer, but the answer failed the check. If there was no answer at all, see Alopex can't reach my site.

Find the reason on the incident, in the line under its heading. For a status code it reads like HTTP 503 Service Unavailable. For the others it is the message quoted below.

Unexpected status code

What you see

The incident reads Website returning errors, with a cause line such as HTTP 503 Service Unavailable. The failed run also records the message Expected 2xx, got 503. The first part is your Expected status and the second is what the server sent.

Likely causes

  • The server or application is failing. Codes from 500 to 599 usually mean this.
  • The URL is wrong or the page has moved. 404 and 410 usually mean this.
  • The server refuses the request. A 401 or 403 can mean the page needs a login, or that a firewall or bot protection blocks the user agent Alopex/1.0 (+uptime monitor).
  • The page redirects and Follow redirects is off, so Alopex is judging the 301 or 302 itself.
  • The server is rate limiting. A 429 means too many requests.

How to check

  1. Open the URL from the check in a browser. Note whether you see the page you expect.

  2. Request it from a terminal, showing the status and following redirects:

    curl -sIL -A "Alopex/1.0 (+uptime monitor)" <your-url>
    

    The last HTTP/ line is the status Alopex judges.

  3. Compare it with Expected status on the check. Open the check from the domain's Checks tab and choose Edit.

How to fix

  • If the server is failing, fix it. The check recovers on its own once a run passes.
  • If the URL is wrong, correct the URL.
  • If a firewall or bot filter blocks Alopex, allow the user agent Alopex/1.0 (+uptime monitor) for the page you are checking. Alopex does not publish IP addresses, so an IP allow list is not an option.
  • If the page needs a login, add the Headers it needs, such as an Authorization header, or point the check at a public page.
  • If a status other than 2xx is correct, for example 401 on a page that should refuse anonymous visitors, add it to Expected status, for example 2xx, 401.

Required text missing

What you see

The incident reads Website returning errors, with the message Response does not contain "<your text>". The page answered with an expected status, but your Required text was not in it.

Likely causes

  • A deploy or error replaced the page. A server can return 200 with an error page.
  • The text changed, or the capital letters differ. The match is exact.
  • The text is added by JavaScript in the browser. Alopex reads the response as your server sends it and does not run scripts.
  • The page is longer than 5 MB and the text comes after that point.
  • Your server sends a different page, such as a cookie or bot-protection page, to Alopex.

How to check

  1. Request the page without a browser, so no scripts run, and search for the text:

    curl -s -A "Alopex/1.0 (+uptime monitor)" <your-url> | grep -F "<your text>"
    
  2. If nothing prints, the text is not in what Alopex receives. View the output without grep to see what the server sends instead.

How to fix

  • If the page is broken, fix it. The check recovers once a run passes.
  • If the text has changed on purpose, update Required text.
  • If the text only appears in the browser, choose text that is in the server's own HTML.

Forbidden text found

What you see

The incident reads Website returning errors, with the message Response contains "<your text>". The page answered with an expected status, but your Forbidden text was in it.

Likely causes

  • An error message you were watching for has appeared on the page, such as Fatal error.
  • The forbidden text is also part of normal content, for example in a script, a comment or a menu. The match is exact and covers the whole response, not only visible text.

How to check

  1. Request the page and search for the text:

    curl -s -A "Alopex/1.0 (+uptime monitor)" <your-url> | grep -nF "<your text>"
    
  2. Read the lines it prints to see where the text comes from.

How to fix

  • If the page is showing an error, fix the cause. The check recovers once a run passes.
  • If the text appears in normal content, change Forbidden text to something more specific.

Too many redirects

What you see

The incident reads Website unreachable, with the message Stopped after 5 redirects. Alopex followed 5 redirects and the next response was still a redirect.

Likely causes

  • A redirect loop. For example, one rule sends http to https and another sends it back, or www and non-www each redirect to the other.
  • A long chain of redirects through old addresses.

How to check

Follow the chain from a terminal and read each Location line:

curl -sIL --max-redirs 10 <your-url>

If the same addresses repeat, it is a loop.

How to fix

  • Fix the redirect rules at your server, CDN or application so the chain ends in a page.
  • If the chain is only long, set the check's URL to the final address.
  • If the redirect is intended, turn Follow redirects off and add the redirect's code, for example 301, to Expected status.