Skip to main content

Datasources

A Grafana-style datasource management page for integrating external monitoring and observability systems with AWSops.

Datasources

Overview​

The AWSops Datasources feature provides centralized management of external observability platforms. Once a datasource is registered, you can execute queries from the dashboard or let the AI assistant use it for analysis.

Key features:

  • 8 datasource types supported (Prometheus, Mimir, Loki, Tempo, ClickHouse, Jaeger, Dynatrace, Datadog)
  • CRUD management: Add, edit, delete datasources (admin only)
  • Connection test: One-click connectivity verification with latency measurement
  • Query execution: Native query language support for each datasource type
  • Security: SSRF prevention, credential masking

Supported Datasources​

DatasourceQuery LanguageDefault PortKey Features
PrometheusPromQL9090Metrics collection, alerting, time-series data
MimirPromQL9009Long-term metrics storage, multi-tenant (X-Scope-OrgID)
LokiLogQL3100Log aggregation, label-based search
TempoTraceQL3200Distributed tracing, span search
ClickHouseSQL8123Columnar analytics, large-scale data processing
JaegerTrace ID16686Distributed tracing, service dependencies
DynatraceDQL443Full-stack monitoring, AI-powered analysis
DatadogQuery443Infrastructure monitoring, APM, logs

Adding Datasources​

:::info Admin Only Creating, editing, and deleting datasources requires an admin role. In v2, admins are determined by the Cognito admin group or the SSM email allowlist (v1's data/config.json adminEmails model is retired). :::

Configuration Fields​

FieldRequiredDescription
NameYesDatasource display name
TypeYesDatasource type (select from 8 types)
URLYesEndpoint URL (e.g., http://prometheus:9090)
AuthenticationNoAuth method (None, Basic, Bearer Token, Custom Header)
TimeoutNoStored range 1–60 seconds (default 10), effective maximum 55s (56–60 is shortened to 55). Prometheus/Mimir/ClickHouse apply it as the server execution limit on every path and align the connector HTTP timeout above it. Explore further caps Prometheus/Mimir queries at 10s. Other kinds (Loki/Tempo/Jaeger/Dynatrace/Datadog) apply it as the HTTP response limit of their query tools (default 12s); it does not guarantee server-side cancellation. Schema/discovery calls keep the connector's fixed HTTP budget
DatabaseNoDefault database name (ClickHouse only, identifier-only)

:::note Difference from v1 v1's result-cache TTL setting does not exist in v2 — the v2 query path is deliberately uncached (thin-BFF; a result cache would need its own staleness disclosure). The Timeout unit also changed from v1's ms to seconds (1–60). :::

Steps​

  1. Click Add Datasource on the Datasources page
  2. Select the datasource type
  3. Enter name, URL, and authentication details
  4. Click Test Connection to verify connectivity
  5. Click Save to store the configuration

Connection Test​

Clicking Test Connection performs the following checks per datasource type:

DatasourceTest EndpointVerification
Prometheusquery?query=vector(1) (1s server timeout)Query access
Lokiquery_range, 1 min, limit=1Tenant-scoped query access
TempoOne-trace search, 1 minQuery access
ClickHouseSELECT 1, readonly=1, 1s limitRead-only SQL access
Jaeger/api/traces?limit=1, 1 minQuery access
DynatraceMetrics v2 builtin:host.cpu.usage:avg, 1 minMetric-query access
DatadogKey validation (key pair only), then /api/v1/query, 1 minMetric-query access

Test results display success/failure and latency in milliseconds.

Query Execution​

Execute queries directly using each datasource's native query language.

PromQL (Prometheus)​

rate(http_requests_total{job="api-server"}[5m])

Query time-series metric data such as CPU usage, request rates, and error rates.

LogQL (Loki)​

{namespace="production"} |= "error" | json | line_format "{{.message}}"

Label-based log search with pipeline filtering support.

TraceQL (Tempo)​

{span.http.status_code >= 500 && resource.service.name = "api"}

Condition-based distributed trace search.

ClickHouse SQL​

SELECT toStartOfHour(timestamp) AS hour, count() AS events
FROM logs
WHERE timestamp > now() - INTERVAL 24 HOUR
GROUP BY hour
ORDER BY hour

Fast analytical queries over large datasets.

Jaeger​

Search distributed traces by service name or Trace ID.

Dynatrace (DQL)​

fetch logs | filter contains(content, "error") | limit 100

Datadog​

Use metric queries or log search syntax.

Authentication​

Four authentication methods are supported for datasource connections:

Auth MethodDescriptionUse Case
NoneNo authenticationInternal network Prometheus/Loki
BasicUsername/passwordClickHouse, auth-enabled Prometheus
Bearer TokenAPI tokenDynatrace, Datadog, Tempo
Custom HeaderCustom HTTP headerCustom proxies, API gateways

:::tip Credential Masking Stored passwords and tokens are masked in the UI. New values can only be entered during editing. :::

Security​

SSRF Prevention​

The following security checks are applied to datasource URLs:

  • Blocked targets: only metadata (169.254.169.254), loopback, and link-local addresses — private (RFC1918) datasource endpoints are ALLOWED (URLs containing a backslash are rejected to prevent parser-differential abuse)
  • Metadata endpoint blocking: Blocks 169.254.169.254 (EC2 instance metadata) access
  • Link-local address blocking: Blocks the 169.254.x.x range
  • Protocol restriction: Only http:// and https:// are allowed

:::caution SSRF Protection External datasource URLs trigger server-side requests. To prevent SSRF (Server-Side Request Forgery) attacks, access to internal networks is blocked. :::

ClickHouse SQL Injection Prevention​

Dangerous SQL statements (DROP, ALTER, INSERT, UPDATE, DELETE, TRUNCATE, etc.) are blocked when executing ClickHouse queries. Only read-only queries (SELECT) are permitted.

AI Integration​

The AI assistant can leverage registered datasources for analysis.

Example Queries​

  • "Show the CPU usage trend from Prometheus over the last hour"
  • "Search for error logs in the production namespace from Loki"
  • "Aggregate today's events by hour from ClickHouse"

How It Works​

  1. The AI assistant analyzes the question and selects the appropriate datasource
  2. Automatically generates a query matching the datasource type
  3. Provides analysis and insights based on query results

:::tip datasource Route Integration Datasource-related questions are processed through the datasource route. The AI can analyze both Steampipe data and external datasources together. :::

Settings reference​

Common​

SettingDefaultDescription
Timeout10sStored range 1–60 seconds (default 10), effective maximum 55s (56–60 is shortened to 55). Prometheus/Mimir/ClickHouse apply it as the server execution limit on every path and align the connector HTTP timeout above it. Explore further caps Prometheus/Mimir queries at 10s. Other kinds (Loki/Tempo/Jaeger/Dynatrace/Datadog) apply it as the HTTP response limit of their query tools (default 12s); it does not guarantee server-side cancellation. Schema/discovery calls keep the connector's fixed HTTP budget

ClickHouse only​

SettingDefaultDescription
Database(server default)Default database name — identifier-only; system/information_schema are rejected (validated on both the web tier and the connector)

Limits: ClickHouse queries must pass the read-only guard (table functions and SYSTEM blocked), and returned rows are capped at 1,000 (max_result_rows).

Explore Page​

The Explore page lets you execute queries directly against registered datasources and visualize results. It supports AI query generation and multi-series charts.

Key Features​

  • Datasource selection dropdown: Choose which registered datasource to query.
  • Time range presets: Select from 15m, 1h, 6h, 24h, 7d, or 30d to set the query time window.
  • Native query editor: A syntax-highlighted editor tailored to each datasource type (PromQL, LogQL, SQL, etc.).
  • Example query chips: One-click insertion of commonly used queries for each datasource type.
  • Result metadata: After execution, row count, execution time (ms), and query language are displayed at the top.

AI Query Generation​

Enable the AI Assist toggle to write queries in natural language. GPT-6.1 Terra (Claude Sonnet 5.5 fallback on invocation or validation failure) automatically generates a query matching the datasource type and displays an explanation banner.

Example prompts by datasource type:

DatasourceExample Prompt
Prometheus"Top 5 Pods by CPU usage over the last hour"
Loki"Search error-level logs in the production namespace"
ClickHouse"Aggregate event count by hour for today"
Tempo"Find traces with 500 errors"

How to use:

  1. Toggle AI Assist to ON
  2. Describe the data you want in natural language
  3. Press Ctrl+Enter or click the execute button
  4. GPT-6.1 Terra (Claude Sonnet 5.5 fallback on invocation or validation failure) generates a PromQL/LogQL/SQL query
  5. The generated query is displayed along with an explanation banner

:::tip AI Assist Shortcut Use Ctrl+Enter to quickly generate and execute queries. :::

Multi-Series Charts​

Prometheus datasources support visualizing up to 8 series simultaneously.

  • Line/Bar chart toggle: Select the chart type that best fits your data.
  • Custom color palette: Each series is automatically assigned a unique color from an 8-color theme palette.
  • Series count indicator: The number of currently rendered series is displayed below the chart.

:::info Series Limit For performance, Prometheus multi-series charts are limited to a maximum of 8 series. If results exceed 8 series, only the top 8 are displayed. :::

Diagnose with AI​

On the Datasources management tab, each kind's default datasource row shows a Diagnose with AI link (supported kinds: Prometheus, ClickHouse, Loki, Mimir, Tempo). Clicking it opens the AI assistant with a section-pinned diagnostic prompt prefilled (Prometheus/ClickHouse → /observability, Loki/Mimir/Tempo → /monitoring). It is never sent automatically — review and send it yourself, and it starts a fresh conversation. The agent probes the datasource using that connector's query/schema tools.

Allowed Networks​

:::caution v1 documentation This section describes v1's Allowed Networks feature, which does not exist in v2 — private (RFC1918) datasource endpoints are allowed by default; only metadata/loopback/link-local addresses are blocked. :::

Admins can configure an allow list to exempt specific private network addresses from SSRF blocking.

:::info Admin Only The Allowed Networks setting requires an admin role. :::

Supported Patterns​

Pattern TypeExampleDescription
CIDR10.0.0.0/16Allow a specific subnet range
Single IP10.0.1.50Allow a specific IP address
Hostnameprometheus.internalAllow a specific internal hostname

Relationship with SSRF Prevention​

By default, private IP ranges (10.x.x.x, 172.16-31.x.x, 192.168.x.x) are blocked to prevent SSRF attacks. Addresses registered in Allowed Networks are treated as exceptions to this blocking rule, enabling safe access to datasources located in internal networks.

:::caution Security Note Adding overly broad CIDR ranges to Allowed Networks may weaken SSRF protection. Only register the minimum required ranges. :::

AI Agent Integration​

Registered datasources are automatically available to the AI assistant (/ai). When your question contains datasource keywords, the AI generates and executes queries automatically.

Single Datasource Query​

"Show CPU usage from Prometheus"
→ datasource route → auto-generate PromQL → analyze results

Multi-Datasource Correlation​

Query multiple datasources simultaneously for correlation analysis:

"Correlate Prometheus metrics with Loki error logs"
→ Prometheus PromQL + Loki LogQL parallel execution → combined analysis

Cross-Source Analysis with AWS​

Combine datasource queries with AWS resources for root cause analysis:

"Compare Prometheus CPU spike with CloudWatch alarms"
→ datasource + monitoring multi-route → cross-source correlation

:::tip AI Keywords Keywords recognized by the AI assistant: prometheus, loki, tempo, clickhouse, jaeger, dynatrace, datadog (Korean keywords also supported) :::