On October 19, 2021, we have enabled single-sign-on for our Plesk Support Center to provide a seamless login/account experience. This implies that you’ll be able to use a single account across any of our web-facing properties.
If you had already registered your account at Plesk 360 (formerly known as My Plesk) please use one for login. Otherwise please re-register it using the same email address as your existing Zendesk login (support account). It’s essential that you use the same email address on our support center to ensure that your tickets stay attached to the same account.

How to monitor several Plesk Servers with Grafana extension?

Follow

Comments

9 comments

  • Avatar
    Mark S.

    Hello, I am using the Grafana extension ( Advanced Monitoring) included in Obsidian and would like to add PROMETHEUS as Data Source.

    [ext-grafana]
    allowSuperAdmin = true

    is stored in the Panel.ini. Unfortunately the integration of Prometheus does not work...
    I followed these instructions https://prometheus.io/docs/visualization/grafana/#creating-a-prometheus-data-source

    But I only get this error: Unknown error during query transaction. Please check JS console logs.
    This one again says nothing ...
    Anybody got an idea?


    Greetings

    1
    Comment actions Permalink
  • Avatar
    Jacob D Dean (Edited )

    Hi,

    I followed these instructions for my Plesk Obsidian server running v18.0.28 and get the success message when creating the data source "Data source is working," but when I go to add a panel to the dashboard and select the data source, I get an "Internal server error" response:

     

    For reference, I am running Grafana locally on a MacBook. I've also tried running inside a Docker on the target machine and I get the same error. I have my IP whitelisted in the Plesk firewall for port 3000 and 8443, but the fact that it seems to test successfully when setting up the data source leads me to believe that is not the issue.

     

    *************** Update **************

    It appears it errors out on creation if you don't have a query, which makes sense, but I guess I expected a default query like in the animated screenshot in this article. It's a little confusing for Grafana to throw an error first thing, but that's not something you guys handle.

    I am still having trouble with the filterable list of query options. I have to manually enter the query, for example: "cpu:percent-user:value".

    Although, I figured out that you can inspect the JSON formatting of the Grafana panels in Plesk by left-clicking on the panel title, select "Inspect" and clicking "Panel JSON." Click "Copy to clipboard,", then paste it in your custom Grafana instances' panel by doing the same. Just make sure to reselect your data source before saving. 

    0
    Comment actions Permalink
  • Avatar
    Anton Maslov

    Mark S. we did not test integration with PROMETHEUS as a data source. Based on error it looks like Prometheus does not respond properly to query. My first advice would be to check that Prometheus server URL is accessible form server itself. E.g. if you use http://localhost:9090/ like in example make sure you may connect to it from SSH:

    # telnet localhost 9090

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Jacob D Dean

    Thank you for sharing your user experience.

    In case getting stuck on one of the further stages, I suggest also contacting Grafana developers: https://github.com/grafana/grafana/issues/

    0
    Comment actions Permalink
  • Avatar
    Jacob D Dean

    Ivan Postnikov

    I will reach out to Grafana and/or the plugin developer, but in the meantime, is there anywhere I can get a list (or API query that will list) of all of the metrics available from Plesk that I can use in Grafana?

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Jacob D Dean

    Sorry for the late response.

    There's a way to provide all the metrics straight to Grafana.

    Metrics are available at https://example.com:8443/modules/monitoring/public/index.php/AUTH_TOKEN

    AUTH_TOKEN is stored in Plesk database, to get it (example output from a test server):

    # plesk db "Select value from ModuleSettings Where name = 'rrd_api_auth_token'"
    +------------------------------------------+
    | value |
    +------------------------------------------+
    | _qzuAPkvl_BhbQd7ndj1_r_n-6av4FDfCSqHbwwL |
    +------------------------------------------+

    Use that URL as described here at "3. Add the datasource to Grafana".

    This link leads to a blog, it's very detailed and you should be able to configure everything on your side.

     

    0
    Comment actions Permalink
  • Avatar
    Marius Schulte

    Hey,

    Im running an Ubuntu 18 vServer with Plesk. I did everthings which was recommended here, but I dont get any data, if I want to create the dashboard.
    Tested with two servers, one with a ssl-cert for the login under https://domain.eu:8443 the other one with the standard login without ssl-cert.
    Both not having any data.

    What can I do? :/

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Marius Schulte

    The cause of such behavior is unclear. Maybe other Pleskians could suggest something. I suggest creating a topic at our forum

    0
    Comment actions Permalink
  • Avatar
    Christian Toller

    Hi there,

    just started my attempt to setup monitoring for my Plesk servers and I'm already stuck at getting the auth token:

    root@host6:~#
    root@host6:~# plesk db "Select * from ModuleSettings Where name = 'rrd_api_auth_token'"
    root@host6:~#

    No token!!!

    I'm running Plesk Obsidian 18.0.38 Update #3 on Debian 10 with Extensions Grafana 1.2.5-258 and Monitoring 1.4.4-475

    Am I missing something??

    Thanks,
    Christian

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request