logo NodeSeekbeta

简单使用docker-compose部署Grafana和Prometheus环境

1234
  • 这个docker搭建挺复杂的 xhj001

  • @高桑 #8

    本来就是各自组织用各自的面板,数据源不共用

    匿名访问在 auth.anonymous 设置,enable 开启,org_name 改为匿名访问的那个组织

  • @Testcharon #12 OK,懂了,大佬,目前可以访问,就是能贴贴完整反代配置吗,我代理https总是会报错 xhj015 xhj017 xhj024

  • 已搞定,大佬教程还是可以的,自己基础不太行 xhj015 xhj015 xhj015

  • @高桑 #13

            location / {
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
                proxy_redirect off;
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_pass http://127.0.0.1:3000;
            }
    
            location /api/live {
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
                proxy_set_header Host $http_host;
                proxy_pass http://127.0.0.1:3000;
                rewrite ^/(.*)  /$1 break;
            }
    
            location /prometheus/ {
                proxy_pass http://127.0.0.1:9110/;
                auth_basic "Prometheus";
                auth_basic_user_file /home/wwwroot/status.microcharon.dev/.htpasswd;
            }
    
            location /alertmanager/ {
                proxy_pass http://127.0.0.1:9093/;
                auth_basic "Alertmanager";
                auth_basic_user_file /home/wwwroot/status.microcharon.dev/.htpasswd;
            }
    

    这是目前我在用的反代配置,仅供参考

  • @Testcharon #15 感谢大佬耐心解答 xhj002

  • 如果用docker會不會測不到主機的數據??反而測到容器的

  • @Superwill8216 #17

    https://github.com/prometheus/node_exporter#docker

    如果 node exporter 要用 Docker,至少需要指定 path.rootfs 參數。

  • 谢谢分享

  • 有的图片没有加载出来,麻烦检查下~

1234

你好啊,陌生人!

我的朋友,看起来你是新来的,如果想参与到讨论中,点击下面的按钮!

📈用户数目📈

目前论坛共有72269位seeker

🎉欢迎新用户🎉