Unable to swap to legacy alerting on Linux when from 8.4.4 to +9.0

Hi, so I’m currently running Grafana 8.4.4 on a Linux machine, and I’ve tried to upgrade to the most recent version of 9.0

The issue I’m having is staying on legacy alerting, as there are lots of alert currently that doesn’t translate over to unified alerting that well. I usually don’t have problem configuring this in the config file on other machines I have that also run Grafana 9.0.

The config file doesn’t update the tags to with the newest tags either when I upgrade from 8.4.4, and I’ve also tried to copy paste the default config file from the Grafana github. So instead I’ve tried to copy paste the [unified alerting] in the config file, but when I put enabled = true it gives the following error when I restart the grafana service:

Unknown lvalue 'ProtectClock' in section 'Service'
Unknown lvalue 'ProtectHostname' in section 'Service'
Unknown lvalue 'ProtectKernelLogs' in section 'Service'
Unknown lvalue 'ProtectProc' in section 'Service'

I’ve prevously solved this following the guide on the github thread here:

But this does no longer fix it. So does anyone maybe have the same issue and perhaps a workaround for this? :slight_smile:

You’ll want to enable unified alerting and disable legacy alerting:

enabled = false

enabled = true

I already have done that. I’m looking to go the other way around actually, so enable legacy alerting and disable unified alerting.

enabled = true

enabled = false

When I restart the grafana service with the settings as shown above, I receive the following when I run systemctl status grafana-server

systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart.
systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 5.
systemd[1]: Stopped Grafana instance.
systemd[1]: grafana-server.service: Start request repeated too quickly.
systemd[1]: grafana-server.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Grafana instance.

I actually only receive the “Unknown lvalue” stuff whenever I reboot the system, so that doesn’t seem to be the problem because it just requires a restart of the grafana service to run when the unified alerting is activated. But when I deactivate unified alerting, and activate legacy alerting I receive the above issue with 502 Bad Gateway.

And in the Grafana log I receive the following information:

level=error msg="Critical error" reason="Grafana has already been migrated to Unified Alerting.\nAny alert rules created while using Unified Alerting will be deleted by rolling back.\n\nSet force_migration=true in your grafana.ini and restart Grafana to roll back and delete Unified Alerting configuration data."

But removing the Unified Alerting configuration data from the .ini file and using force_migration=true does nothing, it just stays on unified_alerting.