Better Stack
Connect
Connect Better Stack from the terminal. Pass --help for the flags Better Stack accepts.
polylane integration connect --type betterstackA global API token and the exact name of your Better Stack team. A SQL API connection for log reads is optional.
Connect Better Stack with one global API token.
- Open Better Stack API tokens and create a global API token.
- Paste the token into Polylane. Enter the exact name of the Better Stack team that gets the incident webhook and owns the monitors that agents create. Polylane checks access to the Uptime API and the Telemetry API.
- Optional: add a SQL API username and password. In Better Stack Telemetry integrations, connect a ClickHouse HTTP client for the teams that you want Polylane to read. You can also add this connection later, under Query access on the integration page.
Polylane encrypts the token and the SQL API password before it stores them, and the agent never sees them.
On connect, Polylane creates an outgoing webhook named polylane for the team. The webhook covers every incident, so monitors need no setup of their own.
Register Better Stack alerts to Polylane alongside your Terraform-managed resources.
Alert delivery uses one outgoing webhook named polylane that covers every incident, so Terraform-managed monitors need no change. Polylane creates the webhook on connect and deletes it on disconnect. Do not manage it in Terraform.
How it works
Incidents start investigations
The polylane webhook sends each incident to Polylane when it starts, when someone acknowledges it, and when it resolves. A started incident opens an issue in Polylane, and Polylane triages it. More notices of the same incident go to the same issue. An acknowledgement does not start triage. A resolved incident goes on the issue timeline, and the agent uses it as evidence.
Polylane reads the monitor of each incident. On the Alerts tab of the integration page, turn automatic triage on or off for the connection or for each monitor.
Checks
Polylane runs checks on your Better Stack account every 30 minutes. They watch the number of monitors that are down, the number of incidents that open, the average response time, and the average availability of your monitors. With a SQL API connection, Polylane also reads error rows from up to five telemetry sources to find errors that it did not see before.
Under Anomaly detection on the integration page, change how often the checks run, or turn them off. Polylane also explores the connection when you connect it and every 12 hours, and opens an issue for each problem that it finds.
Context graph
Every hour, Polylane reads the URL of each uptime monitor. It links the resource in the context graph that serves that hostname to a Better Stack node.
During an investigation
Agents read monitors with their status, availability, and response times, incidents and their timelines, heartbeats, status pages, status reports, and telemetry sources. Agents can also acknowledge or resolve an incident, create a monitor, and publish a status report. Each change needs safety review and approval before it runs.
Polylane checks the token every six hours. Under Credentials on the integration page, verify the saved token or replace it.
API tokens
A global API token works for all your Better Stack teams and products. It covers monitors, incidents, heartbeats, status pages, and telemetry sources. Better Stack documents global tokens for the Uptime API and the Telemetry API.
The global token reads resources of all teams. The team name decides which team owns the incident webhook and the monitors that agents create. An agent can choose another team when it creates a monitor.
The connect API also accepts a team-scoped Uptime API token and a team-scoped Telemetry API token. Each one replaces the global token for its product.
Log reads use the SQL API, which needs a separate username and password.
Disconnecting
Disconnecting deletes the polylane outgoing webhook. Then revoke the API token in Better Stack, and remove the SQL API connection if you added one.
Disconnect
Disconnecting stops every sync and check and deletes the credentials Polylane held. Everything Polylane set up in Better Stack is removed as well; nothing is left behind.
polylane integration disconnect <id>Tools
7Operations agents can perform in threads.