Skip to content

Commit

Permalink
Add alerting options for datasources
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Benjamin <joshua.benjamin@iherb.com>
  • Loading branch information
annymsMthd committed Mar 12, 2022
1 parent 8d38e61 commit ebfd46b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/integreatly/v1alpha1/grafanadatasource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ type GrafanaDataSourceJsonData struct {
Server string `json:"server,omitempty"`
Port int `json:"port,omitempty"`
Username string `json:"username,omitempty"`
// ManageAlerts turns on alert management from UI
ManageAlerts bool `json:"manageAlerts,omitempty"`
// AlertManagerUID if null use the internal grafana alertmanager
AlertManagerUID string `json:"alertmanagerUid,omitempty"`
}

type GrafanaDataSourceJsonDerivedFields struct {
Expand Down
1 change: 1 addition & 0 deletions api/integreatly/v1alpha1/zz_generated.deepcopy.go

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

5 changes: 5 additions & 0 deletions config/crd/bases/integreatly.org_grafanadatasources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ spec:
https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning
See https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44
type: boolean
alertmanagerUid:
type: string
allowInfraExplore:
type: boolean
apiToken:
Expand Down Expand Up @@ -176,6 +178,9 @@ spec:
type: string
logMessageField:
type: string
manageAlerts:
description: Fields for monitoring
type: boolean
maxIdleConns:
type: integer
maxLines:
Expand Down
5 changes: 5 additions & 0 deletions deploy/manifests/latest/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ spec:
https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning
See https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44
type: boolean
alertmanagerUid:
type: string
allowInfraExplore:
type: boolean
apiToken:
Expand Down Expand Up @@ -284,6 +286,9 @@ spec:
type: string
logMessageField:
type: string
manageAlerts:
description: Fields for monitoring
type: boolean
maxIdleConns:
type: integer
maxLines:
Expand Down

0 comments on commit ebfd46b

Please sign in to comment.