0a85a30642
The first version of the app platform apis for alerting rules, including AlertRule and RecordingRule definitions. Co-authored-by: William Wernert <william.wernert@grafana.com>
314 lines
15 KiB
YAML
314 lines
15 KiB
YAML
apiVersion: apps.grafana.com/v1alpha1
|
|
kind: AppManifest
|
|
metadata:
|
|
name: alerting
|
|
spec:
|
|
appName: alerting
|
|
group: rules.alerting.grafana.app
|
|
versions:
|
|
- name: v0alpha1
|
|
served: true
|
|
kinds:
|
|
- kind: AlertRule
|
|
plural: AlertRules
|
|
scope: Namespaced
|
|
schema:
|
|
spec:
|
|
properties:
|
|
annotations:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
data:
|
|
additionalProperties:
|
|
properties:
|
|
datasourceUID:
|
|
pattern: ^[a-zA-Z0-9_-]+$
|
|
type: string
|
|
model: {}
|
|
queryType:
|
|
type: string
|
|
relativeTimeRange:
|
|
properties:
|
|
from:
|
|
pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)$
|
|
type: string
|
|
to:
|
|
pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)$
|
|
type: string
|
|
required:
|
|
- from
|
|
- to
|
|
type: object
|
|
source:
|
|
type: boolean
|
|
required:
|
|
- queryType
|
|
- datasourceUID
|
|
- model
|
|
type: object
|
|
type: object
|
|
execErrState:
|
|
default: Error
|
|
enum:
|
|
- Error
|
|
- Ok
|
|
- Alerting
|
|
- KeepLast
|
|
type: string
|
|
for:
|
|
allOf:
|
|
- pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?|0)$
|
|
- not:
|
|
pattern: hmuµn
|
|
type: string
|
|
keepFiringFor:
|
|
allOf:
|
|
- pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?|0)$
|
|
- not:
|
|
pattern: hmuµn
|
|
type: string
|
|
labels:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
missingSeriesEvalsToResolve:
|
|
minimum: 0
|
|
type: integer
|
|
noDataState:
|
|
default: NoData
|
|
enum:
|
|
- NoData
|
|
- Ok
|
|
- Alerting
|
|
- KeepLast
|
|
type: string
|
|
notificationSettings:
|
|
properties:
|
|
activeTimeIntervals:
|
|
items:
|
|
type: string
|
|
type: array
|
|
groupBy:
|
|
items:
|
|
type: string
|
|
type: array
|
|
groupInterval:
|
|
allOf:
|
|
- pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?|0)$
|
|
- not:
|
|
pattern: hmuµn
|
|
type: string
|
|
groupWait:
|
|
allOf:
|
|
- pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?|0)$
|
|
- not:
|
|
pattern: hmuµn
|
|
type: string
|
|
muteTimeIntervals:
|
|
items:
|
|
type: string
|
|
type: array
|
|
receiver:
|
|
type: string
|
|
repeatInterval:
|
|
allOf:
|
|
- pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?|0)$
|
|
- not:
|
|
pattern: hmuµn
|
|
type: string
|
|
required:
|
|
- receiver
|
|
type: object
|
|
panelRef:
|
|
properties:
|
|
dashboardUID:
|
|
minLength: 1
|
|
pattern: ^[a-zA-Z0-9_-]+$
|
|
type: string
|
|
panelID:
|
|
exclusiveMinimum: true
|
|
minimum: 0
|
|
type: integer
|
|
required:
|
|
- dashboardUID
|
|
- panelID
|
|
type: object
|
|
paused:
|
|
type: boolean
|
|
title:
|
|
type: string
|
|
trigger:
|
|
properties:
|
|
interval:
|
|
allOf:
|
|
- pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?|0)$
|
|
- not:
|
|
pattern: hmuµn
|
|
type: string
|
|
required:
|
|
- interval
|
|
type: object
|
|
required:
|
|
- title
|
|
- data
|
|
- trigger
|
|
- noDataState
|
|
- execErrState
|
|
type: object
|
|
x-kubernetes-preserve-unknown-fields: true
|
|
status:
|
|
properties:
|
|
additionalFields:
|
|
description: additionalFields is reserved for future use
|
|
type: object
|
|
x-kubernetes-preserve-unknown-fields: true
|
|
operatorStates:
|
|
additionalProperties:
|
|
properties:
|
|
descriptiveState:
|
|
description: descriptiveState is an optional more descriptive state field which has no requirements on format
|
|
type: string
|
|
details:
|
|
description: details contains any extra information that is operator-specific
|
|
type: object
|
|
x-kubernetes-preserve-unknown-fields: true
|
|
lastEvaluation:
|
|
description: lastEvaluation is the ResourceVersion last evaluated
|
|
type: string
|
|
state:
|
|
description: |-
|
|
state describes the state of the lastEvaluation.
|
|
It is limited to three possible states for machine evaluation.
|
|
enum:
|
|
- success
|
|
- in_progress
|
|
- failed
|
|
type: string
|
|
required:
|
|
- lastEvaluation
|
|
- state
|
|
type: object
|
|
description: |-
|
|
operatorStates is a map of operator ID to operator state evaluations.
|
|
Any operator which consumes this kind SHOULD add its state evaluation information to this field.
|
|
type: object
|
|
type: object
|
|
selectableFields:
|
|
- spec.title
|
|
- spec.paused
|
|
- spec.panelRef.dashboardUID
|
|
- spec.panelRef.panelID
|
|
- spec.notificationSettings.receiver
|
|
conversion: false
|
|
- kind: RecordingRule
|
|
plural: RecordingRules
|
|
scope: Namespaced
|
|
schema:
|
|
spec:
|
|
properties:
|
|
data:
|
|
additionalProperties:
|
|
properties:
|
|
datasourceUID:
|
|
pattern: ^[a-zA-Z0-9_-]+$
|
|
type: string
|
|
model: {}
|
|
queryType:
|
|
type: string
|
|
relativeTimeRange:
|
|
properties:
|
|
from:
|
|
pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)$
|
|
type: string
|
|
to:
|
|
pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)$
|
|
type: string
|
|
required:
|
|
- from
|
|
- to
|
|
type: object
|
|
source:
|
|
type: boolean
|
|
required:
|
|
- queryType
|
|
- datasourceUID
|
|
- model
|
|
type: object
|
|
type: object
|
|
labels:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
metric:
|
|
pattern: ^[a-zA-Z_:][a-zA-Z0-9_:]*$
|
|
type: string
|
|
paused:
|
|
type: boolean
|
|
targetDatasourceUID:
|
|
pattern: ^[a-zA-Z0-9_-]+$
|
|
type: string
|
|
title:
|
|
type: string
|
|
trigger:
|
|
properties:
|
|
interval:
|
|
allOf:
|
|
- pattern: ^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?|0)$
|
|
- not:
|
|
pattern: hmuµn
|
|
type: string
|
|
required:
|
|
- interval
|
|
type: object
|
|
required:
|
|
- title
|
|
- data
|
|
- trigger
|
|
- metric
|
|
- targetDatasourceUID
|
|
type: object
|
|
x-kubernetes-preserve-unknown-fields: true
|
|
status:
|
|
properties:
|
|
additionalFields:
|
|
description: additionalFields is reserved for future use
|
|
type: object
|
|
x-kubernetes-preserve-unknown-fields: true
|
|
operatorStates:
|
|
additionalProperties:
|
|
properties:
|
|
descriptiveState:
|
|
description: descriptiveState is an optional more descriptive state field which has no requirements on format
|
|
type: string
|
|
details:
|
|
description: details contains any extra information that is operator-specific
|
|
type: object
|
|
x-kubernetes-preserve-unknown-fields: true
|
|
lastEvaluation:
|
|
description: lastEvaluation is the ResourceVersion last evaluated
|
|
type: string
|
|
state:
|
|
description: |-
|
|
state describes the state of the lastEvaluation.
|
|
It is limited to three possible states for machine evaluation.
|
|
enum:
|
|
- success
|
|
- in_progress
|
|
- failed
|
|
type: string
|
|
required:
|
|
- lastEvaluation
|
|
- state
|
|
type: object
|
|
description: |-
|
|
operatorStates is a map of operator ID to operator state evaluations.
|
|
Any operator which consumes this kind SHOULD add its state evaluation information to this field.
|
|
type: object
|
|
type: object
|
|
selectableFields:
|
|
- spec.title
|
|
- spec.paused
|
|
conversion: false
|
|
preferredVersion: ""
|