[[["易于理解","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-19。"],[[["\u003cp\u003eCertificate Manager utilizes Cloud Logging to record operational data, primarily focusing on certificate expiration, which is always enabled, capturing minimal information.\u003c/p\u003e\n"],["\u003cp\u003eYou can access and review Certificate Manager logs through the Logs Explorer in the Google Cloud console and filter logs based on specific events, such as certificate expiration or close to expiration.\u003c/p\u003e\n"],["\u003cp\u003eAlerts for certificate events, including expiration or approaching expiration, can be configured in Cloud Logging by specifying query conditions using the log name and certificate state within a specific project.\u003c/p\u003e\n"],["\u003cp\u003eCertificate Manager provides standard Cloud Monitoring API metrics, such as request counts, latencies, and sizes, along with custom metrics like the number of certificates and map entries provisioned in a project.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCLOSE_TO_EXPIRY\u003c/code\u003e log event is generated daily for both Google-managed and self-managed certificates starting 5-10 days and 10 days before expiration respectively, allowing for proactive management.\u003c/p\u003e\n"]]],[],null,["# Logs and metrics\n\nThis page explains how Certificate Manager logs various types of\ninformation about its operation and how to view that information.\n\nLogs\n----\n\nTo view Certificate Manager logs, use the\n[Logs Explorer](https://console.cloud.google.com/logs) in the Google Cloud console.\n\nCertificate Manager provides Google Cloud logs described in\n[Google Cloud logs](/logging/docs/api/platform-logs#certificate_manager).\n\nCertificate Manager uses Cloud Logging to capture and\nstore logs. Certificate Manager logging is always enabled and\nonly captures a minimal amount of information specifically related to\ncertificate expiration. The Certificate Manager monitored resource type\nis `certificatemanager.googleapis.com/Project`.\n\nYou can also capture and retrieve Certificate Manager logs using\nCloud Logging. See the documentation for\n[Cloud Logging client libraries](/logging/docs/reference/libraries)\nfor information on how to configure this logging mechanism.\n\n### Configure log alerts\n\nYou can configure alerts for events that Certificate Manager writes to\nCloud Logging, such as certificate expiration. For instructions, see\n[Configure log-based alerts](/logging/docs/alerting/log-based-alerts).\n\nFor example, to configure an alert for certificates that have expired, use the following as the alert query: \n\n```\nlogName = \"projects/PROJECT_ID/logs/certificatemanager.googleapis.com%2Fcertificates_expiry\" AND jsonPayload.state = \"EXPIRED\"\n```\n\nIf you want to configure an alert for certificates that are close to expiration, use the following as the alert query: \n\n```\nlogName = \"projects/PROJECT_ID/logs/certificatemanager.googleapis.com%2Fcertificates_expiry\" AND jsonPayload.state = \"CLOSE_TO_EXPIRY\"\n```\n\nReplace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the ID of the target Google Cloud project.\n\nFor Google-managed certificates `CLOSE_TO_EXPIRY` logs are generated daily, starting 5-10 days before\nexpiration, depending on the certificate's lifetime and renewal process. For self-managed\ncertificates too, `CLOSE_TO_EXPIRY` logs are generated daily, starting 10 days before expiration.\n\nMetrics\n-------\n\nThis section lists the metrics supported by Certificate Manager.\nTo view Certificate Manager metrics, use the\n[Metrics Explorer](https://console.cloud.google.com/monitoring/metrics-explorer) in the\nGoogle Cloud console.\n\n### Standard metrics\n\nCertificate Manager writes the following standard\nCloud Monitoring API metrics:\n\n### Custom metrics\n\nAdditionally, Certificate Manager writes the following custom\nmetrics using the Cloud Monitoring API:\n\nWhat's next\n-----------\n\n- [Deploy a Google-managed certificate with DNS authorization (tutorial)](/certificate-manager/docs/deploy-google-managed-dns-auth)\n- [Deploy a Google-managed certificate with load balancer authorization (tutorial)](/certificate-manager/docs/deploy-google-managed-lb-auth)\n- [Deploy a Google-managed certificate with CA Service (tutorial)](/certificate-manager/docs/deploy-google-managed-cas)\n- [Deploy a self-managed certificate (tutorial)](/certificate-manager/docs/deploy-self-managed)\n- [Migrate a certificate to Certificate Manager](/certificate-manager/docs/migrate)\n- [Manage certificates](/certificate-manager/docs/certificates)\n- [Manage certificate maps](/certificate-manager/docs/maps)\n- [Manage certificate map entries](/certificate-manager/docs/map-entries)\n- [Manage DNS authorizations](/certificate-manager/docs/dns-authorizations)"]]