Skip to content

Commit a9f7604

Browse files
authored
Merge pull request #10 from Cdeth567/lab09
lab09 completed
2 parents cbfa8eb + 5d1f509 commit a9f7604

23 files changed

Lines changed: 2249 additions & 87 deletions
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
- name: Deploy monitoring stack with Prometheus, Loki and Grafana
3+
hosts: webservers
4+
become: true
5+
6+
roles:
7+
- docker
8+
- monitoring
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
monitoring_dir: /opt/monitoring
3+
monitoring_project_name: lab08-monitoring
4+
monitoring_network_name: logging
5+
6+
grafana_version: "12.3.1"
7+
loki_version: "3.0.0"
8+
promtail_version: "3.0.0"
9+
prometheus_version: "3.9.0"
10+
11+
monitoring_app_image: "{{ docker_image | default('devops-info-service') }}"
12+
monitoring_app_tag: "{{ docker_image_tag | default('latest') }}"
13+
monitoring_app_container_name: app-python
14+
monitoring_app_port: 8000
15+
monitoring_app_health_endpoint: /health
16+
17+
grafana_admin_user: admin
18+
grafana_admin_password: admin
19+
prometheus_port: 9090
20+
prometheus_retention_days: 15
21+
prometheus_retention_size: "10GB"
22+
prometheus_scrape_interval: "15s"
23+
24+
prometheus_targets:
25+
- job: prometheus
26+
targets:
27+
- localhost:9090
28+
- job: loki
29+
targets:
30+
- loki:3100
31+
path: /metrics
32+
- job: grafana
33+
targets:
34+
- grafana:3000
35+
path: /metrics
36+
- job: app
37+
targets:
38+
- app-python:8000
39+
path: /metrics

0 commit comments

Comments
 (0)