-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add new monitoring stack * fix makefile and add prow monitoring * fi whitespace
- Loading branch information
Showing
9 changed files
with
290 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
resource "google_monitoring_alert_policy" "boskos_alerts" { | ||
count = length(var.allowed_list) == 0 ? 1 : 0 | ||
project = var.project | ||
display_name = "boskos-alerts" | ||
combiner = "OR" # required | ||
|
||
conditions { | ||
display_name = "Boskos ran out of resources" | ||
|
||
condition_monitoring_query_language { | ||
duration = "0s" | ||
query = <<-EOT | ||
fetch prometheus_target | ||
| metric 'prometheus.googleapis.com/boskos_resources/gauge' | ||
| { | ||
t_0: | ||
filter state == 'free' | ||
; | ||
t_1: | ||
ident | ||
} | ||
| group_by [metric.type] | ||
| outer_join 0 | ||
| condition t_0.value_boskos_resources_aggregate == 0 && t_1.value_boskos_resources_aggregate > 5 | ||
| window 1m | ||
EOT | ||
trigger { | ||
count = 1 | ||
} | ||
} | ||
} | ||
|
||
documentation { | ||
content = "Boskos ran out of resources" | ||
mime_type = "text/markdown" | ||
} | ||
|
||
# gcloud beta monitoring channels list --project=oss-prow | ||
# notification_channels = ["projects/${var.project}/notificationChannels/${var.notification_channel_id}"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
variable "project" { | ||
type = string | ||
} | ||
|
||
variable "notification_channel_id" { | ||
type = string | ||
} | ||
|
||
variable "allowed_list" { | ||
type = set(string) | ||
default = [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
# These will be consumed by GKE Managed Prometheus(GMP) services in the cluster. | ||
# (Not related to prometheus-operator). | ||
# Ref: | ||
# https://cloud.google.com/stackdriver/docs/managed-prometheus/setup-managed#gmp-pod-monitoring. | ||
--- | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app: deck | ||
name: deck | ||
namespace: default | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
scheme: http | ||
selector: | ||
matchLabels: | ||
app: deck | ||
--- | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app: ghproxy | ||
name: ghproxy | ||
namespace: default | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
scheme: http | ||
selector: | ||
matchLabels: | ||
app: ghproxy | ||
--- | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app: hook | ||
name: hook | ||
namespace: default | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
scheme: http | ||
selector: | ||
matchLabels: | ||
app: hook | ||
--- | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app: plank | ||
name: plank | ||
namespace: default | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
scheme: http | ||
selector: | ||
matchLabels: | ||
app: prow-controller-manager | ||
--- | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app: sinker | ||
name: sinker | ||
namespace: default | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
scheme: http | ||
selector: | ||
matchLabels: | ||
app: sinker | ||
--- | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app: tide | ||
name: tide | ||
namespace: default | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
scheme: http | ||
selector: | ||
matchLabels: | ||
app: tide | ||
--- | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app: horologium | ||
name: horologium | ||
namespace: default | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
scheme: http | ||
selector: | ||
matchLabels: | ||
app: horologium | ||
--- | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app: crier | ||
name: crier | ||
namespace: default | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
scheme: http | ||
selector: | ||
matchLabels: | ||
app: crier | ||
|
||
--- | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kubernetes-external-secrets | ||
app: kubernetes-external-secrets | ||
name: kubernetes-external-secrets | ||
namespace: default | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: prometheus | ||
scheme: http | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: kubernetes-external-secrets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: monitoring.googleapis.com/v1 | ||
kind: PodMonitoring | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: external-secrets | ||
name: external-secrets | ||
namespace: default | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: external-secrets | ||
endpoints: | ||
- port: metrics | ||
interval: 30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters