Skip to main content

Chronosphere Integration

Connect Chronosphere to enable the AI agent to query metrics with PromQL, search logs, trace distributed requests, review monitors, and correlate change events during investigations.

Capabilities

Once connected, the AI agent can:

CapabilityDescription
Query MetricsRun PromQL instant and range queries against Chronosphere metrics
Search LogsSearch log data with filters using Chronosphere query syntax
List TracesSearch distributed traces by service, operation, or trace ID
Check MonitorsList and inspect alert monitors and their configuration
Change EventsList deployment and config change events for incident correlation

Prerequisites

  • A Chronosphere account with API access
  • A service account API token
  • Read permissions for metrics, logs, traces, and monitors

Setup

1
Create a Service Account API Token
  1. Log in to your Chronosphere account
  2. Navigate to Settings > Service Accounts
  3. Create a new service account or select an existing one
  4. Go to API Tokens and click Create Token
  5. Copy the generated token
note

Service account tokens do not expire. For personal tokens, the maximum expiry is 30 days. We recommend using a service account token for stable integrations.

2
Add Integration in Autoheal
  1. Go to Integrations in Autoheal
  2. Click Chronosphere
  3. Enter a name (e.g., "Production Chronosphere")
3
Configure Credentials

Enter the following:

  • Company Subdomain: Your Chronosphere subdomain (e.g., mycompany for mycompany.chronosphere.io)
  • API Token: Your service account API token
4
Test and Save

Click Test Connection to verify, then Save.

Required Permissions

The service account should have at least these permissions:

PermissionWhy It's Needed
Metrics readQuery PromQL metrics (instant and range)
Logs readSearch log data
Traces readAccess distributed traces
Monitors readView monitor configuration and status
Events readList change events
tip

Create a dedicated service account for Autoheal with read-only permissions. Avoid using tokens with write or admin access.

Example Queries

Once connected, you can ask the AI agent questions like:

Show me the error rate for the payment service over the last hour
Search logs for errors in the api-gateway service since 2pm
What monitors are currently configured for the platform team?
Show me traces for the checkout service with latency over 500ms
Were there any deployments or config changes in the last 2 hours?

Troubleshooting

401 Authentication Failed
  • Verify the API token is correct and not expired
  • Ensure you are using a service account token, not a personal token
  • Check that the token has not been revoked
403 Access Denied
  • Verify the service account has the required read permissions
  • Check that your Chronosphere plan includes API access
No Data Returned
  • Verify the time range includes data
  • For logs, ensure you include a primary key filter (service or severity)
  • For metrics, check the PromQL query syntax
  • Ensure the service account has access to the requested data
Connection Timeout
  • Verify the company subdomain is correct
  • Check network connectivity to {company}.chronosphere.io