Symptoms
- "No data" and "origin not allowed" messages are shown for graphs in Plesk > Monitoring:
-
In an attempt to click the red triangle (as shown on the screenshot above) there is an error message:
origin not allowed Objectstatus:403 statusText:"Forbidden" data:Objectmessage:"origin not allowed " error:"Forbidden" response:"origin not allowed " config:Objecturl:"api/datasources/proxy/2/query" data:Object method:"POST" withCredentials:false headers:Object retry:0 hideFromInspector:false message:"origin not allowed "
-
The following messages can be found in
/var/log/grafana/grafana.log
:lvl=eror msg="Failed to look up user based on cookie" logger=context error="user token not found"
lvl=eror msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/login/generic_oauth status=500 remote_addr=127.0.0.1 time_ms=2 size=1383 referer="https://unikmedia.fr:8443/modules/grafana/service/d/monitoring__hdd/surveillance-disque?kiosk=tv&theme=light&orgId=1&refresh=2m" - The Grafana extension was updated and now is 8.3.6:
For CentOS/RHEL-based distributions
# rpm -qa | grep grafana
grafana-8.3.6-1.x86_64For Debian/Ubuntu-based distributions
# dpkg -l | grep grafana
ii grafana 8.3.6 amd64 GrafanaCause
This is a bug with ID #EXTPLESK-3382.
Fixed in grafana-1.3.1-285.Resolution
Update system packages via Tools & Settings > System Updates menu.
Workaround
- Log into the server via SSH.
- Using the vi text editor open
/etc/sw-cp-server/conf.d/grafana_plesk.inc
file. -
Find change the line lines below from:
location /modules/grafana/service/ {
proxy_pass http://127.0.0.1:3030/;
rewrite ^/modules/grafana/service/login$ /modules/grafana/service/login/generic_oauth redirect;
}To
location /modules/grafana/service/ {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:3030/;
rewrite ^/modules/grafana/service/login$ /modules/grafana/service/login/generic_oauth redirect;
} - Save changes.
-
Reload
sw-cp-server
to apply the changes:# systemctl reload sw-cp-server.service