The Grafana backend is refusing to load a panel plugin because it can’t find the plugin’s assets on the filesystem, which likely happened because the plugin installation path changed during your migration.
Here are the common reasons why Grafana can’t find your panel plugin:
1. Plugin Not Installed or Incorrectly Installed
Grafana needs the plugin code to be present in a directory it’s configured to look in. If the plugin wasn’t copied over, or was put in the wrong place, Grafana won’t see it.
Diagnosis:
Check the Grafana server’s data directory for plugins. The default location for plugins can be found in your grafana.ini file under the [paths] section, specifically plugins. A common default is /var/lib/grafana/plugins. List the contents of this directory:
ls -l /var/lib/grafana/plugins/
You should see a directory for your missing plugin (e.g., grafana-piechart-panel).
Fix:
If the plugin directory is missing, you need to install it. The easiest way is usually via Grafana’s built-in plugin manager (if you have UI access) or by downloading the plugin’s tarball and extracting it into the correct plugins directory. For example, to install the grafana-piechart-panel version 1.6.0:
# Download the plugin
wget https://grafana.com/api/plugins/piechart/versions/1.6.0/download -O piechart-1.6.0.tar.gz
# Extract into the correct plugins directory
sudo tar -zxvf piechart-1.6.0.tar.gz -C /var/lib/grafana/plugins/
# Ensure correct ownership
sudo chown -R grafana:grafana /var/lib/grafana/plugins/grafana-piechart-panel
This places the plugin’s files where Grafana expects them, allowing it to be discovered and loaded.
2. Incorrect Plugin Directory Ownership/Permissions
Even if the plugin files are in the right directory, Grafana might not be able to read them if the user running the Grafana process doesn’t have the necessary permissions.
Diagnosis: Check the ownership and permissions of the plugin directory and its contents:
ls -l /var/lib/grafana/plugins/
The grafana user (or whatever user your Grafana server runs as) needs read and execute permissions on the plugin directory and its contents.
Fix:
Recursively change ownership and permissions to the grafana user and group, and ensure read/execute permissions:
sudo chown -R grafana:grafana /var/lib/grafana/plugins/grafana-piechart-panel
sudo chmod -R u+rX,g+rX,o+rX /var/lib/grafana/plugins/grafana-piechart-panel
This grants the Grafana process access to read the plugin files it needs to load.
3. grafana.ini Path Configuration Issues
The grafana.ini file specifies where Grafana looks for plugins. If this path is incorrect or was not updated after a migration (e.g., moving Grafana to a new server or a different directory structure), Grafana won’t find plugins in their new location.
Diagnosis:
Open your grafana.ini configuration file (typically located at /etc/grafana/grafana.ini or /usr/local/etc/grafana/grafana.ini). Look for the [paths] section and the plugins directive.
[paths]
# Path to data plugins, dashboards, etc.
data = /var/lib/grafana
# ...
# Path to where Grafana should store plugins
plugins = /var/lib/grafana/plugins
Verify that the plugins path listed here actually contains your plugin directory.
Fix:
If the plugins path is incorrect, update it to point to the actual location where your plugins are stored. For example, if your plugins are now in /opt/grafana/data/plugins:
Edit /etc/grafana/grafana.ini and change:
plugins = /var/lib/grafana/plugins
to
plugins = /opt/grafana/data/plugins
After changing the configuration, restart the Grafana service for the changes to take effect:
sudo systemctl restart grafana-server
This ensures Grafana is looking in the correct directory for its plugins.
4. Plugin ID Mismatch in Dashboard JSON
Each panel in a Grafana dashboard has a type field that specifies which plugin to use. If this type value doesn’t match the actual plugin ID (e.g., a typo, or the ID changed during a plugin update or migration), Grafana won’t be able to find the corresponding plugin for that panel.
Diagnosis:
Inspect the JSON definition of the dashboard containing the broken panel. Find the panel’s type field. Compare it to the expected plugin ID. You can often find the plugin ID on the Grafana plugin listing page or by examining the plugin’s plugin.json file within its directory (e.g., /var/lib/grafana/plugins/grafana-piechart-panel/plugin.json where you’d look for "id": "piechart").
Example dashboard JSON snippet:
{
"id": 1,
"title": "My Pie Chart",
"type": "grafana-piechart-panel", // <-- This is the field to check
// ... other panel settings
}
Fix:
Edit the dashboard JSON and correct the type field to match the plugin’s actual ID. If the panel’s type is grafana-piechart-panel but the plugin ID is just piechart, change it to:
{
"id": 1,
"title": "My Pie Chart",
"type": "piechart", // <-- Corrected ID
// ... other panel settings
}
Then, save the dashboard. This ensures the dashboard is referencing the plugin by its correct identifier.
5. Corrupted Plugin Files
It’s rare, but plugin files can become corrupted during download, transfer, or due to disk issues. This can prevent Grafana from parsing or loading the plugin correctly.
Diagnosis: Attempt to reinstall the plugin as described in point 1. If the issue persists after a clean install and correct permissions, and other plugins work fine, file corruption is a possibility.
Fix: Remove the existing plugin directory completely and perform a fresh installation of the plugin from a known good source, following the steps in "Plugin Not Installed or Incorrectly Installed" above.
sudo rm -rf /var/lib/grafana/plugins/grafana-piechart-panel
# Then re-download and extract as per point 1
This replaces potentially corrupted files with a fresh copy, resolving issues caused by data integrity problems.
6. Grafana Backend Cache Issues
Grafana caches plugin information to improve performance. If the cache becomes stale after a migration or plugin update, it might still point to old or non-existent plugin locations.
Diagnosis: This is harder to diagnose directly, but if you’ve exhausted other options and confirmed the plugin is correctly installed and accessible, a cache issue is plausible.
Fix:
Restarting the Grafana server often clears some transient caches. For a more thorough cache clear, you can manually remove Grafana’s cache directories, typically located within the data path defined in grafana.ini (e.g., /var/lib/grafana/cache).
sudo rm -rf /var/lib/grafana/cache/*
sudo systemctl restart grafana-server
This forces Grafana to re-scan and re-index all available plugins upon startup.
After addressing these, you might encounter issues with data source connections if those were also affected by the migration, or potentially problems with specific panel configurations if they relied on features that have changed or are no longer supported by the plugin version.