Skip to content

feat(uptime): Enable uptime in self-hosted #3787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RELAY_IMAGE=getsentry/relay:nightly
SYMBOLICATOR_IMAGE=getsentry/symbolicator:nightly
TASKBROKER_IMAGE=getsentry/taskbroker:nightly
VROOM_IMAGE=getsentry/vroom:nightly
UPTIME_CHECKER_IMAGE=getsentry/uptime-checker:nightly
HEALTHCHECK_INTERVAL=30s
HEALTHCHECK_TIMEOUT=1m30s
HEALTHCHECK_RETRIES=10
Expand Down
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ services:
command: rust-consumer --storage spans --consumer-group snuba-spans-consumers --auto-offset-reset=latest --max-batch-time-ms 1000 --no-strict-offset-reset
profiles:
- feature-complete
snuba-uptime-results-consumer:
<<: *snuba_defaults
command: rust-consumer --storage uptime_monitor_checks --consumer-group snuba-uptime-results --auto-offset-reset=latest --max-batch-time-ms 750 --no-strict-offset-reset
profiles:
- feature-complete
symbolicator:
<<: *restart_policy
image: "$SYMBOLICATOR_IMAGE"
Expand Down Expand Up @@ -415,6 +420,11 @@ services:
command: run consumer monitors-clock-tasks --consumer-group monitors-clock-tasks
profiles:
- feature-complete
uptime-results:
<<: *sentry_defaults
command: run consumer uptime-results --consumer-group uptime-results
profiles:
- feature-complete
post-process-forwarder-transactions:
<<: *sentry_defaults
command: run consumer --no-strict-offset-reset post-process-forwarder-transactions --consumer-group post-process-forwarder --synchronize-commit-log-topic=snuba-transactions-commit-log --synchronize-commit-group transactions_group
Expand Down Expand Up @@ -533,6 +543,28 @@ services:
- sentry-vroom:/var/vroom/sentry-profiles
profiles:
- feature-complete
uptime-checker:
<<: *restart_policy
image: "$UPTIME_CHECKER_IMAGE"
command: run
environment:
UPTIME_CHECKER_RESULTS_KAFKA_CLUSTER: kafka:9092
UPTIME_CHECKER_REDIS_HOST: redis://redis:6379
# Set to `true` will allow uptime checks against private IP addresses
UPTIME_CHECKER_ALLOW_INTERNAL_IPS: "false"
# The number of times to retry failed checks before reporting them as failed
UPTIME_CHECKER_FAILURE_RETRIES: "1"
# DNS name servers to use when making checks in the http checker.
# Separated by commas. Leaving this unset will default to the systems dns
# resolver.
#UPTIME_CHECKER_HTTP_CHECKER_DNS_NAMESERVERS: "8.8.8.8,8.8.4.4"
depends_on:
kafka:
<<: *depends_on-healthy
redis:
<<: *depends_on-healthy
profiles:
- feature-complete

volumes:
# These store application data that should persist across restarts.
Expand Down
15 changes: 15 additions & 0 deletions sentry/sentry.conf.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,24 @@ def get_internal_network():
"organizations:continuous-profiling",
"organizations:continuous-profiling-stats",
)
# Uptime related flags
+ (
"organizations:uptime",
"organizations:uptime-create-issues",
# TODO(epurkhiser): We can remove remove these in 25.8.0 since
# we'll have released this issue group type
# (https://github.com/getsentry/sentry/pull/94827)
"organizations:issue-uptime-domain-failure-visible",
"organizations:issue-uptime-domain-failure-ingest",
"organizations:issue-uptime-domain-failure-post-process-group",
)
}
)

# TODO(epurkhiser): In 25.8.0 we can drop this option override as we've made it
# default in sentry (https://github.com/getsentry/sentry/pull/94822)
SENTRY_OPTIONS["uptime.snuba_uptime_results.enabled"] = True

#######################
# MaxMind Integration #
#######################
Expand Down
Loading