Multiple plugin sighning

Hello,

I’m currently developing an application plugin and would like to submit it as a community plugin. I’m working on aligning the architecture and code with the signing requirements, one of which states: “Do not embed multiple plugins into a single plugin.”

Part of my application plugin includes a custom panel plugin that I developed specifically for this application. It’s essential for the proper functionality of the app and is tightly integrated. Currently, the panel plugin is embedded within the application plugin.

Is it acceptable to keep this structure, or should I separate the panel into its own plugin?

Here is the link to my repository:

Thank you very much,
Vakhtang

Hi.

It is ok to have a panel plugin and/or data source plugin inside an app plugin.

Make sure they are structured like this:

git-root:
   src: 
     - // your app code
     - plugin.json // your app plugin.json
     - panel/
          - // your panel code
          - plugin.json // your panel plugin.json
     - datasource/
         - //your datasource code
         - plugin.json // your datasource plugin.json

Take a look at zabbix which is a plugin doing this GitHub - grafana/grafana-zabbix: Zabbix plugin for Grafana dashboard

Hello @academo

Thank you for your reply.

I followed your instructions, but when I run npx @grafana/plugin-validator, I receive the following error:

error: Nested plugin panel/plugin.json is not declared parent plugin.json
detail: Found a plugin panel/plugin.json nested inside your archive but not declared in plugin.json. Make sure to declare the type and path of the nested plugin.

I tried adding the following to plugin.json:

  "subPlugins": [
    {
      "type": "panel",
      "path": "panel"
    }
  ]

However, it seems this option has been removed in Grafana 11, as I get:

error: plugin.json: (root): Additional property subPlugins is not allowed

How should I properly register the panel inside my App plugin for Grafana 12?
I’m not sure if I can safely ignore this validation error, or if it’s a critical issue for the submission process.

Thank a lot

Hi @vakhtang1 such attribute doesn’t exist (maybe an LLM hallucinated it?)

Take a look at the reference for plugin.json Metadata (plugin.json) | Grafana Plugin Tools

You want to add these nested plugins in the includes section. Take a look at how zabbix does it grafana-zabbix/src/plugin.json at main · grafana/grafana-zabbix · GitHub

I also noticed we are not covering how to modify the plugin.json in our docs about nested plugins so I created an issue to add that to our docs

Thank you very much!
With the example, that you provided, it works