forked from Cloud-CV/EvalAI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Monitoring] Add monitoring setup production environment (Cloud-CV#3602)
- Loading branch information
Showing
6 changed files
with
179 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
upstream prometheus { | ||
server prometheus:9090 fail_timeout=0; | ||
} | ||
|
||
upstream grafana { | ||
server grafana:3000 fail_timeout=0; | ||
} | ||
|
||
upstream statsd_exporter { | ||
server statsd:9102 fail_timeout=0; | ||
} | ||
|
||
upstream alert_manager { | ||
server alert_manager:9093 fail_timeout=0; | ||
} | ||
|
||
server { | ||
server_name monitoring.eval.ai; | ||
listen 80; | ||
return 301 https://monitoring.eval.ai$request_uri; | ||
} | ||
|
||
server { | ||
server_name monitoring.eval.ai; | ||
listen 443 ssl; | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
} | ||
|
||
ssl on; | ||
ssl_certificate /etc/ssl/eval_ai.crt; | ||
ssl_certificate_key /etc/ssl/eval_ai.key; | ||
ssl_prefer_server_ciphers on; | ||
# enables all versions of TLS, but not SSLv2 or 3 which are weak and now deprecated. | ||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
|
||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
location /prometheus { | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://prometheus; | ||
} | ||
|
||
location /grafana { | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://grafana; | ||
} | ||
|
||
location /statsd { | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://statsd_exporter; | ||
} | ||
|
||
location /alert_manager { | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://alert_manager; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
global: | ||
scrape_interval: 30s | ||
external_labels: | ||
monitor: 'evalai-monitor' | ||
|
||
rule_files: | ||
- /etc/rules/rules.yml | ||
|
||
scrape_configs: | ||
- job_name: 'prometheus' | ||
metrics_path: '/prometheus/metrics' | ||
static_configs: | ||
- targets: ['localhost:9090'] | ||
|
||
- job_name: 'statsd' | ||
metrics_path: '/statsd/metrics' | ||
static_configs: | ||
- targets: ['monitoring.eval.ai'] | ||
|
||
- job_name: 'node_exporter' | ||
metrics_path: '/node_exporter' | ||
static_configs: | ||
- targets: ['eval.ai'] | ||
|
||
alerting: | ||
alertmanagers: | ||
- path_prefix: '/alert_manager' | ||
scheme: 'https' | ||
static_configs: | ||
- targets: ['monitoring.eval.ai'] |
This file contains 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
This file contains 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
This file contains 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