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

NameTypeDescriptionRequired
idstringUnique name of the plugin. If the plugin is published on grafana.com, then the plugin id has to follow the naming conventions.
Pattern: ^[0-9a-z]+\-([0-9a-z]+\-)?(app|panel|datasource)$
✅
typestringPlugin type.
Enum: "app", "datasource", "panel", "renderer"
✅
infoobjectMetadata for the plugin. Some fields are used on the plugins page in Grafana and others on grafana.com if the plugin is published.
✅
namestringHuman-readable name of the plugin that is shown to the user in the UI.
✅
dependenciesobjectDependency information related to Grafana and other plugins.
✅
$schemastringSchema definition for the plugin.json file. Used primarily for schema validation.
alertingbooleanFor data source plugins, if the plugin supports alerting. Requires backend to be set to true.
annotationsbooleanFor data source plugins, if the plugin supports annotation queries.
autoEnabledbooleanSet to true for app plugins that should be enabled and pinned to the navigation bar in all orgs.
backendbooleanIf the plugin has a backend component.
buildModestringThe build mode of the plugin. This field is set automatically at build time, so it should not be provided manually.
builtInboolean[internal only] Indicates whether the plugin is developed and shipped as part of Grafana. Also known as a 'core plugin'.
categorystringPlugin category used on the Add data source page.
Enum: "tsdb", "logging", "cloud", "tracing", "profiling", "sql", "enterprise", "iot", "other"
enterpriseFeaturesobjectGrafana Enterprise specific features
executablestringThe 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.
hideFromListboolean[internal only] Excludes the plugin from listings in Grafana's UI. Only allowed for builtIn plugins.
includesobject[]Resources to include in plugin.
logsbooleanFor data source plugins, if the plugin supports logs. It may be used to filter logs only features.
metricsbooleanFor data source plugins, if the plugin supports metric queries. Used to enable the plugin in the panel editor.
multiValueFilterOperatorsbooleanFor data source plugins, if the plugin supports multi value operators in adhoc filters.
pascalNamestring[internal only] The PascalCase name for the plugin. Used for creating machine-friendly identifiers, typically in code generation. If not provided, defaults to name, but title-cased and sanitized (only alphabetical characters allowed).
Pattern: ^([A-Z][a-zA-Z]{1,62})$
preloadbooleanInitialize 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.
queryOptionsobjectFor data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed.
routesobject[]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.
skipDataQuerybooleanFor panel plugins. Hides the query editor.
statestringMarks a plugin as a pre-release.
Enum: "alpha", "beta"
streamingbooleanFor data source plugins, if the plugin supports streaming. Used in Explore to start live streaming.
tracingbooleanFor data source plugins, if the plugin supports tracing. Used for example to link logs (e.g. Loki logs) with tracing plugins.
iamobjectGrafana 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 guide.
rolesobject[]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.
extensionsobjectPlugin extensions are a way to extend either the UI of core Grafana or other plugins.

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

NameTypeDescriptionRequired
authorobjectInformation about the plugin author.
buildobjectBuild information
descriptionstringDescription of plugin. Used on the plugins page in Grafana and for search on grafana.com.
keywordsstring[]Array of plugin keywords. Used for search on grafana.com.
✅
linksobject[]An array of link objects to be displayed on this plugin's project page in the form {name: 'foo', url: 'http://example.com'}
logosobjectSVG images that are used as plugin icons.
✅
screenshotsobject[]An array of screenshot objects in the form {name: 'bar', path: 'img/screenshot.png'}
updatedstringDate when this plugin was built.
Pattern: ^(\d{4}-\d{2}-\d{2}|\%TODAY\%)$
✅
versionstringSemVer version of this commit, e.g. 6.7.1.
Pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)|(\%VERSION\%)$
✅

info.author​

Information about the plugin author.

Properties

NameTypeDescriptionRequired
namestringAuthor's name.
emailstringAuthor's name.
Format: "email"
urlstringLink to author's website.
Format: "uri"

info.build​

Build information

Properties

NameTypeDescriptionRequired
timenumberTime when the plugin was built, as a Unix timestamp.
repostring
branchstringGit branch the plugin was built from.
hashstringGit hash of the commit the plugin was built from
numbernumber
prnumberGitHub pull request the plugin was built from
buildnumberBuild job number used to build this plugin.

info.keywords[]​

Array of plugin keywords. Used for search on grafana.com.

Items

Item Type: string
Minimum Items: 1

An array of link objects to be displayed on this plugin's project page in the form {name: 'foo', url: 'http://example.com'}

Items

Item Properties

NameTypeDescriptionRequired
namestringDisplay name of the link. Special names with predefined behavior:
• documentation - sets Documentation link on plugins detail page
• repository - used to determine and link to repository of the plugin
• license - sets License link on plugins detail page
• raise issue - sets Raise an Issue link on plugins detail page
• sponsorship - sets Sponsor this developer link on plugins detail page to direct users to how they can support your work
urlstringURL value to use for this specific link.
Format: "uri"

info.logos​

SVG images that are used as plugin icons.

Properties

NameTypeDescriptionRequired
smallstringLink to the "small" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image.
✅
largestringLink to the "large" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image.
✅

info.screenshots[]​

An array of screenshot objects in the form {name: 'bar', path: 'img/screenshot.png'}

Items

Item Properties

NameTypeDescriptionRequired
namestring
pathstring

dependencies​

Dependency information related to Grafana and other plugins.

Properties

NameTypeDescriptionRequired
grafanaVersionstring(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.
Pattern: ^([0-9]+)(\.[0-9x]+)?(\.[0-9x])?$
grafanaDependencystringRequired Grafana version for this plugin. Validated using https://github.com/npm/node-semver.
Pattern: ^(<=|>=|<|>|=|~|\^)?([0-9]+)(\.[0-9x\*]+)?(\.[0-9x\*]+)?(\s(<=|>=|<|=>)?([0-9]+)(\.[0-9x\*]+)?(\.[0-9x\*]+)?)?$
✅
pluginsobject[]An array of required plugins on which this plugin depends. Only non-core (that is, external plugins) have to be specified in this list.
extensionsobjectPlugin extensions that this plugin depends on.

dependencies.plugins[]​

An array of required plugins on which this plugin depends. Only non-core (that is, external plugins) have to be specified in this list.

Items

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

Item Properties

NameTypeDescriptionRequired
idstringPattern: ^[0-9a-z]+\-([0-9a-z]+\-)?(app|panel|datasource)$
✅
typestringEnum: "app", "datasource", "panel"
✅
namestring✅

dependencies.extensions​

Plugin extensions that this plugin depends on.

Properties

NameTypeDescriptionRequired
exposedComponentsstring[]An array of exposed component ids that this plugin depends on.

dependencies.extensions.exposedComponents[]​

An array of exposed component ids that this plugin depends on.

Items

Item Type: string

enterpriseFeatures​

Grafana Enterprise specific features

Properties

NameTypeDescriptionRequired
healthDiagnosticsErrorsbooleanEnable/Disable health diagnostics errors. Requires Grafana >=7.5.5.
Default: false

includes[]​

Resources to include in plugin.

Items

Item Properties

NameTypeDescriptionRequired
uidstringUnique identifier of the included resource
typestringEnum: "dashboard", "page", "panel", "datasource"
namestring
componentstring(Legacy) The Angular component to use for a page.
rolestringThe minimum role a user must have to see this page in the navigation menu.
Enum: "Admin", "Editor", "Viewer"
actionstringThe 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.
pathstringUsed for app plugins.
addToNavbooleanAdd the include to the navigation menu.
defaultNavbooleanPage or dashboard when user clicks the icon in the side menu.
iconstringIcon to use in the side menu. For information on available icon, refer to Icons Overview.

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

NameTypeDescriptionRequired
maxDataPointsbooleanFor data source plugins. If the max data points option should be shown in the query options section in the query editor.
minIntervalbooleanFor data source plugins. If the min interval option should be shown in the query options section in the query editor.
cacheTimeoutbooleanFor data source plugins. If the cache timeout option should be shown in the query options section in the query editor.

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.

Items

Item Properties

NameTypeDescriptionRequired
pathstringFor data source plugins. The route path that is replaced by the route URL field when proxying the call.
methodstringFor data source plugins. Route method matches the HTTP verb like GET or POST. Multiple methods can be provided as a comma-separated list.
urlstringFor data source plugins. Route URL is where the request is proxied to.
reqSignedInboolean
reqRolestring
reqActionstringThe 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.
headersarrayFor data source plugins. Route headers adds HTTP headers to the proxied request.
bodyobjectFor data source plugins. Route headers set the body content and length to the proxied request.
tokenAuthobjectFor data source plugins. Token authentication section used with an OAuth API.
jwtTokenAuthobjectFor data source plugins. Token authentication section used with an JWT OAuth API.
urlParamsobject[]Add URL parameters to a proxy route

routes[].headers[]​

For data source plugins. Route headers adds HTTP headers to the proxied request.

routes[].body​

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

routes[].tokenAuth​

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

Properties

NameTypeDescriptionRequired
urlstringURL to fetch the authentication token.
scopesstring[]The list of scopes that your application should be granted access to.
paramsobjectParameters for the token authentication request.

routes[].tokenAuth.scopes[]​

The list of scopes that your application should be granted access to.

Items

Item Type: string

routes[].tokenAuth.params​

Parameters for the token authentication request.

Properties

NameTypeDescriptionRequired
grant_typestringOAuth grant type
client_idstringOAuth client ID
client_secretstringOAuth client secret. Usually populated by decrypting the secret from the SecureJson blob.
resourcestringOAuth resource

routes[].jwtTokenAuth​

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

Properties

NameTypeDescriptionRequired
urlstringURL to fetch the JWT token.
Format: "uri"
scopesstring[]The list of scopes that your application should be granted access to.
paramsobjectParameters for the JWT token authentication request.

routes[].jwtTokenAuth.scopes[]​

The list of scopes that your application should be granted access to.

Items

Item Type: string

routes[].jwtTokenAuth.params​

Parameters for the JWT token authentication request.

Properties

NameTypeDescriptionRequired
token_uristring
client_emailstring
private_keystring

routes[].urlParams[]​

Add URL parameters to a proxy route

Items

Item Properties

NameTypeDescriptionRequired
namestringName of the URL parameter
contentstringValue of the URL parameter

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 guide.

Properties

NameTypeDescriptionRequired
permissionsobject[]Permissions are the permissions that the plugin needs its associated service account to have to query Grafana.

iam.permissions[]​

Permissions are the permissions that the plugin needs its associated service account to have to query Grafana.

Items

Item Properties

NameTypeDescriptionRequired
actionstringAction, for example: teams:read.
scopestringThe scope that the plugin needs to access e.g: teams:*.

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.

Items

Item Properties

NameTypeDescriptionRequired
roleobjectA 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).
grantsstring[]Default assignments of the role to Grafana basic roles (Viewer, Editor, Admin, Grafana Admin).

roles[].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).

Properties

NameTypeDescriptionRequired
namestringDisplay name of the role.
descriptionstringDescribes the aim of the role.
permissionsobject[]RBAC permission on the plugin.

roles[].role.permissions[]​

RBAC permission on the plugin.

Items

Item Properties

NameTypeDescriptionRequired
actionstring
scopestring

roles[].grants[]​

Default assignments of the role to Grafana basic roles (Viewer, Editor, Admin, Grafana Admin).

Items

Item Type: string

extensions​

Plugin extensions are a way to extend either the UI of core Grafana or other plugins.

Properties

NameTypeDescriptionRequired
addedComponentsobject[]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.
addedLinksobject[]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.
exposedComponentsobject[]This list must contain all components that your plugin exposes using .exposeComponent(). Components that are not listed here won't work.
extensionPointsobject[]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.

extensions.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.

Items

Item Properties

NameTypeDescriptionRequired
targetsstring[]The extension point ids your plugin registers the extension to, e.g. ["grafana/user/profile/tab"]
✅
titlestringThe title of your component extension.
Minimal Length: 10
✅
descriptionstringAdditional information about your component extension.

extensions.addedComponents[].targets[]​

The extension point ids your plugin registers the extension to, e.g. ["grafana/user/profile/tab"]

Items

Item Type: string

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.

Items

Item Properties

NameTypeDescriptionRequired
targetsstring[]The extension point ids your plugin registers the extension to, e.g. ["grafana/dashboard/panel/menu"]
✅
titlestringThe title of your link extension.
Minimal Length: 10
✅
descriptionstringAdditional information about your link extension.

extensions.addedLinks[].targets[]​

The extension point ids your plugin registers the extension to, e.g. ["grafana/dashboard/panel/menu"]

Items

Item Type: string

extensions.exposedComponents[]​

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

Items

Item Properties

NameTypeDescriptionRequired
idstringA unique identifier for your exposed component. This is used to reference the component in other plugins. It must be in the following format: {PLUGIN_ID}/name-of-component/v1. It is recommended to add a version suffix to prevent future breaking changes. E.g.: myorg-extensions-app/exposed-component/v1.
Pattern: ^[0-9a-z]+-([0-9a-z]+-)?(app|panel|datasource)\/[a-zA-Z0-9_-]+\/v[0-9_.-]+$
✅
titlestringThe title of your exposed component.
descriptionstringAdditional information about your exposed component.

extensions.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.

Items

Item Properties

NameTypeDescriptionRequired
idstringA unique identifier for your extension point. This is used to reference the extension point in other plugins. It must be in the following format: {PLUGIN_ID}/name-of-my-extension-point/v1. It is recommended to add a version suffix to prevent future breaking changes. E.g.: myorg-extensions-app/extension-point/v1.
Pattern: ^[0-9a-z]+-([0-9a-z]+-)?(app|panel|datasource)\/[a-zA-Z0-9_-]+\/v[0-9_.-]+$
✅
titlestringThe title of your extension point.
descriptionstringAdditional information about your extension point.