60 lines
1.2 KiB
Nginx Configuration File
60 lines
1.2 KiB
Nginx Configuration File
load_module modules/ngx_http_monitoring_module.so;
|
|
|
|
worker_processes auto;
|
|
|
|
events {
|
|
worker_connections 65535;
|
|
}
|
|
|
|
http {
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
monitor_refresh_interval 1s;
|
|
monitor_history 5m;
|
|
monitor_resolution 1s;
|
|
monitor_shm_size 8m;
|
|
|
|
monitor_collect_system on;
|
|
monitor_collect_nginx on;
|
|
monitor_collect_network on;
|
|
monitor_access_log on;
|
|
monitor_max_top_urls 100;
|
|
|
|
upstream demo_backend {
|
|
server 127.0.0.1:9000 max_fails=3 fail_timeout=10s;
|
|
keepalive 32;
|
|
}
|
|
|
|
server {
|
|
listen 8080;
|
|
server_name localhost;
|
|
|
|
location /monitor {
|
|
monitor on;
|
|
monitor_dashboard on;
|
|
monitor_api on;
|
|
monitor_sse on;
|
|
|
|
monitor_allow 127.0.0.1/32;
|
|
monitor_allow ::1/128;
|
|
monitor_deny all;
|
|
|
|
monitor_basic_auth off;
|
|
monitor_api_token "";
|
|
monitor_cors off;
|
|
monitor_rate_limit 120;
|
|
}
|
|
|
|
location /proxy {
|
|
proxy_pass http://demo_backend;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
}
|
|
|
|
location / {
|
|
return 200 "ngx_http_monitoring_module example\n";
|
|
}
|
|
}
|
|
}
|