RousselTMLEARNING

Observability

Observa's AI connectors, root cause analysis and MCP server

Connect Observa to the AI models of your choice (Claude, OpenAI, Azure OpenAI, Gemini, Mistral or in-house model), use the assistant and root cause analysis, and plug AI agents such as Claude Code into the MCP server, safely.

1. AI connectors #

Your models, with your permissions.

Observa ships no AI #

Observa contains no artificial intelligence model. It provides connection modules to the models you choose: your company's models hosted in-house, or public models. With no provider configured, AI features stay disabled and no data is sent.

Connectable models
The model you pick decides where data excerpts go.
ProviderModelsWhere data goes
AnthropicClaude (claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5)Anthropic API
OpenAIChatGPT (gpt-4o by default)OpenAI API
Azure OpenAIyour deployment nameyour Azure tenant, chosen region
OpenAI-compatible (public)Gemini, Mistral AI, Grok (xAI), DeepSeekprovider's API (DeepSeek: outside the EU)
OpenAI-compatible (in-house)Ollama, vLLM, LocalAI, LM Studio, LiteLLMyour infrastructure, nothing leaves

Configuring the AI account #

Like the Grafana LLM plugin, the account is configured in the interface, Administration › AI tab: global switch, provider, API URL (optional, or a corporate gateway URL), API key (encrypted in the database, never sent back to the browser), model (list offered after a successful connection test), effort and step count, enabled features, minimum role and organization guidelines. The Test connection button shows latency without saving.

FeatureUse
Conversational assistant✨ button: natural-language questions about your data
Contextual analysispanels (⋮ menu → Analyse with AI), status summary
Dashboard and alert creationfrom a description
Root cause analysison an alert, an incident, a service
Common mistake : A consumer subscription (ChatGPT Plus, Claude Pro, Gemini Advanced, Le Chat Pro, SuperGrok) gives access to chat apps, not to the API. The API is paid separately, by usage, from the provider's developer console: create a key dedicated to Observa and set a monthly spending limit.
Good to know : The Restrict AI queries to the user's rights option is checked by default: queried data is filtered by the multi-tenant scope and permissions of the person asking. Unchecked, the AI queries sources with the service's rights: keep that for single-team instances.

The assistant and its tools #

Once a model is connected, the ✨ button opens an assistant that queries your sources, summarizes alerts, creates dashboards and rules in natural language. It acts on behalf of the user: the API applies their permissions to every action, and every action is audited. Pick a model that supports tool calling.

ToolUse
list_datasources · search_metricsfind the right source and metrics
query_datasourcerun a query and read the result
list_dashboards · create_dashboardfind or create a dashboard
list_alert_rules · list_active_alerts · create_alert_ruleanalyse and write alerts
list_otel_servicesdiscover OpenTelemetry services

Enforcing the configuration #

Environment variables are optional: set on the ai service (or the API), they enforce the value and lock the field in the interface. With Helm: ai.provider, ai.model, ai.baseUrl, ai.allowedRole, aiService.maxSteps and the secrets.aiApiKey secret.

AI_ENABLED=true
AI_PROVIDER=anthropic            # anthropic | openai | azure_openai | openai_compatible
AI_API_KEY=<key>
AI_MODEL=claude-opus-5-5
AI_MAX_STEPS=12
AI_ALLOWED_ROLE=Editor

# Local model (Ollama, vLLM…): OpenAI-compatible API
# AI_PROVIDER=openai_compatible
# AI_BASE_URL=http://ollama:11434/v1
# AI_MODEL=llama3.1
Best practice : For sensitive data, an in-house model behind an OpenAI-compatible API (or Azure OpenAI in your tenant) keeps everything inside your IT; the URL must be reachable from the ai container or pod, not just from your workstation. Restrict the assistant to a role (AI_ALLOWED_ROLE) and cap the number of steps (AI_MAX_STEPS) to control cost and duration.

Root cause analysis #

When the feature is enabled, a Root cause (AI) button appears on active alerts, incidents, a service panel in the service map and a service page in the entity catalog. The analysis runs in two stages.

Root cause analysis
The evidence stays displayed next to the conclusion so the reasoning can be checked.
  1. Deterministic evidence collection, without AI and read-only, over the alert period compared with a reference period: related alerts, service RED metrics, upstream and downstream dependencies, recent version change, pod restarts and OOM kills, error patterns in logs (Loki), failed traces (Tempo).
  2. Analysis by your model: it receives the evidence, may run extra read-only queries and returns a structured answer: likely cause with a confidence level, recommended actions, ruled-out hypotheses, cited evidence and timeline.

Each analysis is recorded in the audit log (ai.rca) and respects the isolation option. It is also available through the API: POST /api/ai/rca with {"service", "labels", "title", "from", "to"} (dates in milliseconds).

Privacy : Summaries of queried data go to the configured AI provider. Prefer an enterprise offering without data reuse, Azure OpenAI in your tenant, or a self-hosted model if your data must not leave your infrastructure.

2. The MCP server #

Connecting Claude and other agents.

The principle #

AI agent, MCP server and audit
Read, Editor-only write, and logging of every call. · Illustration: Observa documentation

Observa ships a Model Context Protocol server on POST /api/mcp (Streamable HTTP transport, JSON-RPC 2.0). An agent (Claude Code, Claude Desktop, or any MCP client) connects with an obs_… service account token and inherits exactly its rights.

MCP tools
A Viewer token is enough for analysis; keep Editor for agents that must act.

Connecting an agent #

claude mcp add --transport http observa https://observa.example.com/api/mcp \
  --header "Authorization: Bearer obs_xxxxxxxx"
{
  "mcpServers": {
    "observa": {
      "type": "http",
      "url": "https://observa.example.com/api/mcp",
      "headers": { "Authorization": "Bearer obs_xxxxxxxx" }
    }
  }
}

Then, in natural language: “Which critical alerts are firing on checkout, and who is on call?”, “Show the checkout error rate over the last hour”.

Testing by hand #

OBS=https://observa.example.com; TOKEN=obs_xxxxxxxx
H=(-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream')
curl -s "${H[@]}" $OBS/api/mcp -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'
curl -s "${H[@]}" $OBS/api/mcp -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
curl -s "${H[@]}" $OBS/api/mcp -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_datasources","arguments":{}}}'
Good to know : If the initialize response contains an Mcp-Session-Id header, send it back on the following requests; responses may come as JSON or as an event stream (text/event-stream).

Security #

  • One service account per agent, named, with the minimal role.
  • A multi-tenant scope on that account if the agent must see only one customer.
  • Regular review of the audit log (mcp.tool) and revocation of unused tokens.
  • Never a token in a Git repository or a shared configuration file.
Watch out : An agent with an Editor token can silence alerts: a misunderstood prompt (or an injection in content read by the agent) would be enough to hide an outage. Keep that right for supervised uses.

Sources #

Related articles

Discovering Observa: the self-hosted observability console

What Observa is, what it adds to Grafana OSS, its five-service architecture, its parity with Grafana Cloud, i…

Installing Observa: Docker Compose, Kubernetes and configuration

Deploy Observa in two minutes with Docker Compose, in production on Kubernetes with Helm, then configure it: …

Securing Observa: authentication, roles, multi-tenancy and branding

Configure access to Observa: local accounts, LDAP and Active Directory, OIDC, SAML, auth proxy, roles and per…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!