1. Connecting to existing sources #
UI, provisioning, network security.
Declaring a source #
Two ways: the Connections → Data sources menu (forms generated by each plugin, Test button) or a YAML file dropped in deploy/provisioning/datasources/ (provisioning.datasources with Helm). Provisioning is the right choice in production: sources are versioned and recreated identically.
apiVersion: 1
datasources:
- name: Mimir
uid: prometheus
type: prometheus
url: https://mimir.example.com/prometheus
isDefault: true
jsonData:
httpHeaderName1: X-Scope-OrgID
secureJsonData:
httpHeaderValue1: "${MIMIR_TENANT}"
bearerToken: "${MIMIR_TOKEN}"Best practice : Keep theprometheusuid for the main Prometheus source: the OpenTelemetry dashboards shipped inexamples/provisioning/dashboards/assume it.
Authentication and network #
| Need | Answer |
|---|---|
| Authentication | Basic, Bearer, API key, custom header (X-Scope-OrgID for multi-tenant Mimir, Loki, Tempo), SQL accounts |
| Internal PKI | CA per source (PEM field) or global OBSERVA_CA_BUNDLE mounted from OBSERVA_CERTS_DIR |
| mTLS | client certificate and key per source, key encrypted at rest |
| Outbound proxy | HTTPS_PROXY / NO_PROXY or per-source proxy |
| Secrets | encrypted in the database, never sent back to the browser, ${VAR} substitution in provisioning |
Good to know : With Docker Compose, host.docker.internal points to the host: handy to reach a Prometheus started outside the Observa stack.Querying a REST API with UQL #
The Infinity plugin queries any JSON API. UQL, Observa's language, chains steps the KQL way:
parse-json
| scope "data.items"
| extend "charge"=tonumber("metrics.cpu")
| where "charge" > 50 and "env" == 'prod'
| summarize "moyenne"=avg("charge"), "n"=count() by "dc"
| order by "moyenne" descMy progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Grafana provisioning: automate the management of your dashboards and data sources
Learn how to use Grafana provisioning to manage your configuration (dashboards, data sources, not...
Securing Observa: authentication, roles and multi-tenancy
Configure access to Observa: local accounts, LDAP and Active Directory, OIDC, SAML, auth proxy, r...
Data sources in Grafana: connect and unify your data
Learn how to extend Grafana's capabilities with data sources. Discover essential plugins such as ...
OpenTelemetry Collector, Grafana Alloy and Bindplane: comparing three approaches to telemetry pipelines
Detailed comparison of three ways to manage telemetry pipelines: the OpenTelemetry Collector in Y...
Grafana Alloy: collecting and transforming telemetry
Learn how to use Grafana Alloy to collect, transform and route logs, metrics and traces. Discover...
Alerting in Observa: rules, notifications, built-in alerts, SLA and Sigma
Write alert rules in Prometheus format, route notifications in Alertmanager format, enable the 1,...
Grafana Alloy best practices: optimizing your telemetry collection
Discover the golden rules for configuring Grafana Alloy robustly: modularity, secrets management,...
Dashboards, Explore and Drilldown in Observa
Build Grafana v2 dashboards in Observa: visualizations, variables, transformations, import from g...
Fleet Management in Grafana Cloud
Fleet Management in Grafana Cloud: remotely managing a fleet of Grafana Alloy and OpenTelemetry c...