Repository navigation
Improve monitoring coverage and harden docker-compose configuration - #122
Merged
Merged
Conversation
…nd frontend av Closes SynapsVault#92
…vironment=prod Closes SynapsVault#93
…le path Closes SynapsVault#94
|
@fredkanwai Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Improve monitoring coverage and harden docker-compose configuration
What was solved
#92 — Add alerts for pod restarts, certificate expiry and frontend availability
Extend the Prometheus monitoring config with blackbox_exporter probes for the public URL and TLS certificate expiry, add kube-state-metrics based pod restart/CrashLoopBackOff alerts, and add a Postgres database size alert. Changes are confined to monitoring/prometheus.yml (scrape configs for blackbox and kube-state-metrics) and monitoring/alert-rules.yml (new alert rules), matching the issue's stated scope.
Addressed:
#93 — prometheus.yml labels local compose metrics as environment=production
Update monitoring/prometheus.yml so external_labels.environment is no longer hard-coded to production; make it configurable via environment variable expansion with a local default suitable for docker-compose, while preserving production behavior when explicitly set.
Addressed:
#94 — docker-compose.yml uses
${PWD}for the Dockerfile pathFix docker-compose.yml so the backend build no longer relies on the shell-specific
${PWD}variable for the Dockerfile path. Use a path relative to the build context (or additional_contexts) so compose works when invoked with-ffrom another directory and on Windows shells where PWD is unset.Addressed:
dockerfile: ${PWD}/backend/Dockerfilewith a path relative to the build context (e.g.dockerfile: Dockerfilewithcontext: ./backend) or useadditional_contexts-ffrom a different working directory#95 — Bind Postgres and monitoring ports to localhost in compose
Update docker-compose.yml so Postgres, Prometheus, and Alertmanager published ports bind to 127.0.0.1 by default using ${PORT} interpolation, preventing exposure on all interfaces while preserving existing service configuration.
Addressed:
Changes
monitoring/alert-rules.yml(modify)monitoring/prometheus.yml(modify)docker-compose.yml(modify).env.example(modify)Approach
${PWD}for the Dockerfile path #94 — docker-compose.yml uses${PWD}for the Dockerfile path (Changed: docker-compose.yml)Issues
Closes #92
Closes #93
Closes #94
Closes #95