Skip to main content

Plugin metadata (plugin.json)

The plugin.json file is required for all plugins. When Grafana starts, it scans the plugin folders and mounts every folder that contains a plugin.json file unless the folder contains a subfolder named dist. In that case, Grafana mounts the dist folder instead.

Properties​

PropertyTypeRequiredDescription
idstringYesUnique name of the plugin. If the plugin is published on grafana.com, then the plugin id should follow the Grafana naming convention.
namestringYesHuman-readable name of the plugin that is shown to the user in the UI.
typestringYesPlugin type. Possible values are: app, datasource, panel, renderer, secretsmanager.
infoobjectYesMetadata for the plugin. Some fields are used on the plugins page in Grafana and others on grafana.com if the plugin is published.
dependenciesobjectYesDependency information related to Grafana and other plugins.
$schemastringNoSchema definition for the plugin.json file. Used primarily for schema validation.
alertingbooleanNoFor data source plugins, if the plugin supports alerting. Requires backend to be set to true.
annotationsbooleanNoFor data source plugins, if the plugin supports annotation queries.
autoEnabledbooleanNoSet to true for app plugins that should be enabled and pinned to the navigation bar in all orgs.
backendbooleanNoIf the plugin has a backend component.
categorystringNoPlugin category used on the "Add data source" page. Possible values are: tsdb, logging, cloud, tracing, profiling, sql, enterprise, iot, other.
enterpriseFeaturesobjectNoGrafana Enterprise specific features
executablestringNoThe first part of the file name of the backend component executable. There can be multiple executables built for different operating system and architecture. Grafana will check for executables named <executable>_<$GOOS>_<lower case $GOARCH><.exe for Windows>, e.g. plugin_linux_amd64. Combination of $GOOS and $GOARCH can be found here: https://golang.org/doc/install/source#environment.
iamobjectNoInitialize a service account for the plugin, with a tailored set of RBAC permissions.
includesobject[]NoResources to include in plugin.
logsbooleanNoFor data source plugins, if the plugin supports logs. It may be used to filter logs only features.
metricsbooleanNoFor data source plugins, if the plugin supports metric queries. Used to enable the plugin in the panel editor.
multiValueFilterOperatorsbooleanNoFor data source plugins, if the plugin supports multi value operators in adhoc filters.
preloadbooleanNoInitialize plugin on startup. By default, the plugin initializes on first use, but when preload is set to true the plugin loads when the Grafana web app loads the first time. Only applicable to app plugins. When setting to true, implement frontend code splitting to minimise performance implications.
queryOptionsobjectNoFor data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed.
rolesobject[]NoList of RBAC roles and their default assignments.
routesobject[]NoFor data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to Authentication for data source plugins.
skipDataQuerybooleanNoFor panel plugins. Hides the query editor.
statestringNoMarks a plugin as a pre-release. Possible values are: alpha, beta.
streamingbooleanNoFor data source plugins, if the plugin supports streaming. Used in Explore to start live streaming.
tracingbooleanNoFor data source plugins, if the plugin supports tracing. Used for example to link logs (e.g. Loki logs) with tracing plugins.
extensionsobjectNoExtensions related meta-info.

dependencies​

Dependencies needed by the plugin.

Properties​

PropertyTypeRequiredDescription
grafanaDependencystringYesRequired Grafana version for this plugin. Validated using https://github.com/npm/node-semver.
grafanaVersionstringNo(Deprecated) Required Grafana version for this plugin, e.g. 6.x.x 7.x.x to denote plugin requires Grafana v6.x.x or v7.x.x.
pluginsobject[]NoAn array of required plugins on which this plugin depends.
extensionsobject[]Only if you depend on extensions.An object defining your plugins dependencies on extensions, such as exposed components.

plugins​

Plugin dependency. Used to display information about plugin dependencies in the Grafana UI.

Properties​

PropertyTypeRequiredDescription
idstringYes
namestringYes
typestringYesPossible values are: app, datasource, panel.
versionstringNoThis property should use a specific, pinned SemVer version and not a range. If no version is specified, it will resolve to the latest supported version.

extensions​

If your plugin depends on an exposed component using usePluginComponent(), you must register the id of the exposed component here, otherwise it won't work.

Properties​

PropertyTypeRequiredDescription
exposedComponentsstring[]Only if your plugin uses exposed components.A list of the exposed component ids that your plugin depends on.

enterpriseFeatures​

Grafana Enterprise specific features.

Properties​

PropertyTypeRequiredDescription
healthDiagnosticsErrorsbooleanNoEnable/Disable health diagnostics errors. Requires Grafana >=7.5.5.

iam​

Grafana reads the Identity and Access Management section and initializes a service account for the plugin, with a tailored set of Grafana RBAC permissions. Grafana will share the service account's bearer token with the plugin backend using the GF_PLUGIN_APP_CLIENT_SECRET environment variable.

Requires Grafana version 10.3.0 or later. Currently, this is behind the externalServiceAccounts feature toggle.

To try this feature out, follow this example.

Properties​

PropertyTypeRequiredDescription
permissionsobject[]NoRequired RBAC permissions to query Grafana.

permissions​

Properties​

PropertyTypeRequiredDescription
actionstringYesAction, for example: teams:read.
scopestringNoScope, e.g: teams:*.

includes​

Properties​

PropertyTypeRequiredDescription
actionstringNoThe RBAC action a user must have to see this page in the navigation menu. Warning: unless the action targets the plugin, only the action is verified, not what it applies to.
addToNavbooleanNoAdd the include to the side menu.
componentstringNo(Legacy) The Angular component to use for a page.
defaultNavbooleanNoPage or dashboard when user clicks the icon in the side menu.
iconstringNoIcon to use in the side menu. For information on available icon, refer to Icons Overview.
namestringNo
pathstringNoUsed for app plugins.
rolestringNoPossible values are: Admin, Editor, Viewer.
typestringNoPossible values are: dashboard, page, panel, datasource.
uidstringNoUnique identifier of the included resource

info​

Metadata for the plugin. Some fields are used on the plugins page in Grafana and others on grafana.com if the plugin is published.

Properties​

PropertyTypeRequiredDescription
keywordsstring[]YesArray of plugin keywords. Used for search on grafana.com.
logosobjectYesSVG images that are used as plugin icons.
updatedstringYesDate when this plugin was built.
versionstringYesSemVer version of the plugin, e.g. 6.7.1.
authorobjectNoInformation about the plugin author.
buildobjectNoBuild information
descriptionstringNoDescription of plugin. Used on the plugins page in Grafana and for search on grafana.com.
linksobject[]NoAn array of link objects to be displayed on this plugin's project page in the form {name: 'foo', url: 'http://example.com'}
screenshotsobject[]NoAn array of screenshot objects in the form {name: 'bar', path: 'img/screenshot.png'}

author​

Information about the plugin author.

Properties​

PropertyTypeRequiredDescription
emailstringNoAuthor's name.
namestringNoAuthor's name.
urlstringNoLink to author's website.

build​

Build information

Properties​

PropertyTypeRequiredDescription
branchstringNoGit branch the plugin was built from.
hashstringNoGit hash of the commit the plugin was built from
numbernumberNo
prnumberNoGitHub pull request the plugin was built from
repostringNo
timenumberNoTime when the plugin was built, as a Unix timestamp.

Properties​

PropertyTypeRequiredDescription
namestringNo
urlstringNo

logos​

SVG images that are used as plugin icons.

Properties​

PropertyTypeRequiredDescription
largestringYesLink to the "large" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image.
smallstringYesLink to the "small" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image.

screenshots​

Properties​

PropertyTypeRequiredDescription
namestringNo
pathstringNo

queryOptions​

For data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed.

Properties​

PropertyTypeRequiredDescription
cacheTimeoutbooleanNoFor data source plugins. If the cache timeout option should be shown in the query options section in the query editor.
maxDataPointsbooleanNoFor data source plugins. If the max data points option should be shown in the query options section in the query editor.
minIntervalbooleanNoFor data source plugins. If the min interval option should be shown in the query options section in the query editor.

roles​

List of RBAC roles defined by the plugin and their default assignments to basic roles (Viewer, Editor, Admin, Grafana Admin).

Requires Grafana version 9.4.0 or later. Currently, this is behind the accessControlOnCall feature toggle.

Properties​

PropertyTypeRequiredDescription
roleobjectYesRBAC role definition to group related RBAC permissions on the plugin.
grantstring[]NoDefault assignments of the role to Grafana basic roles (Viewer, Editor, Admin, Grafana Admin)

role​

A role groups your plugin's related RBAC permissions (ex: Projects Admin would group permissions to create, read, write and delete projects). The RBAC actions defined in your role must start with your plugin id (ex: grafana-test-app.projects:read).

PropertyTypeRequiredDescription
namestringYesName of the role.
descriptionstringNoDescribes the aim of the role.
permissionsobject[]NoRBAC permission on the plugin.

routes​

For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to Authentication for data source plugins.

Properties​

PropertyTypeRequiredDescription
bodyobjectNoFor data source plugins. Route headers set the body content and length to the proxied request.
headersarrayNoFor data source plugins. Route headers adds HTTP headers to the proxied request.
jwtTokenAuthobjectNoFor data source plugins. Token authentication section used with an JWT OAuth API.
methodstringNoFor data source plugins. Route method matches the HTTP verb like GET or POST. Multiple methods can be provided as a comma-separated list.
pathstringNoFor data source plugins. The route path that is replaced by the route URL field when proxying the call.
reqActionstringNoThe RBAC action a user must have to use this route. Warning: unless the action targets the plugin (or a nested datasource plugin), only the action is verified, not what it applies to.
reqRolestringNo
reqSignedInbooleanNo
tokenAuthobjectNoFor data source plugins. Token authentication section used with an OAuth API.
urlstringNoFor data source plugins. Route URL is where the request is proxied to.

body​

For data source plugins. Route headers set the body content and length to the proxied request.

PropertyTypeRequiredDescription

jwtTokenAuth​

For data source plugins. Token authentication section used with an JWT OAuth API.

Properties​

PropertyTypeRequiredDescription
paramsobjectNoParameters for the JWT token authentication request.
scopesstring[]NoThe list of scopes that your application should be granted access to.
urlstringNoURL to fetch the JWT token.

params​

Parameters for the JWT token authentication request.

Properties​
PropertyTypeRequiredDescription
client_emailstringNo
private_keystringNo
token_uristringNo

tokenAuth​

For data source plugins. Token authentication section used with an OAuth API.

Properties​

PropertyTypeRequiredDescription
paramsobjectNoParameters for the token authentication request.
scopesstring[]NoThe list of scopes that your application should be granted access to.
urlstringNoURL to fetch the authentication token.

params​

Parameters for the token authentication request.

Properties​
PropertyTypeRequiredDescription
client_idstringNoOAuth client ID
client_secretstringNoOAuth client secret. Usually populated by decrypting the secret from the SecureJson blob.
grant_typestringNoOAuth grant type
resourcestringNoOAuth resource

extensions​

Extensions specific metadata.

Properties​

PropertyTypeRequiredDescription
addedComponentsobjectOnly if your plugin has component extensionsThe list of component extensions added by your plugin.
addedLinksobjectOnly if your plugin has link extensinosThe list of link extensions added by your plugin.
exposedComponentsobjectOnly if your plugin exposes componentsThe list of components exposed by your plugin.
extensionPointsobjectOnly if your plugin defines extension pointsThe list of extension points defined by your plugin.

addedComponents​

This list must contain all component extensions that your plugin registers to other extension points using .addComponent(). Components that are not listed here won't work.

Properties​

PropertyTypeRequiredDescription
targetsstring[]YesThe extension point ids your plugin registers the extension to, e.g. ["grafana/user/profile/tab"]
titlestringYesThe title of your component extension.
descriptionstringNoAn optional description of your component extensions.

This list must contain all link extensions that your plugin registers to other extension points using .addLink(). Links that are not listed here won't work.

Properties​

PropertyTypeRequiredDescription
targetsstring[]YesThe extension point ids your plugin registers the extension to, e.g. ["grafana/dashboard/panel/menu"]
titlestringYesThe title of your link extension.
descriptionstringNoAn optional description of your link extensions.

exposedComponents​

This list must contain all components that your plugin exposes using .exposeComponent(). Components that are not listed here won't work.

Properties​

PropertyTypeRequiredDescription
idstringYesA unique id for your exposed component prefixed with the plugin id. It is recommended to add a version suffix to prevent future breaking changes. E.g.: myorg-extensions-app/exposed-component/v1
titlestringNoThe title of your exposed component.
descriptionstringNoAn optional description of your exposed component.

extensionPoints​

This list must contain all extension points that your plugin defines using usePluginLinks() or usePluginComponents(). Extension points that are not listed in here won't work.

Properties​

PropertyTypeRequiredDescription
idstringYesA unique id for your extension point prefixed with the plugin id. It is recommended to add a version suffix to prevent future breaking changes. E.g.: myorg-extensions-app/extension-point/v1
titlestringNoThe title of your extension point.
descriptionstringNoAn optional description of your extension point.