9장. 프로메테우스 규칙 [monitoring.coreos.com/v1]


설명

PrometheusRule 사용자 정의 리소스 정의(CRD)는 Prometheus 또는 ThanosRuler 개체에서 평가되는 [알림]( https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ ) 및 [녹음]( https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/ ) 규칙을 정의합니다.

PrometheusThanosRuler 객체는 레이블 및 네임스페이스 선택기를 사용하여 PrometheusRule 객체를 선택합니다.

유형
object
필수 항목
  • spec

9.1. 사양

Expand
재산유형설명

apiVersion

string

APIVersion은 버전이 지정된 이 오브젝트 표현의 스키마를 정의합니다. 서버는 인식된 스키마를 최신 내부 값으로 변환해야 하며, 인식되지 않는 값을 거부할 수 있습니다. 자세한 정보: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

string

kind는 이 오브젝트가 나타내는 REST 리소스에 해당하는 문자열 값입니다. 서버는 클라이언트에서 요청을 제출한 끝점에서 이를 유추할 수 있습니다. CamelCase로 업데이트할 수 없습니다. 자세한 정보: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

메타데이터

ObjectMeta

표준 객체의 메타데이터. 자세한 정보: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

object

Prometheus에 대한 원하는 알림 규칙 정의 사양입니다.

9.1.1. .spec

설명
Prometheus에 대한 원하는 알림 규칙 정의 사양입니다.
유형
object
Expand
재산유형설명

groups

array

Prometheus 규칙 파일의 내용

groups[]

object

RuleGroup은 순차적으로 평가된 기록 및 알림 규칙의 목록입니다.

9.1.2. .spec.groups

설명
Prometheus 규칙 파일의 내용
유형
array

9.1.3. .spec.groups[]

설명
RuleGroup은 순차적으로 평가된 기록 및 알림 규칙의 목록입니다.
유형
object
필수 항목
  • name
Expand
재산유형설명

간격

string

간격은 그룹 내 규칙이 평가되는 빈도를 결정합니다.

labels

객체(문자열)

결과를 규칙에 따라 저장하기 전에 추가하거나 덮어쓸 레이블입니다. 규칙 수준에서 정의된 레이블이 우선합니다.

Prometheus 3.0.0 이상이 필요합니다. Thanos Ruler의 경우 필드가 무시됩니다.

limit

integer

알림 규칙과 녹음 규칙이 생성할 수 있는 알림 수를 제한합니다. Limit은 Prometheus >= 2.31 및 Thanos Ruler >= 0.24부터 지원됩니다.

name

string

규칙 그룹의 이름입니다.

partial_response_strategy

string

PartialResponseStrategy는 ThanosRuler에서만 사용되며 Prometheus 인스턴스에서는 무시됩니다. 자세한 정보: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response

query_offset

string

이 특정 그룹의 규칙 평가 타임스탬프를 지정된 기간만큼 과거로 오프셋하여 정의합니다.

Prometheus >= v2.53.0이 필요합니다. ThanosRuler에서는 지원되지 않습니다.

규칙

array

알림 및 녹음 규칙 목록입니다.

rules[]

object

규칙은 경고 또는 녹음 규칙을 설명합니다. Prometheus 설명서를 참조하세요: [경고]( https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ ) 또는 [녹음]( https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules ) 규칙

9.1.4. .spec.groups[].rules

설명
알림 및 녹음 규칙 목록입니다.
유형
array

9.1.5. .spec.groups[].rules[]

설명
규칙은 경고 또는 녹음 규칙을 설명합니다. Prometheus 설명서를 참조하세요: [경고]( https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ ) 또는 [녹음]( https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules ) 규칙
유형
object
필수 항목
  • 표현
Expand
재산유형설명

경고

string

알림의 이름입니다. 유효한 레이블 값이어야 합니다. 기록알림 중 하나만 설정해야 합니다.

annotations

객체(문자열)

각 알림에 추가할 주석입니다. 알림 규칙에만 유효합니다.

표현

integer-or-string

평가할 PromQL 표현식입니다.

~을 위한

string

알림은 일정 시간 동안 반환되면 실행된 것으로 간주됩니다.

keep_firing_for

string

KeepFiringFor는 경고를 발생시킨 조건이 사라진 후에도 경고가 계속 실행되는 시간을 정의합니다.

labels

객체(문자열)

추가하거나 덮어쓸 라벨입니다.

기록

string

출력할 시계열의 이름입니다. 유효한 메트릭 이름이어야 합니다. 기록알림 중 하나만 설정해야 합니다.

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat