Skip to content
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
7 changes: 5 additions & 2 deletions ansible/playbooks/deploy_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
hosts: webservers
become: true
gather_facts: true

tasks:
- name: Deploy Monitoring Stack
ansible.builtin.include_role:
name: monitoring

- name: Deploy Python App
ansible.builtin.include_role:
name: web_app
Expand All @@ -29,4 +32,4 @@
app_internal_port: 8080
compose_project_dir: /opt/devops-go
app_environment:
APP_LANG: go
APP_LANG: go
23 changes: 23 additions & 0 deletions ansible/roles/monitoring/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,26 @@ promtail_memory_limit: "256m"
promtail_cpu_limit: "0.5"
grafana_memory_limit: "512m"
grafana_cpu_limit: "1.0"

# Prometheus
prometheus_version: "v3.9.0"
prometheus_port: 9090
prometheus_retention_days: "15d"
prometheus_retention_size: "10GB"
prometheus_scrape_interval: "15s"
prometheus_memory_limit: "1g"
prometheus_cpu_limit: "1.0"

prometheus_scrape_targets:
- job: "prometheus"
targets: ["localhost:9090"]
path: "/metrics"
- job: "loki"
targets: ["loki:3100"]
path: "/metrics"
- job: "grafana"
targets: ["grafana:3000"]
path: "/metrics"
- job: "app"
targets: ["devops-python:8000:8000"]
path: "/metrics"
Loading
Loading