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:
| Capability | Description |
|---|---|
| Query Metrics | Run PromQL instant and range queries against Chronosphere metrics |
| Search Logs | Search log data with filters using Chronosphere query syntax |
| List Traces | Search distributed traces by service, operation, or trace ID |
| Check Monitors | List and inspect alert monitors and their configuration |
| Change Events | List 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
- Log in to your Chronosphere account
- Navigate to Settings > Service Accounts
- Create a new service account or select an existing one
- Go to API Tokens and click Create Token
- 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
- Go to Integrations in Autoheal
- Click Chronosphere
- Enter a name (e.g., "Production Chronosphere")
3
Configure Credentials
Enter the following:
- Company Subdomain: Your Chronosphere subdomain (e.g.,
mycompanyformycompany.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:
| Permission | Why It's Needed |
|---|---|
| Metrics read | Query PromQL metrics (instant and range) |
| Logs read | Search log data |
| Traces read | Access distributed traces |
| Monitors read | View monitor configuration and status |
| Events read | List 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