이 문서에서는 Google Cloud Managed Service for Prometheus에서 사용할Google Cloud 프로젝트의 측정항목 범위를 구성하는 방법을 설명합니다.
이상적인 Managed Service for Prometheus 배포는 필요에 따라 일반적인 Prometheus 배포와 다릅니다. Prometheus 범위는 데이터를 수집하는 자체 Prometheus 서버에서 실행되는 규칙과 쿼리에서 자체 인스턴스(일반적으로 클러스터 범위)로 지정됩니다.
Managed Service for Prometheus는 데이터를 전역 백엔드인 Monarch로 전송하므로 쿼리가 로컬 클러스터가 아닌 Monarch에 대해 실행되도록 구성해야 합니다. 관리형 컬렉션을 사용하는 경우 같은 요구사항이 규칙에 적용됩니다.
Managed Service for Prometheus를 사용하여 쿼리하는 데이터는 데이터 쿼리 방식에 관계없이 Cloud Monitoring 구문 측정항목 범위에 따라 결정됩니다.
측정항목 범위
Monitoring 측정항목 범위는 여러 Google Cloud 프로젝트에 속하는 측정항목 데이터를 쿼리할 수 있게 해주는 읽기 전용 구문입니다. 모든 측정항목 범위는 범위 지정 프로젝트라고 부르는 지정된 Google Cloud 프로젝트에서 호스팅됩니다.
기본적으로 프로젝트는 자체 측정항목 범위에 대한 범위 지정 프로젝트이고, 측정항목 범위에는 해당 프로젝트에 대한 측정항목 및 구성이 포함되어 있습니다. 범위 지정 프로젝트는 측정항목 범위에 모니터링 프로젝트를 두 개 이상 가질 수 있으며 측정항목 범위에 있는 모든 모니터링 프로젝트의 측정항목과 구성은 범위 지정 프로젝트에 표시됩니다. 또한 모니터링 프로젝트는 측정항목 범위 두 개 이상에 포함될 수 있습니다.
범위 지정 프로젝트에서 측정항목을 쿼리하고 해당 범위 지정 프로젝트가 멀티 프로젝트 측정항목 범위를 호스팅하는 여러 프로젝트에서 데이터를 검색할 수 있습니다. 측정항목 범위에 모든 프로젝트가 포함되면 쿼리와 규칙이 전역적으로 평가됩니다.
범위 지정 프로젝트 및 측정항목 범위에 대한 자세한 내용은 측정항목 범위를 참조하세요. 다중 프로젝트 측정항목 범위 구성에 대한 자세한 내용은 다중 프로젝트의 측정항목 보기를 참조하세요.
권한 모델 복잡성을 최소화하려면 측정항목 범위를 가능한 적게 사용합니다. 측정항목 데이터가 민감하다고 간주되지 않고 모든 사용자가 모든 측정항목에 액세스할 수 있도록 허용하려면 모든 프로젝트가 포함된 단일 측정항목 범위를 사용합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Configuring your metrics scopes\n\nThis document describes how to configure the metrics scopes of your\nGoogle Cloud projects for use with Google Cloud Managed Service for Prometheus.\n\nThe ideal Managed Service for Prometheus deployment is different from the\ntypical Prometheus deployment by necessity. Prometheus is highly scoped to\nits own instance---which is itself typically cluster-scoped---in that\nrules and queries run on the Prometheus server that collects the data.\nBecause Managed Service for Prometheus sends data to the global backend,\n[Monarch](https://research.google/pubs/pub50652/), queries must be configured to execute against\nMonarch, not the local cluster. If you are using managed collection,\nthen the same requirement applies to rules.\n\nThe data you query using Managed Service for Prometheus is determined\nby the Cloud Monitoring construct *metrics scope*, regardless of\nhow you query the data.\n\nMetrics scopes\n--------------\n\nA Monitoring metrics scope is a read-time-only construct that\nlets you query metric data belonging to multiple Google Cloud projects. Every\nmetrics scope is hosted by a designated Google Cloud project, called the\n*scoping project*.\n\nBy default, a project is the scoping project for its own metrics scope,\nand the metrics scope contains the metrics and configuration for that\nproject. A scoping project can have more than one monitored project in its\nmetrics scope, and the metrics and configurations from all the monitored\nprojects in the metrics scope are visible to the scoping project. A\nmonitored project can also belong to more than one metrics scope.\n\nWhen you query the metrics in a scoping project, and if that\nscoping project hosts a multi-project metrics scope, you can retrieve\ndata from multiple projects. If your metrics scope contains all your\nprojects, then your queries and rules evaluate globally.\n\nFor more information about scoping projects and metrics scope,\nsee [Metrics scopes](/monitoring/settings#concept-scope). For information about configuring\nmulti-project metrics scope, see [View metrics for multiple\nprojects](/monitoring/settings/multiple-projects).\n\nTo minimize the complexity of your permissions model, use as few metrics\nscopes as possible. If you do not consider your metric data to be sensitive\nand it is acceptable for all users to be able to access all metrics,\nthen use a single metrics scope that contains all your projects.\n\nGrouping projects together for querying\n---------------------------------------\n\nThe other best-practice scenarios use the following metrics-scope\nconfigurations:"]]