Overview
A client-mode connector for a curated observability / ITSM slice of the Grafana HTTP API:
Default
BASE_ADDRESS is https://grafana.example.com (replace with your OSS / Enterprise host or Grafana Cloud stack URL). Topics use itsm/grafana/<object>/<verb>.
Self-hosted and Grafana Cloud share the same
/api/… path layout. Cloud stacks use a host like https://<stack>.grafana.net. Do not put a trailing slash on BASE_ADDRESS.Prefer Hub secrets for the service account token. Create annotation (write) needs a token with
annotations:create. Public play.grafana.org allows anonymous health and many reads, but POST annotations returned 403 without permissions — not a substitute for your own lab token. Status remains blocked until an authenticated create (or owned-instance smoke) succeeds.Basic Syntax
Events
Auth
Service account token (preferred):- Create a Grafana service account and token with roles covering annotation create/read, folder/dashboard search, and alerting read as needed.
- Set connector
BASE_ADDRESSto your Grafana host (no trailing slash). - Pass
tokenon the MQTT request payload so headers resolve:Authorization: Bearer {value.json.token}
- Store the token in Hub secrets /
GET SECRET "GRAFANA_TOKEN". Never commit real credentials.
- Use a Grafana user (or service account) password / token.
- Configure
WITH USERNAME/WITH PASSWORD GET SECRET "GRAFANA_PASSWORD"and remove Bearer headers from the events.
/api/health publicly.
Example payloads
Health:Deploy notes
- Deploy
GrafanaRestApi.lotonly (-addRoute). Do not deployhub-metadata.lotas a connector — it exists for Hub /-listTemplates(ADD METADATA+WITH IMAGEbase64). - Hub category: REST API Connectors.
- Doc link: https://docs.coreflux.org/latest/lot-language/routes/rest-api-apps/grafana

