Uptime "Test Monitor" always fails with an empty HTTP 400 (uptime-checker API endpoint not configured)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start with sentry/sentry.conf.example.py and compare its uptime region configuration with the workaround in the issue, especially the api_endpoint setting. Check how the self-hosted configuration passes this value to the uptime checker and whether the preview endpoint then sends its request. Done means Test Monitor returns a result and invalid assertions produce a validation error.
Written by the indexing model from the issue text.
Description
Self-Hosted Version
26.10.0
CPU Architecture
x86_64
Docker Version
29.9.2
Docker Compose Version
5.6.1
Machine Specification
- My system meets the minimum system requirements of Sentry
Installation Type
Fresh install (also seen on an existing 26.9.0 install)
Steps to Reproduce
- Install self-hosted 26.10.0 with
COMPOSE_PROFILES=feature-complete. - Go to Monitors → Uptime → create a new monitor for
https://example.comwith the assertion "Status code = 200". - Click Test Monitor.
Or through the API:
curl -i -X POST http://localhost:9000/api/0/organizations/<org>/uptime-preview-check/ \
-H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
--data '{"url":"https://example.com","timeoutMs":5000,"method":"GET","headers":[],"body":null,"assertion":{"root":{"op":"and","children":[{"op":"status_code_check","operator":{"cmp":"equals"},"value":200}]}}}'
Expected Result
Test Monitor runs the check and shows the result (success, or the reason it failed).
Actual Result
The UI shows "Uptime check failed" with no reason. The API returns:
HTTP/1.1 400 Bad Request
Content-Length: 0
The uptime-checker never receives a request. Scheduled checks keep working.
Also, invalid assertions (e.g. JSONPath $.[[) are saved without any validation error.
Cause: Sentry's default uptime region has no api_endpoint, and the self-hosted config never sets it, so Sentry skips the calls to the uptime-checker's HTTP API (uptime-checker:12345).
Workaround for existing installs: add this to sentry/sentry.conf.py, then docker compose restart web taskworker:
from sentry.conf.types.uptime import UptimeRegionConfig
UPTIME_REGIONS = [
UptimeRegionConfig(
slug="default",
name="Default Region",
config_redis_cluster=SENTRY_UPTIME_DETECTOR_CLUSTER,
api_endpoint="uptime-checker:12345",
),
]
I'll open a PR with this change to sentry/sentry.conf.example.py.
Event ID
No response
- Dominant language
- Shell
- Stars
- 9.6k
- Forks
- 2k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 25
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/self-hosted
-
Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/self-hosted#4577 ·
Maintainers usually reply within 1 day
-
Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/self-hosted#4567 ·
Maintainers usually reply within 1 day
-
Stale Waiting for: Community
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/self-hosted#4527 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
getsentry/self-hosted#4518 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Waiting for: Product Owner
Difficulty 4/5 3-5 days Newbie friendliness 47/100
getsentry/self-hosted#4581 ·
Maintainers usually reply within 1 day
All issues in getsentry/self-hosted
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
level/task type/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
wazuh/wazuh-installation-assistant#1177 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
ComputeCanada/puppet-magic_castle#634 ·
Maintainers usually reply within 1 day
-
source:reader type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stephrobert/blog-roadmap#115 ·
-
area/cli bug priority/p2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day