Monitoring: Prometheus + Grafana (black-box probes + CloudWatch) - #7
Merged
Merged
Conversation
…loudWatch panels Blackbox exporter probes the local container and the live AWS deployment (availability, latency, HTTP status, TLS expiry, request phases) without changing dpaste code. Prometheus evaluates DpasteDown, DpasteSlowResponse and TLSCertificateExpiringSoon. Grafana datasources and dashboard are provisioned from files; production EC2 CPU and network come from CloudWatch. cAdvisor evaluated and removed: incompatible with Docker Desktop's containerd image store (cannot resolve container layer IDs).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Local observability stack (
monitoring/, Docker Compose) that monitors both the local container and the live AWS deployment, as black-box monitoring: no changes to the dpaste application code.Components (versions pinned, ports bound to 127.0.0.1)
http://dpaste:8000/(local) and the production HTTPS URL. Availability, total latency, HTTP status, TLS certificate expiry, per-phase timing (DNS, connect, TLS, processing, transfer)DpasteDown: probe failing for 1 minute (critical)DpasteSlowResponse: probe > 2s for 5 minutes (warning)TLSCertificateExpiringSoon: certificate < 14 days (warning)set-production-target.ps1writes the production probe target fromterraform output app_url(the sslip.io hostname changes with the EC2 IP). The generated file is git-ignored.Verification
probe_success= 1 for local and productionDpasteDownwent pending then firing, Grafana showed Local DOWN and 1 firing alert; restarted, alert resolvedDecision: cAdvisor removed
cAdvisor v0.49.1 could not identify containers on Docker Desktop (containerd image store:
failed to identify the read-write layer ID), so it exported no per-container series. Replaced by CloudWatch metrics for the production instance instead of shipping a component that does not work.Limitations