https://github.com/vozlt/nginx-module-vts 模块编译进 nginx
    然后在 nginx 配置文件添加如下配置:

    1. http {
    2. vhost_traffic_status_zone;
    3. ... ...
    4. server {
    5. listen 9109;
    6. # 只允许 prometheus 服务器访问
    7. allow 192.168.137.200;
    8. location /status/format/prometheus {
    9. vhost_traffic_status_display;
    10. vhost_traffic_status_display_format prometheus;
    11. }
    12. }
    13. }

    重启 nginx 即可