OpenNMS, HELM and Nginx issue

#1

Hi all, I’m using OpenNMS and Grafana with HELM behind a Nginx reverse proxy.
When configuring the alarm table, the visualisation options are completely missing.

When I disable Nginx for HELM and OpenNMS, it’s working… So, I guess my Grafana instance is ok.

My Nginx config for Grafana:

location /grafana/ {
proxy_pass http://127.0.0.1:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_max_temp_file_size 0;
proxy_buffering off;
proxy_redirect https://127.0.0.1:3000 https://monitoring.fanuc.local:443/grafana/;
}
I guess there is something missing in order to make the alarm table work correctly?
I’m using Grafana 6 with HELM 3.0.1, but the issue was also existing before.

#2

When you run Grafana in a subpath, you need to configure it in Grafana. The guide from their docs is here. Just verify if your setup covers that. It seems like you want terminate SSL on your reverse proxy. I would first try to make /grafana in a subpath work and later adding SSL support.

Can you share also the other interesting parts of your NGINX reverse proxy config? You can anonymize it just to be sure.

#3

I double checked the subpath config for grafana.ini and I have it setup correctly.
root_url = %(protocol)s://%(domain)s:/grafana/

Here my full nginx config:

server {
listen 80;
server_name monitoring.fanuc.local;
root /usr/share/nginx/html/;

    location / {
       return 301 https://monitoring.fanuc.local$request_uri;
    }

}

server {
listen 443;
server_name monitoring.fanuc.local;
root /usr/share/nginx/html/;

    # grafana as landing page
    location / {
            rewrite ^/(.*) https://monitoring.fanuc.local/grafana/ permanent;
    }

    location /opennms/ {
                    proxy_set_header Host $host;
                    proxy_set_header X-Real-IP $remote_addr;
                    proxy_set_header X-Host monitoring.fanuc.local:443;
                    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                    proxy_set_header X-Forwarded-Proto $scheme;
                    proxy_set_header    Upgrade $http_upgrade;
                    proxy_set_header    Connection "Upgrade";
                    proxy_intercept_errors on;
                    proxy_pass http://127.0.0.1:8980;
                    proxy_read_timeout  90;
                    proxy_redirect https://127.0.0.1:8980 https://monitoring.fanuc.local:443;
    }

    location /grafana/ {
            proxy_pass http://127.0.0.1:3000/;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_max_temp_file_size 0;
            proxy_buffering off;
            proxy_redirect https://127.0.0.1:3000 https://monitoring.fanuc.local:443/grafana/;
    }
  ssl                  on;

    ssl_certificate      xxx;
    ssl_certificate_key  xxx;

    ssl_session_timeout  5m;

    ssl_protocols  xxx;
    ssl_ciphers  xxx;
    ssl_prefer_server_ciphers   on;

}

#4

I’m facing the same issue when not adding SSL support