I'm trying to set up a Grafana front end for our legacy graphite server. Both processes run on the same EC2 instance running Ubuntu 12.04. I'm having issues importing dashboards from graphite-web. I'm able to list them successfully, but when I try to import one, I get "Problem! Not found." error message.
Specifically, when I follow the requests in Chrome, I see the following:
GET https://$MY_GRAPHITE_DOMAIN/dashboard/load/$MY-DASHBOARD-NAME
200'ing with JSON data in the bodyGET https://$MY_GRAFANA_DOMAIN/api/dashboards/import/$DASHBOARD-NAME-WITHOUT-DASHES
404'ing with the error message in its body.
I've tried curling the second GET locally and remotely, always to the same result. I've also curled with $MY-DASHBOARD-NAME in place of $DASHBOARD-NAME-WITHOUT-DASHES, and locally or remotely produces the same result.
My graphite data source is set up as https://$MY_GRAPHITE_DOMAIN with direct access and no auth. I switched to direct access because that allowed me to list the Graphite dashboards, where proxy access did not. Every other feature, besides these imports, works fine.
For what it's worth, both Graphite and Grafana are running on the same machine with nginx in front of them. The installation is detailed below.
I'm using a vanilla Grafana install, with SSL terminating at nginx before being proxy-passed on. /etc/nginx/sites-enabled/grafana.conf
:
server {
listen 443;
server_name $MY_GRAFANA_DOMAIN;
// ssl conf
location / {
proxy_pass http://localhost:3000;
}
}
This legacy Graphite server (which I want to mess with as little as possible) runs behind nginx and uwsgi. I've added the Access-Control-Allow-Origin
directive. /etc/nginx/sites_enabled/graphite.conf
:
upstream uwsgi_graphite {
server unix:/tmp/uwsgi-graphite.sock;
}
include uwsgi_params;
server {
listen 443;
server_name $MY_GRAPHITE_DOMAIN;
root /opt/graphite;
underscores_in_headers on; # For legacy graphite clients with malformed headers
// SSL CONF
location / {
# Allow specified network with no password
# Everyone else needs the password
satisfy any;
allow 127.0.0.1/32;
allow $MY_HOME_IP;
deny all;
auth_basic "closed site";
auth_basic_user_file /opt/graphite/conf/htpasswd;
add_header Access-Control-Allow-Origin *;
uwsgi_pass_request_headers on;
uwsgi_pass uwsgi_graphite;
}
}
What have I done wrong that's preventing these imports from working? Alternatively, is there a workaround that I can use to do these imports?
I just need to transfer over these dashboards once, obviously. I've tried placing the response body of GET https://$MY_GRAPHITE_DOMAIN/dashboard/load/$MY-DASHBOARD-NAME
in a file and loading it locally, but to no effect.