unable to configure grafana with graphite

后端 未结 7 878
孤独总比滥情好
孤独总比滥情好 2021-02-10 11:44

I am using Nginx to serve both graphite and grafana (they are all running on the same server - not my desktop). I am able to access graphite via Nginx. However, grafana cannot

相关标签:
7条回答
  • 2021-02-10 12:19

    I'm not sure if the OP has resolved their problem yet or not, but here's what worked for me:

    I put graphite and grafana on the same site. Graphite exists at the root and grafana within /grafana/

    This solves the cross site scripting problem without having to setup CORS: graphite and grafana are on the same site.

    nginx site configuration:

    upstream graphite {
        server unix:///var/uwsgi/graphite-web.sock;
    }
    
    server {
        listen 8080;
        listen [::]:8080 ipv6only=on;
    
        root /usr/share/graphite-web/;
    
        server_name localhost;
    
        location /static {
                alias /usr/share/graphite-web/static;
        }
    
        location /grafana {
                alias /usr/share/graphite-web/grafana;
        }
    
    
        location / {
                uwsgi_pass graphite;
                include /etc/nginx/uwsgi_params;
        }
    }
    

    To access grafana, I therefore go to:

    http://192.168.1.1:8080/grafana
    

    (192.168.1.1 is my server's ip address)

    0 讨论(0)
提交回复
热议问题