配置指标收集
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本部分介绍用于将 Apigee Hybrid 指标数据发送到 Cloud Operations 的配置属性。指标收集默认处于启用状态。另请参阅指标收集概览。
必需配置
以下替换文件设置会配置指标集合:
gcp:
region: $GCP_REGION
projectID: $GCP_PROJECT_ID
metrics:
serviceAccountPath: $SERVICE_ACCOUNT_PATH
其中:
$GCP_REGION
标识 apigee-logger
和 apigee-metrics
推送其数据的 GCP 地区。
$GCP_PROJECT_ID
标识 apigee-logger
和 apigee-metrics
推送其数据的 Google Cloud 项目。
$SERVICE_ACCOUNT_PATH
是文件系统中 GCP 服务账号密钥文件(下载于 Apigee Hybrid 安装过程期间)的路径。与密钥关联的服务账号必须具有 Monitoring Metrics Writer 角色。如需详细了解如何创建服务账号,请参阅第 5 步:添加服务账号。
示例:
gcp:
region: us-central1
projectID: acme-project
metrics:
serviceAccountPath: ./service-accounts/metrics-sa.json
如何停用指标收集
如需停用指标收集,请将以下配置添加至替换文件,并将其应用于集群:
metrics:
enabled: false
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-05。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
{"lastModified": "\u6700\u540e\u66f4\u65b0\u65f6\u95f4 (UTC)\uff1a2024-09-05\u3002"}