Description

PrometheusRule defines alerting rules for a Prometheus instance

Type

object

Required
  • spec

Specification

Property Type Description

.apiVersion

string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

.kind

string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

.metadata

ObjectMeta meta/v1

Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

.spec

object

Specification of desired alerting rule definitions for Prometheus.

.spec
Description

Specification of desired alerting rule definitions for Prometheus.

Type

object

Property Type Description

groups

array

Content of Prometheus rule file

groups[]

object

RuleGroup is a list of sequentially evaluated recording and alerting rules. Note: PartialResponseStrategy is only used by ThanosRuler and will be ignored by Prometheus instances. Valid values for this field are 'warn' or 'abort'. More info: https://github.com/thanos-io/thanos/blob/master/docs/components/rule.md#partial-response

.spec.groups
Description

Content of Prometheus rule file

Type

array

.spec.groups[]
Description

RuleGroup is a list of sequentially evaluated recording and alerting rules. Note: PartialResponseStrategy is only used by ThanosRuler and will be ignored by Prometheus instances. Valid values for this field are 'warn' or 'abort'. More info: https://github.com/thanos-io/thanos/blob/master/docs/components/rule.md#partial-response

Type

object

Required
  • name

  • rules

Property Type Description

interval

string

name

string

partial_response_strategy

string

rules

array

rules[]

object

Rule describes an alerting or recording rule.

.spec.groups[].rules
Description
Type

array

.spec.groups[].rules[]
Description

Rule describes an alerting or recording rule.

Type

object

Required
  • expr

Property Type Description

alert

string

annotations

object (string)

expr

integer-or-string

for

string

labels

object (string)

record

string