-
Notifications
You must be signed in to change notification settings - Fork 115
Fly doc #2143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fly doc #2143
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,11 @@ Once configured correctly, alerts from SigNoz will appear in Microsoft Teams whe | |
|
|
||
|  | ||
|
|
||
| <Admonition> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Correct usage of the Admonition component to highlight important information. |
||
| MS Teams notifications do not support annotations. | ||
| Related logs and annotation details are excluded to prevent message rejection. | ||
| </Admonition> | ||
|
|
||
| ## Turn-off Resolved alerts | ||
|
|
||
| The resolve alerts toggle is switched on by default. To turn-off receiveing the Resolved alerts for your Notification Channel, follow these steps: | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,189 @@ | ||||||||||
| --- | ||||||||||
| date: 2025-10-30 | ||||||||||
| title: Fly.io Metrics | ||||||||||
| id: fly-metrics | ||||||||||
| description: Monitor Fly.io application metrics in SigNoz | ||||||||||
| tags : [SigNoz Cloud, Self-Host] | ||||||||||
| --- | ||||||||||
|
|
||||||||||
| This document explains how to monitor Fly.io application metrics in SigNoz by scraping Fly’s Prometheus federation endpoint with the OpenTelemetry Collector. | ||||||||||
|
|
||||||||||
| ## Pre-requisites | ||||||||||
|
|
||||||||||
| - A `SigNoz Cloud` (or self-hosted) workspace | ||||||||||
| - `Fly CLI installed` and a Fly.io account | ||||||||||
| - Your Fly.io organization slug (e.g., personal) | ||||||||||
| - A sample Fly app to generate test traffic | ||||||||||
|
|
||||||||||
| ## Setup | ||||||||||
|
|
||||||||||
| ### Step 1: Install & log in to Fly.io | ||||||||||
|
|
||||||||||
| **macOS:** | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| brew install flyctl | ||||||||||
| fly auth signup # or: fly auth login | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| **Linux:** | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| curl -L https://fly.io/install.sh | sh | ||||||||||
| ~/.fly/bin/flyctl auth signup # or: ~/.fly/bin/flyctl auth login | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Verify organizations: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| fly orgs list | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Sample output: | ||||||||||
|
|
||||||||||
| ``` | ||||||||||
| Name Slug Type | ||||||||||
| ---- ---- ---- | ||||||||||
| Your Org <your-org-slug> PERSONAL | ||||||||||
| Team Alpha team-alpha-123 SHARED | ||||||||||
| Another Team team-alpha-456 SHARED | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### Step 2: Create a test app | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| fly launch --name <your-app-name> --org <your-org-slug> --image flyio/hellofly --now | ||||||||||
| # Deploys a minimal Hello World app | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### Step 3: Create an org metrics token (for federation) | ||||||||||
|
|
||||||||||
| Generate a token at the org scope: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| fly tokens create org --org <your-org-slug> | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| This prints a value beginning with FlyV1 .... Save only the raw part after FlyV1 to a file (do not include the prefix in the file): | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| # Save the raw token (without the "FlyV1 " prefix) | ||||||||||
| echo '<RAW_TOKEN_AFTER_FlyV1>' > fly_federate_token | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### Step 4: Configure the OpenTelemetry Collector | ||||||||||
|
|
||||||||||
| Create `otel.yaml` to scrape Fly’s federation endpoint and export to SigNoz. | ||||||||||
|
|
||||||||||
| ```yaml:otel.yaml | ||||||||||
| receivers: | ||||||||||
| prometheus: | ||||||||||
| config: | ||||||||||
| scrape_configs: | ||||||||||
| - job_name: fly-federate | ||||||||||
| scheme: https | ||||||||||
| metrics_path: /prometheus/<your-org-slug>/federate # e.g., /prometheus/personal/federate | ||||||||||
| params: | ||||||||||
| match[]: ['{__name__=~"fly_.*"}'] # only Fly metrics | ||||||||||
| static_configs: | ||||||||||
| - targets: ["api.fly.io"] | ||||||||||
| authorization: | ||||||||||
| type: FlyV1 | ||||||||||
| credentials_file: /etc/otel/secret/fly_federate_token | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| <Tabs entityName="plans"> | ||||||||||
|
|
||||||||||
| <TabItem value="signoz-cloud" label="SigNoz Cloud" default> | ||||||||||
|
|
||||||||||
| ```yaml:otel.yaml | ||||||||||
| exporters: | ||||||||||
| otlphttp: | ||||||||||
| endpoint: "ingest.{region}.signoz.cloud:443" | ||||||||||
| headers: | ||||||||||
| signoz-access-token: <YOUR_SIGNOZ_API_KEY> | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| You would need to replace `{region}` with the [region](https://signoz.io/docs/ingestion/signoz-cloud/overview/) of your SigNoz Cloud environment and `<YOUR_SIGNOZ_API_KEY>` with your [Ingestion Key](https://signoz.io/docs/ingestion/signoz-cloud/keys/). | ||||||||||
|
|
||||||||||
| </TabItem> | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Consider using the Cloud vs Self-Hosted drop-in snippet instead of tabs, as the instructions primarily differ by endpoint and ingestion key. This aligns with the "Cloud vs Self-Host" guideline in |
||||||||||
|
|
||||||||||
| <TabItem value="self-host" label="Self-Host"> | ||||||||||
|
|
||||||||||
| ```yaml:otel.yaml | ||||||||||
| exporters: | ||||||||||
| otlphttp: | ||||||||||
| endpoint: "{signoz-instance}:4317" | ||||||||||
| tls: | ||||||||||
| insecure: true | ||||||||||
| ``` | ||||||||||
| You would need to replace `{signoz-instance}` with the IP address or FQDN of your self-hosted SigNoz server. | ||||||||||
|
|
||||||||||
| </TabItem> | ||||||||||
|
Comment on lines
+120
to
+122
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 External links should open in a new tab and preserve security attributes as per
Suggested change
|
||||||||||
|
|
||||||||||
| </Tabs> | ||||||||||
|
|
||||||||||
| ```yaml:otel.yaml | ||||||||||
| processors: | ||||||||||
| batch: {} | ||||||||||
| service: | ||||||||||
| telemetry: | ||||||||||
| logs: | ||||||||||
| level: debug | ||||||||||
| pipelines: | ||||||||||
| metrics: | ||||||||||
| receivers: [prometheus] | ||||||||||
| processors: [batch] | ||||||||||
| exporters: [otlphttp] | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### Step 5: Run the Collector (Docker) | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| docker run --rm -it \ | ||||||||||
| -v "$(pwd)/otel.yaml:/etc/otel/config.yaml" \ | ||||||||||
| -v "$(pwd)/fly_federate_token:/etc/otel/secret/fly_federate_token:ro" \ | ||||||||||
| otel/opentelemetry-collector:latest \ | ||||||||||
| --config /etc/otel/config.yaml | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| You should see logs indicating the collector started and is sending metrics to the SigNoz ingest endpoint. | ||||||||||
| If you see “failed to scrape” or auth errors, re-check the token step. | ||||||||||
|
|
||||||||||
| ### Step 6: Manually verify the federation endpoint | ||||||||||
|
|
||||||||||
| Generate a bit of traffic to your app: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| for i in {1..30}; do curl -sS https://<your-app-name>.fly.dev >/dev/null; done | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Then confirm metrics are returned: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| curl -sS -i -G \ | ||||||||||
| -H "Authorization: FlyV1 $(cat fly_federate_token)" \ | ||||||||||
| --data-urlencode 'match[]={__name__=~"fly_.*"}' \ | ||||||||||
| https://api.fly.io/prometheus/<your-org-slug>/federate | head -n 40 | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| You should see lines like `fly_instance_cpu_user_seconds_total`, `fly_instance_memory_resident`, etc. | ||||||||||
|
|
||||||||||
| ## Visualizing Fly.io Metrics | ||||||||||
|
|
||||||||||
| Once you have configured the OTel Collector to send Fly.io metrics to SigNoz, you can start visualizing the metrics in the SigNoz UI. | ||||||||||
|
|
||||||||||
| You can use the pre-configured dashboard for Docker metrics or [create your own custom dashboard](https://signoz.io/docs/userguide/manage-dashboards/#steps-to-create-a-custom-dashboard). To use the pre-configured dashboard, download the dashboard JSON from [here](https://github.com/SigNoz/dashboards/blob/main/container-metrics/docker/container-metrics-by-host.json) and import it to SigNoz by clicking Dashboards → New dashboard → Import JSON: | ||||||||||
|
|
||||||||||
| <figure data-zoomable align='center'> | ||||||||||
| <img src="/img/docs/dashboards/dashboard-templates/fly-dashboard.webp" alt="Fly.io Dashboard"/> | ||||||||||
| <figcaption><i>Fly.io Dashboard</i></figcaption> | ||||||||||
|
Comment on lines
+179
to
+181
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 External links should open in a new tab and preserve security attributes as per
Suggested change
|
||||||||||
| </figure> | ||||||||||
|
|
||||||||||
| <div className="flex justify-center"> | ||||||||||
| <DashboardActions | ||||||||||
| dashboardJsonUrl="https://raw.githubusercontent.com/SigNoz/dashboards/refs/heads/main/flyio/fly-prometheus-v1.json" | ||||||||||
| dashboardName="Fly.io (Prometheus)" | ||||||||||
| /> | ||||||||||
| </div> | ||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 Good job adding
className: 'new-doc'for the new documentation entry, as suggested inCONTRIBUTING.md("Add Doc to Sidebar (Docs only)" section).