InTouch Hub · Blue Isle Software

Grafana

Manage dashboards, data sources, and alerts on a Grafana instance via the HTTP API.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

alertdeveloper-devopssearch

Grafana

Interact with a Grafana instance via its HTTP API. Search dashboards, retrieve dashboard details, list data sources, and list provisioned alert rules.

Operations

Operation Description Key Inputs
search-dashboards Search dashboards by title (returns up to 100 results) query (optional title filter)
get-dashboard Retrieve full dashboard JSON by UID dashboardUid (required)
list-datasources List all configured data sources
list-alert-rules List all provisioned alert rules (Grafana 9+)

API Key Setup

  1. In Grafana, go to Administration > Users and access > Service Accounts.
  2. Create a service account with the Viewer role (or Editor if you need write access in future).
  3. Click Add service account token and copy the generated token.
  4. Pass the token as apiKey in the tool input.

Authentication uses Authorization: Bearer <token> as documented at https://grafana.com/docs/grafana/latest/developers/http_api/auth/.

Examples

Search for dashboards containing "nginx":

{
  "apiKey": "glsa_xxxx",
  "grafanaUrl": "http://grafana.example.com:3000",
  "operation": "search-dashboards",
  "query": "nginx"
}

Get a specific dashboard:

{
  "apiKey": "glsa_xxxx",
  "grafanaUrl": "http://grafana.example.com:3000",
  "operation": "get-dashboard",
  "dashboardUid": "abc123def"
}

List all data sources:

{
  "apiKey": "glsa_xxxx",
  "grafanaUrl": "http://grafana.example.com:3000",
  "operation": "list-datasources"
}

List alert rules:

{
  "apiKey": "glsa_xxxx",
  "grafanaUrl": "http://grafana.example.com:3000",
  "operation": "list-alert-rules"
}

Notes

Publishes

The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.

Input Properties

Every property this tool accepts, from its own tool.iml.

Property Type Required Default Description
apiKey string yes Grafana service account token (Bearer token). Create one under Administration > Users and access > Service Accounts.
grafanaUrl string yes Base URL of the Grafana instance, e.g. http://localhost:3000 (no trailing slash).
operation string yes One of: search-dashboards, get-dashboard, list-datasources, list-alert-rules
query string no Title search string for search-dashboards operation.
dashboardUid string no Dashboard UID for get-dashboard operation.