Is it possible to remove default plugins of grafana?

Hello friends, I’m trying to deploy a dashboard system but would like to remove the default panel plugins that come with grafana… is that possible?

Hi. There is currently no way to disable the builr in panels. What is your use case?

If you built Grafana from source you can delete the panels you want from public/app/plugins/panel/
You’ll also have to remove the imports from public/app/features/plugins/built_in_plugins.ts

then just run yarn dev and you’re good to go

If you just don’t want certain plugins to be shown in the Visualization picker and built Grafana from source, you could add a method to public/app/features/dashboard/panel_editor/VizTypePicker.tsx:

hidePlugins = (pluginList: PanelPluginMeta[], pluginIds: string[]): PanelPluginMeta[] => {
  const filtered = pluginList.filter(plugin => {
    return !pluginIds.includes(plugin['id']);
  });

  return filtered;
};

Then change the render() method as follows and pass the list of panels you want to hide:

let filteredPluginList = this.getFilteredPluginList();
filteredPluginList = this.hidePlugins(filteredPluginList, ['logs', 'pluginlist']);
1 Like

Hello friends, the tips above did not help me. Are there any other solutions to this problem?

We have been migrating Grafana from Angular to React over the last year so a lot of this code has changed. Disabling core plugins is not a feature of Grafana so if you want to do that then you will have to get your hands dirty and dig into the code.

With that said, the above method to change the VizTypePicker should work if done properly. Though it won’t hide plugins everywhere in Grafana. Did you rebuild Grafana after making the changes?