Skip to content

Commit

Permalink
feat: get alerting schemas from foundation-sdk (#210)
Browse files Browse the repository at this point in the history
* feat: get alerting schemas from foundation-sdk

This also updates the generator code:
- pin to a specific version of the foundation-sdk (in `generator/jsonnetfile.lock.json`)
- use `jrsonnet` consistently (increase performance of generation process)

* chore: run make -B generate

* chore: remove unused patch
  • Loading branch information
Duologic authored Jun 4, 2024
1 parent 144f6cb commit 119d653
Show file tree
Hide file tree
Showing 40 changed files with 399 additions and 1,549 deletions.
17 changes: 10 additions & 7 deletions docs/API/alerting/contactPoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ PARAMETERS:
* **value** (`boolean`)
- default value: `true`


EmbeddedContactPoint is the contact point type that is used
by grafanas embedded alertmanager implementation.
### fn withName

```jsonnet
Expand All @@ -39,8 +40,8 @@ PARAMETERS:

* **value** (`string`)

Name is used as grouping key in the UI. Contact points with the
same name will be grouped in the UI.
EmbeddedContactPoint is the contact point type that is used
by grafanas embedded alertmanager implementation.
### fn withProvenance

```jsonnet
Expand All @@ -51,7 +52,8 @@ PARAMETERS:

* **value** (`string`)


EmbeddedContactPoint is the contact point type that is used
by grafanas embedded alertmanager implementation.
### fn withSettings

```jsonnet
Expand Down Expand Up @@ -85,7 +87,8 @@ PARAMETERS:
* **value** (`string`)
- valid values: `"alertmanager"`, `" dingding"`, `" discord"`, `" email"`, `" googlechat"`, `" kafka"`, `" line"`, `" opsgenie"`, `" pagerduty"`, `" pushover"`, `" sensugo"`, `" slack"`, `" teams"`, `" telegram"`, `" threema"`, `" victorops"`, `" webhook"`, `" wecom"`


EmbeddedContactPoint is the contact point type that is used
by grafanas embedded alertmanager implementation.
### fn withUid

```jsonnet
Expand All @@ -96,5 +99,5 @@ PARAMETERS:

* **value** (`string`)

UID is the unique identifier of the contact point. The UID can be
set by the user.
EmbeddedContactPoint is the contact point type that is used
by grafanas embedded alertmanager implementation.
2 changes: 1 addition & 1 deletion docs/API/alerting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ grafonnet.alerting
## Subpackages

* [contactPoint](contactPoint.md)
* [messageTemplate](messageTemplate.md)
* [muteTiming](muteTiming/index.md)
* [notificationPolicy](notificationPolicy/index.md)
* [notificationTemplate](notificationTemplate.md)
* [ruleGroup](ruleGroup/index.md)
32 changes: 22 additions & 10 deletions docs/API/alerting/notificationPolicy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ PARAMETERS:

* **value** (`string`)


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withContinue

```jsonnet
Expand All @@ -46,7 +47,8 @@ PARAMETERS:
* **value** (`boolean`)
- default value: `true`


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withGroupBy

```jsonnet
Expand All @@ -57,7 +59,8 @@ PARAMETERS:

* **value** (`array`)


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withGroupByMixin

```jsonnet
Expand All @@ -68,7 +71,8 @@ PARAMETERS:

* **value** (`array`)


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withGroupInterval

```jsonnet
Expand All @@ -79,7 +83,8 @@ PARAMETERS:

* **value** (`string`)


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withGroupWait

```jsonnet
Expand All @@ -90,7 +95,8 @@ PARAMETERS:

* **value** (`string`)


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withMatchers

```jsonnet
Expand Down Expand Up @@ -127,7 +133,8 @@ PARAMETERS:

* **value** (`array`)


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withMuteTimeIntervalsMixin

```jsonnet
Expand All @@ -138,7 +145,8 @@ PARAMETERS:

* **value** (`array`)


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withPolicy

```jsonnet
Expand All @@ -149,7 +157,8 @@ PARAMETERS:

* **value** (`array`)


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withPolicyMixin

```jsonnet
Expand All @@ -160,7 +169,8 @@ PARAMETERS:

* **value** (`array`)


A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
### fn withRepeatInterval

```jsonnet
Expand All @@ -171,3 +181,5 @@ PARAMETERS:

* **value** (`string`)

A Route is a node that contains definitions of how to handle alerts. This is modified
from the upstream alertmanager in that it adds the ObjectMatchers property.
2 changes: 1 addition & 1 deletion docs/API/alerting/notificationPolicy/matcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PARAMETERS:
* **value** (`string`)
- valid values: `"="`, `"!="`, `"=~"`, `"!~"`

MatchType is an enum for label matching types.

### fn withValue

```jsonnet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# messageTemplate
# notificationTemplate

grafonnet.alerting.messageTemplate
grafonnet.alerting.notificationTemplate

## Index

* [`fn withName(value)`](#fn-withname)
* [`fn withProvenance(value)`](#fn-withprovenance)
* [`fn withTemplate(value)`](#fn-withtemplate)

## Fields
Expand All @@ -20,6 +21,17 @@ PARAMETERS:
* **value** (`string`)


### fn withProvenance

```jsonnet
withProvenance(value)
```

PARAMETERS:

* **value** (`string`)


### fn withTemplate

```jsonnet
Expand Down
2 changes: 1 addition & 1 deletion docs/API/alerting/ruleGroup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ PARAMETERS:

* **value** (`integer`)


Duration in seconds.
### fn withName

```jsonnet
Expand Down
19 changes: 7 additions & 12 deletions docs/API/alerting/ruleGroup/rule/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PARAMETERS:

* **value** (`string`)

Grafana data source unique identifier; it should be '__expr__' for a Server Side Expression operation.

### fn withModel

```jsonnet
Expand All @@ -38,7 +38,7 @@ PARAMETERS:

* **value** (`object`)

JSON is the raw JSON query and includes the above properties as well as custom properties.

### fn withModelMixin

```jsonnet
Expand All @@ -49,7 +49,7 @@ PARAMETERS:

* **value** (`object`)

JSON is the raw JSON query and includes the above properties as well as custom properties.

### fn withQueryType

```jsonnet
Expand All @@ -60,8 +60,7 @@ PARAMETERS:

* **value** (`string`)

QueryType is an optional identifier for the type of query.
It can be used to distinguish different types of queries.

### fn withRefId

```jsonnet
Expand All @@ -72,7 +71,7 @@ PARAMETERS:

* **value** (`string`)

RefID is the unique identifier of the query, set by the frontend call.

### fn withRelativeTimeRange

```jsonnet
Expand Down Expand Up @@ -110,9 +109,7 @@ PARAMETERS:

* **value** (`integer`)

A Duration represents the elapsed time between two instants
as an int64 nanosecond count. The representation limits the
largest representable duration to approximately 290 years.
Duration in seconds.
#### fn relativeTimeRange.withTo

```jsonnet
Expand All @@ -123,6 +120,4 @@ PARAMETERS:

* **value** (`integer`)

A Duration represents the elapsed time between two instants
as an int64 nanosecond count. The representation limits the
largest representable duration to approximately 290 years.
Duration in seconds.
7 changes: 3 additions & 4 deletions docs/API/alerting/ruleGroup/rule/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,10 @@ withFor(value)

PARAMETERS:

* **value** (`integer`)
* **value** (`string`)

A Duration represents the elapsed time between two instants
as an int64 nanosecond count. The representation limits the
largest representable duration to approximately 290 years.
The amount of time, in seconds, for which the rule must be breached for the rule to be considered to be Firing.
Before this time has elapsed, the rule is only considered to be Pending.
### fn withIsPaused

```jsonnet
Expand Down
2 changes: 1 addition & 1 deletion gen/grafonnet-v11.0.0/alerting.libsonnet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions gen/grafonnet-v11.0.0/clean/alerting/contactPoint.libsonnet

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions gen/grafonnet-v11.0.0/clean/alerting/messageTemplate.libsonnet

This file was deleted.

Loading

0 comments on commit 119d653

Please sign in to comment.