improve example configuration
This commit is contained in:
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -171,6 +171,7 @@ jobs:
|
||||
cp "objs/${MODULE_NAME}.so" "$package_dir/modules/${MODULE_NAME}.so"
|
||||
strip --strip-unneeded "$package_dir/modules/${MODULE_NAME}.so" || true
|
||||
cp "$GITHUB_WORKSPACE/examples/nginx.conf" "$package_dir/examples/nginx.conf"
|
||||
cp "$GITHUB_WORKSPACE/examples/monitoring-site.conf" "$package_dir/examples/monitoring-site.conf"
|
||||
cp "$GITHUB_WORKSPACE/README.md" "$package_dir/README.md"
|
||||
cp "$GITHUB_WORKSPACE/docs/API.md" "$package_dir/docs/API.md"
|
||||
cp "$GITHUB_WORKSPACE/docs/CONFIGURATION.md" "$package_dir/docs/CONFIGURATION.md"
|
||||
|
||||
41
examples/monitoring-site.conf
Normal file
41
examples/monitoring-site.conf
Normal file
@@ -0,0 +1,41 @@
|
||||
##
|
||||
# Monitoring Configs
|
||||
##
|
||||
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;
|
||||
|
||||
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 / {
|
||||
return 200 "ngx_http_monitoring_module example\n";
|
||||
}
|
||||
}
|
||||
@@ -1,59 +1,10 @@
|
||||
load_module modules/ngx_http_monitoring_module.so;
|
||||
|
||||
worker_processes auto;
|
||||
load_module /etc/nginx/modules/ngx_http_monitoring_module.so;
|
||||
|
||||
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";
|
||||
}
|
||||
}
|
||||
include /etc/nginx/site-enabled/monitoring-site.conf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user