• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Resolved Grafana fails: Option '[alerting].enabled' cannot be true. Legacy Alerting is removed. It is no longer deployed, enhanced, or supported.

theunknownstuntman

Basic Pleskian
Server operating system version
Ubuntu 20.04.6 LTS.
Plesk version and microupdate number
Plesk Obsidian 18.0.60 Update #1
As discussed here Question - Grafana update for cve-2023-6152 still missing in https://autoinstall.plesk.com/grafana/deb I decided to
install the still missing grafana update manually to version 10.4.2 via

deb https://packages.grafana.com/oss/deb stable main

At first everything worked fine.

Now I am getting this error message

Code:
logger=settings t=2024-05-21T10:02:42.360246952+02:00 level=error msg="Option '[alerting].enabled' cannot be true. Legacy Alerting is removed. It is no longer deployed, enhanced, or supported. Delete '[alerting].enabled' and use '[unified_alerting].enabled' to enable Grafana Alerting. For more information, refer to the documentation on upgrading to Grafana Alerting (https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts)"

It seems grafana has been upgraded automatically and now has deprecated some features.

I decided to completely remove grafana and its config files and install the version, that supports the old configuration format via "apt install grafana=10.4.2".
At this point grafana is running fine, atl east "systemctl status grafana-server.service" says so.

Unfortunately as soon as I run "plesk bin extension --install grafana" "grafana/stable,now 11.0.0" is installed, which fails again, as I receive the following error message

Code:
plesk bin extension --install grafana
[2024-05-21 10:03:56.115] 1554168:664c550ecc6c1 ERR [extension/grafana] The execution of post-install.php has failed with the following message:
[2024-05-21 10:03:56.107] 1554341:664c551fe884a ERR [extension/grafana] Grafana service failed to start
The execution of post-install.php has failed with the following message:
[2024-05-21 10:03:56.107] 1554341:664c551fe884a ERR [extension/grafana] Grafana service failed to start

In the grafana.log I can again find the error message.

Code:
logger=settings t=2024-05-21T10:02:42.360246952+02:00 level=error msg="Option '[alerting].enabled' cannot be true. Legacy Alerting is removed. It is no longer deployed, enhanced, or supported. Delete '[alerting].enabled' and use '[unified_alerting].enabled' to enable Grafana Alerting. For more information, refer to the documentation on upgrading to Grafana Alerting (https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts)"


My question is:

How can I get grafana 10.4.x and it's plesk extension back running.... ?? At this time three plesk servers are affected.

I use Ubuntu 20.04.6 LTS.

I appreciate any help. Thanks.
 
Can you try to modify /etc/grafana/grafana.ini file, find the [alerting] section and change the comment out the enabled = true line with a ;. Like so:
Code:
[alerting]
# Disable legacy alerting engine & UI features
;enabled = true
 
Can you try to modify /etc/grafana/grafana.ini file, find the [alerting] section and change the comment out the enabled = true line with a ;. Like so:
Code:
[alerting]
# Disable legacy alerting engine & UI features
;enabled = true
Thank you @Kaspar@Plesk for your answer. I tried "enabled = false" before, and now also commented the section out.

After I restarted Grafana, the service was running again.
Code:
 vim /etc/grafana/grafana.ini
root@wiki:~# systemctl restart grafana-server.service
root@wiki:~# systemctl status grafana-server.service
● grafana-server.service - Grafana instance
     Loaded: loaded (/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2024-05-21 14:05:34 CEST; 8s ago
       Docs: http://docs.grafana.org
   Main PID: 1622985 (grafana)
      Tasks: 9 (limit: 4594)
     Memory: 43.9M
     CGroup: /system.slice/grafana-server.service
             └─1622985 /usr/share/grafana/bin/grafana server --config=/etc/grafana/grafana.ini --pidfile=/run/grafana/grafana-server.pid --packaging=deb cfg:default.paths.logs=/var/log/grafana cfg:defa>

"plesk bin extension --install grafana" fails again, and the section, that was disabled in "/etc/grafana/grafana.ini" is enabled again. The ";" got removed.

Code:
[2024-05-21 14:07:35.880] 1623117:664c8e2c8c270 ERR [extension/grafana] The execution of post-install.php has failed with the following message:
[2024-05-21 14:07:35.870] 1623300:664c8e3cd02d1 ERR [extension/grafana] Grafana service failed to start
The execution of post-install.php has failed with the following message:
[2024-05-21 14:07:35.870] 1623300:664c8e3cd02d1 ERR [extension/grafana] Grafana service failed to start

exit status 1
root@wiki:~# systemctl status grafana-server.service
● grafana-server.service - Grafana instance
     Loaded: loaded (/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-05-21 14:06:22 CEST; 1min 18s ago
       Docs: http://docs.grafana.org
    Process: 1625491 ExecStart=/usr/share/grafana/bin/grafana server --config=${CONF_FILE} --pidfile=${PID_FILE_DIR}/grafana-server.pid --packaging=deb cfg:default.paths.logs=${LOG_DIR} cfg:default.pat>
   Main PID: 1625491 (code=exited, status=1/FAILURE)

May 21 14:06:22 wiki.xxx.de systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 7.
May 21 14:06:22 wiki.xxx.de systemd[1]: Stopped Grafana instance.
May 21 14:06:22 wiki.xxx.de systemd[1]: grafana-server.service: Start request repeated too quickly.
May 21 14:06:22 wiki.xxx.de systemd[1]: grafana-server.service: Failed with result 'exit-code'.

/var/log/grafana/grafana.log

[CODE]logger=settings t=2024-05-21T14:06:22.382145395+02:00 level=error msg="Option '[alerting].enabled' cannot be true. Legacy Alerting is removed. It is no longer deployed, enhanced, or supported. Delete '[alerting].enabled' and use '[unified_alerting].enabled' to enable Grafana Alerting. For more information, refer to the documentation on upgrading to Grafana Alerting (https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts)"
May 21 14:06:22 wiki.xxx.de systemd[1]: Failed to start Grafana instance.[/CODE]
 
The configuration files gets overwritten when you re-install Grafana.

But what was the reason to re-install Grafana if it was already installed and worked when you applied the provided configuration?
 
I thought I need to install the Grafana extension on top of the grafana package (via apt) together with the monitoring extension in plesk. As far as I understand you, I do not need the grafana extension, when grafana was already installed via apt package manager or am I still confusing something?

Thanks again for your help.
 
I don't know to be honest. You've created a customized setup using your own Grafana installation via apt. The recommended route is to use the monitoring extension together with the Grafana extension, with any installing Grafana package(s) via apt.
 
Ok, I have now uninstalled grafana via apt, installed the extension via Plesk, commented out "[alerting].enabled", and installed the monitoring extension. When I now open Monitoring in Plesk I receive the message "Dashboard not found".

Following this advice Issue - Dashboard Not Found and rebooting the server did not help.
 
In /var/log/grafana/grafana.log I can find the following errors.


Code:
logger=renderer.manager t=2024-05-22T13:42:25.363741166+02:00 level=error msg="Failed to get renderer plugin sources" error="failed to open plugins path"
logger=plugin.sources t=2024-05-22T13:42:25.367214559+02:00 level=error msg="Failed to load external plugins" error="failed to open plugins path"
logger=plugins.registration t=2024-05-22T13:42:25.397148042+02:00 level=error msg="Could not register plugin" pluginId=xychart error="plugin xychart is already registered"
logger=plugins.initialization t=2024-05-22T13:42:25.397225088+02:00 level=error msg="Could not initialize plugin" pluginId=xychart error="plugin xychart is already registered"
logger=renderer.manager t=2024-05-22T13:42:25.407343142+02:00 level=error msg="Failed to get renderer plugin sources" error="failed to open plugins path"
logger=plugins.registration t=2024-05-22T13:42:42.135903327+02:00 level=error msg="Could not register plugin" pluginId=xychart error="plugin xychart is already registered"
logger=plugins.initialization t=2024-05-22T13:42:42.136021942+02:00 level=error msg="Could not initialize plugin" pluginId=xychart error="plugin xychart is already registered"
logger=plugin.signature.validator t=2024-05-22T13:42:42.136590323+02:00 level=warn msg="Permitting unsigned plugin. This is not recommended" pluginId=plesk-json-backend-datasource
logger=plugin.plesk-json-backend-datasource t=2024-05-22T13:55:47.274516813+02:00 level=error msg="plugin process exited" plugin=/var/lib/grafana/plugins/plesk-json-backend-datasource/dist/gpx_plesk-json-backend-datasource_linux_amd64 id=2027017 error="signal: terminated"
logger=plugins.registration t=2024-05-22T13:57:40.463566964+02:00 level=error msg="Could not register plugin" pluginId=xychart error="plugin xychart is already registered"
logger=plugins.initialization t=2024-05-22T13:57:40.46367673+02:00 level=error msg="Could not initialize plugin" pluginId=xychart error="plugin xychart is already registered"
logger=plugin.signature.validator t=2024-05-22T13:57:40.464520873+02:00 level=warn msg="Permitting unsigned plugin. This is not recommended" pluginId=plesk-json-backend-datasource
 
With the help of the support I could fix this now.

The solution was:

- ssh to the affected server
- remove or comment out the grafana repository in /etc/apt/sources.list
- run the following commands:
-- apt-get purge grafana
-- plesk bin extension -u monitoring
- login to Plesk admin panel, install "monitoring" extension and ignore the error message
- go to "monitoring" in Plesk admin panel and click on "fix monitoring"
- enjoy a working grafana monitoring in Plesk :)
 
Back
Top