Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Network Analyzer menggunakan perintah
Recommender. Recommender adalah Google Cloud layanan yang
memberikan rekomendasi penggunaan untuk Google Cloud produk dan layanan.
Untuk mengetahui daftar lengkap jenis insight Pemberi rekomendasi, lihat
jenis insight Pemberi rekomendasi.
Meminta insight
gcloud
Untuk mencantumkan insight untuk project Google Cloud , jalankan perintah berikut:
PROJECT_ID: project ID yang insight-nya ingin Anda
cantumkan. Anda juga dapat mencantumkan semua insight untuk folder,
organisasi, atau akun penagihan.
LOCATION: lokasi untuk mencantumkan insight, seperti
global, europe, asia-east1, atau us-central1-a.
INSIGHT_TYPE: jenis insight Penganalisis Jaringan
yang akan diminta, seperti google.networkanalyzer.vpcnetwork.connectivityInsight.
EXPRESSION: terapkan filter Boolean ini ke setiap
resource yang ingin Anda cantumkan.
Jika ekspresi bernilai True,
item tersebut akan dicantumkan. Untuk mengetahui detail dan contoh ekspresi filter, jalankan $ gcloud topic filters atau lihat dokumentasi gcloud topic filters.
LIMIT: jumlah maksimum resource yang akan dicantumkan;
jumlah default resource yang dicantumkan tidak terbatas.
PAGE_SIZE: jumlah maksimum resource yang akan
dicantumkan per halaman.
Ukuran halaman default ditentukan oleh layanan;
jika tidak, tidak akan ada paging. Pembagian halaman dapat diterapkan sebelum atau setelah
FILTER dan LIMIT.
SORT_BY: daftar nama kunci kolom yang dipisahkan koma untuk pengurutan resource.
Urutan defaultnya adalah menaik.
Untuk menentukan urutan menurun, beri awalan kolom dengan ~ (tilde).
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-03 UTC."],[],[],null,["# Use the Recommender CLI and API\n\nNetwork Analyzer uses [Recommender](/recommender/docs)\ncommands. Recommender is a Google Cloud service that\nprovides usage recommendations for Google Cloud products and services.\nFor a complete list of Recommender insight types, see the\nRecommender [insight types](/recommender/docs/insights/insight-types).\n\nRequest insights\n----------------\n\n### gcloud\n\nTo list insights for a Google Cloud project, run the following command: \n\n```\ngcloud recommender insights list \\\n --project=PROJECT_ID \\\n --location=LOCATION \\\n --insight-type=INSIGHT_TYPE \\\n --filter=EXPRESSION \\\n --limit=LIMIT \\\n --page-size=PAGE_SIZE \\\n --sort-by=SORT_BY \\\n --format=json\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID that you want to list insights for. You can also list all insights for a folder, organization, or a billing account.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location to list insights for, such as `global`, `europe`, `asia-east1`, or `us-central1-a`.\n- \u003cvar translate=\"no\"\u003eINSIGHT_TYPE\u003c/var\u003e: the Network Analyzer insight\n type to request, such as `google.networkanalyzer.vpcnetwork.connectivityInsight`.\n\n For a complete list of insight types, see [Insight groups and types](#insight-types).\n\nThe following fields are optional:\n\n- \u003cvar translate=\"no\"\u003eEXPRESSION\u003c/var\u003e: apply this Boolean filter to each\n resource that you want to list.\n\n If the expression evaluates as `True`,\n that item is listed. For more details and examples of filter expressions,\n run `$ gcloud topic filters` or see the\n [`gcloud topic filters` documentation](/sdk/gcloud/reference/topic/filters).\n- \u003cvar translate=\"no\"\u003eLIMIT\u003c/var\u003e: the maximum number of resources to list;\n the default number of resources listed is unlimited.\n\n- \u003cvar translate=\"no\"\u003ePAGE_SIZE\u003c/var\u003e: the maximum number of resources to\n list per page.\n\n The default page size is determined by the service;\n otherwise, there is no paging. Paging might be applied before or after\n \u003cvar translate=\"no\"\u003eFILTER\u003c/var\u003e and \u003cvar translate=\"no\"\u003eLIMIT\u003c/var\u003e.\n- \u003cvar translate=\"no\"\u003eSORT_BY\u003c/var\u003e: a list of comma-separated\n field key names to sort by for a resource.\n\n The default order is ascending.\n To specify a descending order, prefix a field with `~` (a tilde).\n\n### API\n\nTo get insights for a Google Cloud project, make a `GET` request to the\n[`projects.locations.insightTypes.insights` method](/recommender/docs/reference/rest/v1/projects.locations.insightTypes.insights/get): \n\n```\nhttps://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/INSIGHT_TYPE/insights\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location to list insights for, such as `global`, `europe`, `asia-east1`, or `us-central1-a`.\n- \u003cvar translate=\"no\"\u003eINSIGHT_TYPE\u003c/var\u003e: the Network Analyzer insight\n type to list, such as google.networkanalyzer.vpcnetwork.connectivityInsight.\n\n For a complete list of insight types, see [Insight groups and types](#insight-types).\n\nThe following example shows a sample response for this command: \n\n```\n{\n \"name\": \"projects/{project_number}/locations/{location}/insightTypes/google.networkanalyzer.hybridconnectivity.dynamicRouteInsight/insights/{insight_id}\",\n \"description\": \"Dynamic route is fully shadowed by a peering subnet route\",\n \"content\": {\n \"networkUri\": \"//compute.googleapis.com/projects/{project_id}/global/networks/{network_name}\",\n \"region\": \"{location}\",\n \"ipRange\": \"{ip_range}\",\n \"priority\": 100,\n \"nextHopUri\": \"//compute.googleapis.com/projects/{project_id}/regions/{location}/vpnTunnels/{tunnel_name}\",\n \"cloudRouterUri\": \"//compute.googleapis.com/projects/{project_id}/regions/{location}/routers/{router_name}\",\n \"shadowingRouteUris\": [\n \"//compute.googleapis.com/projects/{project_id}/global/routes/{route_name}\"\n ],\n \"shadowingRouteType\": \"PEERING_SUBNET\"\n },\n \"lastRefreshTime\": \"2022-09-15T21:10:57.187942979Z\",\n \"observationPeriod\": \"611870.625920374s\",\n \"stateInfo\": {\n \"state\": \"ACTIVE\"\n },\n \"category\": \"PERFORMANCE\",\n \"targetResources\": [\n \"//compute.googleapis.com/projects/{project_id}/regions/{location}/vpnTunnels/{tunnel_name}\"\n ],\n \"insightSubtype\": \"DYNAMIC_ROUTE_FULLY_SHADOWED\",\n \"severity\": \"MEDIUM\"\n}\n```\n\nDescribe insight details\n------------------------\n\n### gcloud\n\nTo list details of a particular insight, run the following command: \n\n```\ngcloud recommender insights describe INSIGHT_ID \\\n --project=PROJECT_ID \\\n --location=LOCATION \\\n --insight-type=INSIGHT_TYPE\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eINSIGHT_ID\u003c/var\u003e: the ID of the insight to describe.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project containing the insight.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location to list insights for.\n- \u003cvar translate=\"no\"\u003eINSIGHT_TYPE\u003c/var\u003e: the Network Analyzer insight\n type of the insight, such as\n `google.networkanalyzer.vpcnetwork.connectivityInsight`.\n\n For a complete list of insight types, see [Insight groups and types](#insight-types).\n\n### API\n\nTo get details for an insight, make a `GET` request to the\n[`projects.locations.insightTypes.insights` method](/recommender/docs/reference/rest/v1/projects.locations.insightTypes.insights/get): \n\n```\nhttps://recommender.googleapis.com/v1/projects/PROJECT/locations/LOCATION/insightTypes/INSIGHT_TYPE/insights/INSIGHT_ID\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location of the insight.\n- \u003cvar translate=\"no\"\u003eINSIGHT_TYPE\u003c/var\u003e: the Network Analyzer insight\n type of the insight, such as\n `google.networkanalyzer.vpcnetwork.connectivityInsight`.\n\n For a complete list of insight types, see [Insight groups and types](#insight-types).\n- \u003cvar translate=\"no\"\u003eINSIGHT_ID\u003c/var\u003e: the insight ID for the insight.\n\nInsight groups and types\n------------------------\n\nFor more information about Network Analyzer insights, see\n[Insight groups and types](/network-intelligence-center/docs/network-analyzer/insight-groups-types)."]]