Skip to content

Feat/83 grafana alerts and rules#129

Merged
AllanDantas21 merged 6 commits intomainfrom
feat/83-grafana-alerts-and-rules
Mar 21, 2026
Merged

Feat/83 grafana alerts and rules#129
AllanDantas21 merged 6 commits intomainfrom
feat/83-grafana-alerts-and-rules

Conversation

@luaraggio
Copy link
Copy Markdown
Collaborator

  • Implementar alertas e regras, fiz tanto no prometheus quanto um container de alertmanager

  • Internamente está tudo funcionando, mas pelo fato de eu ter adicionado proxy no nginx pro prometheus e mexido na url do prometheus, prometheus não está mais conseguindo se monitorar

  • Ao tentar retirar a parte de proxy do prometheus, outros exporters (métricas) ficam esquisitos

Obs: podemos otimizar amanhã, por enquanto funciona internamente.. vc consegue observar funcionando em localhost/prometheus/ e entrar na parte de alertas/rules

@luaraggio luaraggio linked an issue Mar 20, 2026 that may be closed by this pull request
@dwbessa dwbessa requested a review from Copilot March 20, 2026 12:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Prometheus alerting rules and an Alertmanager container to support alert evaluation and routing in the existing Grafana/Prometheus monitoring stack.

Changes:

  • Configures Prometheus to load rule files and send alerts to Alertmanager.
  • Introduces an initial set of Prometheus alert rules (availability, host resources, containers).
  • Adds Alertmanager service + persistent volume to docker-compose.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
infra/prometheus/config/prometheus.yml Enables rule loading and Alertmanager integration in Prometheus config
infra/prometheus/config/alerts.yml Adds initial alert rule groups (availability/resources/containers)
infra/docker/docker-compose.yml Mounts Prometheus config directory and adds Alertmanager service + volume
infra/alertmanager/config/alertmanager.yml Adds baseline Alertmanager routing/receivers configuration
Comments suppressed due to low confidence (1)

infra/prometheus/config/prometheus.yml:20

  • With --web.route-prefix=/prometheus (see docker-compose), Prometheus serves its own metrics at /prometheus/metrics, but this scrape job uses the default /metrics path. That makes the self-scrape return 404 and up{job="prometheus"} go to 0. Set metrics_path: /prometheus/metrics for this job (or drop the route-prefix/external-url approach).
scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['prometheus:9090']


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread infra/alertmanager/config/alertmanager.yml
Comment thread infra/docker/docker-compose.yml Outdated
Comment thread infra/prometheus/config/alerts.yml Outdated
Comment thread infra/prometheus/config/alerts.yml
@AllanDantas21 AllanDantas21 merged commit 3551644 into main Mar 21, 2026
3 checks passed
@AllanDantas21 AllanDantas21 deleted the feat/83-grafana-alerts-and-rules branch March 21, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DEVOPS] - Setar alertas e suas regras

3 participants