-
Notifications
You must be signed in to change notification settings - Fork 0
DEPLOY - v1.0.2 #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEPLOY - v1.0.2 #31
Changes from all commits
ab92c09
9708ad0
0da15a1
8aebacf
cd73df1
e1abee9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| services: | ||
| prometheus: | ||
| user: ${PROMETHEUS_USER} | ||
| image: prom/prometheus:latest | ||
| container_name: prometheus | ||
| volumes: | ||
| - /home/ubuntu/dearbelly/deployment/prometheus.yml:/etc/prometheus/prometheus.yml:ro | ||
| - /home/ubuntu/prometheus/volume:/prometheus/data | ||
|
Comment on lines
+7
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prometheus λ³Όλ₯¨ κ²½λ‘κ° - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus/data |
||
| ports: | ||
| - 9090:9090 | ||
| command: | ||
| - '--web.enable-lifecycle' | ||
| - '--config.file=/etc/prometheus/prometheus.yml' | ||
| - '--storage.tsdb.retention.time=15d' | ||
| restart: always | ||
| networks: | ||
| - mynetwork | ||
|
|
||
| grafana: | ||
| user: ${GRAFANA_USER} | ||
| image: grafana/grafana:latest | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
image: grafana/grafana:11.0.0 |
||
| container_name: grafana | ||
| ports: | ||
| - 3000:3000 | ||
| volumes: | ||
| - /home/ubuntu/grafana/volume:/var/lib/grafana | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Grafana λ°μ΄ν° λ³Όλ₯¨ κ²½λ‘κ° - grafana-data:/var/lib/grafana |
||
| restart: always | ||
| networks: | ||
| - mynetwork | ||
|
|
||
| networks: | ||
| mynetwork: | ||
| driver: bridge | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| groups: | ||
| - name: example | ||
| rules: | ||
| - alert: InstanceDown | ||
| expr: up == 0 | ||
| for: 5m | ||
| labels: | ||
| severity: page | ||
| annotations: | ||
| summary: "Instance {{ $labels.instance }} down" | ||
| description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes." | ||
| - alert: APIHighRequestLatency | ||
| expr: api_http_request_latencies_second{quantile="0.5"} > 1 | ||
| for: 10m | ||
| annotations: | ||
| summary: "High request latency on {{ $labels.instance }}" | ||
| description: "{{ $labels.instance }} has a median request latency above 1s (current value: {{ $value }}s)" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| global: | ||
| scrape_interval: 15s | ||
| scrape_timeout: 15s | ||
| evaluation_interval: 2m | ||
| external_labels: | ||
| monitor: 'codelab-monitor' | ||
| query_log_file: query_log_file.log | ||
| rule_files: | ||
| - "prometheus-rule.yml" | ||
| scrape_configs: | ||
| - job_name: 'prometheus' | ||
| scrape_interval: 10s | ||
| scrape_timeout: 10s | ||
| metrics_path: '/metrics' | ||
| honor_labels: false | ||
| honor_timestamps: false | ||
| scheme: 'http' | ||
| static_configs: | ||
| - targets: ['${REMOTE_HOST}:9090'] | ||
| labels: | ||
| service: 'monitor-1' | ||
| - job_name: 'node' | ||
| static_configs: | ||
| - targets: ['${REMOTE_HOST}:9090'] | ||
|
Comment on lines
+22
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
- job_name: 'node'
static_configs:
- targets: ['${REMOTE_HOST}:9100'] |
||
| - job_name: 'fastapi-actuator-blue' | ||
| metrics_path: '/actuator/prometheus' | ||
| scrape_interval: 1m | ||
| static_configs: | ||
| - targets: [ 'app-blue:8000' ] | ||
| - job_name: 'fastapi-actuator-green' | ||
| metrics_path: '/actuator/prometheus' | ||
| scrape_interval: 1m | ||
| static_configs: | ||
| - targets: [ 'app-green:8001' ] | ||
|
Comment on lines
+25
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prom/prometheus:latestμ κ°μ΄:latestνκ·Έλ₯Ό μ¬μ©νλ κ²μ νλ‘λμ νκ²½μμ μκΈ°μΉ μμ λ²μ λ³κ²½μΌλ‘ μΈν λ¬Έμ λ₯Ό μΌμΌν¬ μ μμ΅λλ€. μμ μ μΈ μ΄μμ μν΄ νΉμ λ²μ (μ:v2.51.2)μ λͺ μνλ κ²μ΄ μ’μ΅λλ€.