aws-samples / aws-parallelcluster-monitoring

Monitoring Dashboard for AWS ParallelCluster
MIT No Attribution
31 stars 23 forks source link

grafana origin not allowed error when cluster build + FIX #23

Closed murugappanp closed 1 year ago

murugappanp commented 2 years ago

After building the cluster when we logon to the grafana dashboard I get this error when I view the master node or compute nodes details....origin now allowed and a bunch of errors...

After looking at it the fix is to add the proxy_set_header Host $http_host line to the nginx.conf file..here is the updated one

server { listen 80 default_server; listen [::]:80 default_server; servername ; return 301 https://$host$request_uri; }

server { listen 443 ssl; ssl_certificate /etc/ssl/nginx.crt; ssl_certificate_key /etc/ssl/nginx.key; server_name localhost; server_tokens off;

root /usr/share/nginx/html;

location /grafana/ { proxy_set_header Host $http_host; proxy_pass http://localhost:3000/; }

location /prometheus/ { proxy_pass http://localhost:9090/; proxy_set_header Host $http_host; }

location /pushgateway/ { proxy_pass http://localhost:9091/; proxy_set_header Host $http_host; }

location /slurmexporter/ { proxy_pass http://localhost:8080/; proxy_set_header Host $http_host; } }

sean-smith commented 1 year ago

Hi can you please submit a pull request?