Fly.io
Forward logs from Fly.io applications to Sazabi for AI-powered analysis and investigation.
Fly.io is a native data source, which means Sazabi provisions and manages the forwarding infrastructure automatically. Once you connect your Fly.io organization, logs from your selected applications start flowing to Sazabi within minutes.
About this data source
Sazabi deploys a NATS-based log shipper that connects to Fly.io's log stream and forwards application logs to Sazabi. The shipper runs as a Fly Machine in your organization, ensuring low-latency log delivery.
With Fly.io log forwarding, you can:
- Monitor Fly.io applications across all regions
- Stream logs in real-time from your deployed services
- Investigate issues with AI-powered analysis
- Correlate logs from multiple Fly.io apps in a single view
Prerequisites
Before you begin, make sure you have:
- A Fly.io account with deployed applications
- A Fly.io API token (created via
fly tokens create) - Your Fly.io organization slug
Get your API token
Install the Fly CLI
If you haven't already, install the Fly CLI by following the instructions at fly.io/docs/flyctl/install.
Create an API token
Generate a new API token with the following command:
fly tokens createCopy the token immediately after creation. You will not be able to see it again.
Find your organization slug
List your organizations to find the slug:
fly orgs listThe organization slug is the short identifier shown in the output. You can also find it in the URL when viewing your organization on the Fly.io dashboard.
Connect Fly.io to Sazabi
Add Fly.io data source
Click Add Source and select Fly.io from the list of available data sources.
Enter your credentials
Provide the following information:
- API Token: Paste your Fly.io API token
- Organization Slug: Enter your organization slug (e.g.,
my-org)
Sazabi will validate your credentials and fetch your available applications.
Select applications to monitor
Choose which Fly.io applications you want to forward logs from. You can select individual apps or monitor all applications in your organization.
Deploy the log shipper
Click Connect to finalize the configuration. Sazabi will automatically deploy a log shipper machine in your Fly.io organization.
What Sazabi creates
When you connect Fly.io, Sazabi provisions:
- NATS-based log shipper: A dedicated Fly Machine that subscribes to Fly's internal NATS log stream
- Log stream connection: A persistent connection to Fly's log delivery system for your selected applications
The log shipper runs in your Fly.io organization, which means:
- Logs never leave Fly's network until they're forwarded to Sazabi
- The shipper scales automatically based on log volume
- You maintain full visibility into the shipper's operation
Verifying logs are flowing
Once you have connected Fly.io, you can verify that logs are flowing to Sazabi:
-
Ask the assistant: Open a thread in Sazabi and ask "Show me Fly.io logs from the last hour" or "What errors occurred in my Fly.io apps?"
-
Check the dashboard: Navigate to your project in the Sazabi dashboard to see logs appear in real-time.
-
Generate test logs: Deploy a new version of your app or trigger some activity to generate fresh logs.
Troubleshooting
Token permissions
If Sazabi cannot fetch your applications, verify that your API token has
sufficient permissions. Tokens created with fly tokens create typically
have full access, but organization-restricted tokens may need additional
scopes.
Organization not found
If your organization is not being recognized:
- Verify the organization slug is correct (case-sensitive)
- Ensure your API token has access to the specified organization
- Try listing your organizations with
fly orgs listto confirm the slug
Machine failed to start
If the log shipper machine fails to deploy:
- Check that your organization has available capacity for a new machine
- Verify there are no billing issues with your Fly.io account
- Check the Fly.io dashboard for any deployment errors
- Contact Sazabi support if the issue persists
Logs not appearing
If logs are not flowing after setup:
- Wait a few minutes for the shipper to initialize
- Verify your applications are running and producing logs
- Check the shipper machine status in your Fly.io dashboard
- Ensure the NATS connection is established successfully
Partial logs
If only some applications are sending logs:
- Verify all desired applications are selected in the Data Sources settings
- Check that the applications are actively running
- Some log types (build logs, deployment logs) may not be forwarded