Articles in this section

Plesk monitoring extension shows empty graphs: origin not allowed

kb: bug kb: fixed Plesk for Linux

Applicable to:

  • Plesk for Linux

Symptoms

  • "No data" and "origin not allowed" messages are shown for graphs in Plesk > Monitoring:
    mceclip1.png
  • In an attempt to click the red triangle (as shown on the screenshot above) there is an error message:

    CONFIG_TEXT: 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:

    CONFIG_TEXT: 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_64

    For Debian/Ubuntu-based distributions 

    # dpkg -l | grep grafana
    ii grafana 8.3.6 amd64 Grafana

    Cause

    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
    1. Log into the server via SSH.
    2. Using the vi text editor open /etc/sw-cp-server/conf.d/grafana_plesk.inc file.
    3. Find change the line lines below from:

      CONFIG_TEXT: 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

      CONFIG_TEXT: 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;
      }

    4. Save changes.
    5. Reload sw-cp-server to apply the changes:

      # systemctl reload sw-cp-server.service

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.