[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-22。"],[[["\u003cp\u003eIntegration Connectors metrics and usage data are automatically available in Cloud Monitoring, allowing users to visualize data through custom dashboards and Metrics Explorer.\u003c/p\u003e\n"],["\u003cp\u003eTo use Cloud Monitoring, you must first enable the Cloud Monitoring API, and you might incur additional charges for using it directly.\u003c/p\u003e\n"],["\u003cp\u003eCustom dashboards can be created by selecting "Connectors" as the active resource and choosing specific metrics from the available Integration Connectors metrics.\u003c/p\u003e\n"],["\u003cp\u003eMetrics Explorer enables temporary metric chart creation and allows for saving charts to custom dashboards, offering options to filter, group, and aggregate data.\u003c/p\u003e\n"],["\u003cp\u003eMonitoring Query Language (MQL) can be used to aggregate connection data based on metrics like connector provider and version, allowing for custom monitoring dashboards.\u003c/p\u003e\n"]]],[],null,["# Monitor connectors\n==================\n\n\nIntegration Connectors is integrated with [Cloud Monitoring](/monitoring).\nThis means that all your Integration Connectors metrics and usage data is automatically available\nto Cloud Monitoring. To know about the type of metrics sent by the Integration Connectors service,\nsee [Integration Connectors metrics](/monitoring/api/metrics_gcp_c#gcp-connectors).\n\nYou can visualize your Integration Connectors metrics and data using the following Cloud Monitoring tools:\n\n- [Custom dashboards](#custom-dashboard)\n- [Metrics Explorer](#metrics-explorer)\n\nBefore you begin\n----------------\n\nBefore you use Cloud Monitoring, enable the Cloud Monitoring API.\n\n\n[Enable the Cloud Monitoring API](https://console.cloud.google.com/flows/enableapi?apiid=monitoring.googleapis.com)\n| **Note:** You may incur additional charges for using Cloud Monitoring API directly. For more information, see [Cloud Monitoring pricing](/monitoring#section-7).\n\nAccess metrics using custom dashboards\n--------------------------------------\n\nTo create custom monitoring dashboards for your Integration Connectors resources in\nyour Google Cloud project, do the following:\n\n1. In the Google Cloud console, go to the **Cloud Monitoring \\\u003e Dashboard Overview** page:\n\n [Go to Dashboard Overview page](https://console.cloud.google.com/monitoring/dashboards)\n2. Click **Create dashboard**.\n3. Optionally, modify the name of the dashboard.\n4. Click or drag and drop a chart on the canvas.\n5. In the chart configuration properties, perform the following:\n 1. Expand the **Resource \\& Metric** menu and select **Connectors** as the **Active resource**.\n 2. Choose the desired [metrics](/monitoring/api/metrics_gcp_c#gcp-connectors) that you want to visualize.\n 3. Click **Apply**.\n6. Add additional charts to your dashboard as desired.\n\nFor more information about custom dashboards, see [Create and manage custom dashboards](/monitoring/charts/dashboards).\n\nAccess metrics using Metrics Explorer\n-------------------------------------\n\n\nThe Cloud Monitoring [Metric Explorer](/monitoring/charts/metrics-explorer) helps you build temporary metric charts to visualize the available resource metrics for your Google Cloud project. Once you have created a metric chart, if desired, you can also save it to a custom monitoring dashboard.\n\n\nTo create a chart using the Integration Connectors resource metrics, do the following:\n\n1. In the Google Cloud console, go to the **Cloud Monitoring \\\u003e Metrics explorer** page:\n\n [Go to Metrics explorer page](https://console.cloud.google.com/monitoring/metrics-explorer)\n2. In the **Select a metric** pane, expand the **Metric** menu and select **Connectors** as the **Active resource**.\n3. Choose the desired [metrics](/monitoring/api/metrics_gcp_c#gcp-connectors) that you want to visualize.\n4. Click **Apply**.\n\nYou can also select filters, group by metric labels, perform aggregations, and select chart viewing options using the Metric Explorer. For more information, see [Create charts with Metrics Explorer](/monitoring/charts/metrics-explorer).\n\nMonitor using PromQL\n--------------------\n\nYou can use [PromQL](/monitoring/promql) to create custom monitoring dashboards based\non various metrics. PromQL queries let you aggregate your connection data based on metrics such as\nconnector provider and connector version. You can write PromQL queries by using the\n[code editor](/monitoring/promql/promql-in-monitoring).\n\nThe following examples show how to use the PromQL queries to gather connection data.\n\n### Example - Monitor request count\n\nThe following PromQL query shows how to get and aggregate request count data for active connections: \n\n```sql\nsum by (location, connection, provider) (\n sum_over_time({\"connectors.googleapis.com/connection/request_count\", monitored_resource=\"connectors.googleapis.com/Connection\"}[1m])\n) and on (location, connection, provider)\n avg_over_time({\"connectors.googleapis.com/connection/state\", monitored_resource=\"connectors.googleapis.com/Connection\"}[1m]) \u003e 0\n```\n\n### Example - Monitor active nodes\n\nThe following PromQL query shows how to get and aggregate active node count data for all your connections: \n\n```sql\nsum by (location, connection, provider) (\n sum_over_time({\"connectors.googleapis.com/connection/nodes\", monitored_resource=\"connectors.googleapis.com/Connection\"}[1m])\n) and on (location, connection, provider)\n avg_over_time({\"connectors.googleapis.com/connection/state\", monitored_resource=\"connectors.googleapis.com/Connection\"}[1m]) \u003e 0\n```\n\n### Example - Monitor connection status over a time period\n\nThe following PromQL query shows how to get the status trend over a time period for all your connections: \n\n```sql\ncount by (status, connection) (\n {\"connectors.googleapis.com/connection/connection_status\",\n monitored_resource=\"connectors.googleapis.com/Connection\"\n } == 1\n)\n```\n\nIf you want to know the status of connections at the current point in time, use the [Metrics\nExplorer](/integration-connectors/docs/cloud-monitoring#metrics-explorer) in the Google Cloud console instead of a PromQL query.\n| **Note:** You can also [configure alerts](/integration-connectors/docs/alerts) to know if a connection is in a particular state. For example, you can configure an alert that is triggered when a connection goes to an Error state.\n\nWhat's next\n-----------\n\nUnderstand how to view and manage various Google Cloud services and third party applications (applicable to your\nGoogle Cloud project) that are integrated with Cloud Monitoring. For more information, see\n[Manage integrations in Cloud Monitoring](/monitoring/agent/integrations)."]]