Skip to main content

Grafana Data Source

Type ID: grafanaDataSource  ·  Kind: Action  ·  Ports: 1 in, 1 out

Configure, health-check, and list Grafana data source connections.

Credentials​

Grafana (Service Account Token)

{
"credentials": {
"name": "grafana",
"id": "<credential-id>"
}
}

Resources & operations​

  • Data Source (datasource)
    • Configure (configure) - Create or update a data source connection (provisions Grafana to talk to another backend)
    • Health Check (healthCheck) - Verify a configured data source is reachable
    • List (list) - List configured data sources

For agent integrations (name: 'grafanaDataSource' in permissions.integrations), grant '*', a resource key, or an operation key — see Tools and Permissions:

Resource key (<resource>)Operation keys (<resource>.<operation>)
datasourcedatasource.configure, datasource.healthCheck, datasource.list

Properties​

Common​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
ResourceresourceoptionsYesdatasourceData Source (datasource)-
OperationoperationoptionsYesconfigureConfigure (configure), Health Check (healthCheck), List (list)resource = datasource

Data Source → Configure​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
Existing Data Source UIDuidstringNo''UID of an existing data source to update. Leave empty to create a new data source.resource = datasource, operation = configure
NamenamestringYes''Display name for the data source connectionresource = datasource, operation = configure
TypetypestringYes''Grafana data source plugin type, for example prometheus, postgres, mysql, elasticsearch, lokiresource = datasource, operation = configure
URLurlstringYes''Base URL of the backend this data source connects to, e.g. the target Prometheus or Postgres hostresource = datasource, operation = configure
Access ModeaccessoptionsNoproxyServer (Proxy) (proxy), Browser (Direct) (direct)resource = datasource, operation = configure
Basic AuthbasicAuthbooleanNofalseEnable HTTP Basic Auth when connecting to the backend data sourceresource = datasource, operation = configure
Basic Auth UserbasicAuthUserstringNo''Username for Basic Auth against the backend data sourceresource = datasource, operation = configure, basicAuth = true
Basic Auth PasswordbasicAuthPasswordstringNo''Password for Basic Auth against the backend data source. Stored encrypted by Grafana as secureJsonData.resource = datasource, operation = configure, basicAuth = true
JSON DatajsonDatajsonNo{}Non-secret, data-source-type-specific configuration, for example { "httpMethod": "POST", "sslmode": "require" }resource = datasource, operation = configure
Secure JSON DatasecureJsonDatajsonNo{}Secret, data-source-type-specific fields sent once and stored encrypted by Grafana, for example { "password": "...", "apiKey": "..." }. Never returned by Grafana on reads.resource = datasource, operation = configure

Data Source → Health Check​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
Data Source UIDuidstringYes''UID of the data source to health-checkresource = datasource, operation = healthCheck

Data Source → List​

(No additional properties)

Notes​

  • Configure output: { id, uid, name, message, raw }.
  • Health Check output: { status, message, raw }.
  • List output: { datasources, count }.