webhook
1 TopicHow to set up a Webhook in Grafana
This guide will provide step-by-step instructions on how to set up a Webhook in Grafana, enabling you to easily view Fabric Metrics and Events. You can start streaming events and metrics to your Grafana endpoints by using the template JSON below to make a POST request to fabric/v4/streams/subscriptions. You will have your own Grafana host URI, but this example shows the expected API key and endpoints for events and metrics uri. curl -X POST 'https://api.equinix.com/fabric/v4/streams/<streamid>/subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <bearer token="">' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "<webhook_subscription_name>", "description": "<webhook_subscription_desc>", "enabled": true, "sink": { "type": "WEBHOOK", "settings": { "eventUri": "https://<otel_exporter_otlp_endpoint>/v1/logs", "metricUri": "https://<otel_exporter_otlp_endpoint>/v1/metrics", "format": "OPENTELEMETRY" }, "credential": { "type": "API_KEY", "apiKey": "<granfana_instance_id>:<grafana_token>" } } }'</grafana_token></granfana_instance_id></otel_exporter_otlp_endpoint></otel_exporter_otlp_endpoint></webhook_subscription_desc></webhook_subscription_name></bearer></streamid> Step-by-Step Instructions 1. Create a New Connection using OpenTelemetry Refer to Grafana Doc Recommended OpenTelemetry setup via Grafana Cloud integrations Sign In to the Grafana Cloud Portal. From your organization “Overview”, select or click Launch to open a Grafana Cloud stack. With a stack selected, click “ Launch” from the Grafana tile to launch Grafana Cloud. With Grafana Cloud launched, click “Connections”, or expand, then click “Add new connection”. Search for “OpenTelemetry” and press enter to filter the connection options. Select the desired OpenTelemetry connection tile and follow the instructions. 1.1 Provide a token name under “Access Policy Token Name” Access Policy Token Name: Provide a token name to identify the connection 1.2 Enter “Equinix” for the Service Name and Namespace under “Set up service information” Service Name: Provide “Equinix” as the value Service Namespace: Provide “Equinix” as the value 1.3 Save the token and OTLP Endpoint for Subscription Request Ensure that the token and OTEL_EXPORTER_OTLP_ENDPOINT values during this process are saved securely. The token and OTEL_EXPORTER_OTLP_ENDPOINT are required for further integration or data ingestion processes. 2. Save the Grafana Instance ID From your organization Overview, select or click Launch to open a Grafana Cloud stack. With Grafana Cloud launched, click connections, or expand, then click Collector. With Collector expanded, click Fleet Management. 3. Copy the Token, Grafana Endpoint, and Instance Id to create Grafana Subscription Once the setup is complete, the values will be generated. Copy the URL to your clipboard, as it will be needed for the POST subscription API in Stream Observability. 4. Start receiving Fabric Events (logs) in Grafana Go to "Logs" on left navigation In the Labels Search Bar, search by "service_name = Equinix". You can filter your events by resource ID by adding a filter under "Fields": Click on a suggested "resource_uuid" Paste the UUID to search the log/event 5. Start receiving Fabric Metrics in Grafana Go to metrics on the left navigation In the Labels Search Bar Search by "service_name = Equinix" Select a Metric Type 5.1 Search Metrics for specific assets under Explore Page Click "Related Logs" and expand the Metric Message Click "Open in Logs Drilldown" On the Explore Page, expand "Metrics browser" then click equinix_event_subject You can filter your metrics by selecting the "equinix_event_subject" filter then under "select (multiple) values for your labels": Select the connection or Port UUID prefixed with the subject “/fabric/v4/<connections |="" ports="">/<uuid>”</uuid></connections> Paste the UUID to search the metrics 5.2 View OpenTelemetry Metric Messages for specific assets under Explore Page Expand "Options" Change the format to "Table" Click "Expand Results" Toggle Disclaimer: These guides are unofficial and for general reference only. For specific details, please consult the respective provider’s documentation.49Views0likes0Comments