Skip to content

Commit

Permalink
Add initial autojoin monitoring configuration (#1047)
Browse files Browse the repository at this point in the history
* Add initial autojoin monitoring configuration
* Add AUTOJOIN_PROJECT variable for production
* Add todo to remove once we have a replacement gke cluster
  • Loading branch information
stephen-soltesz authored Jul 31, 2024
1 parent 3c8d3db commit 59bd2b7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/federation/prometheus/prometheus.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -801,3 +801,13 @@ scrape_configs:
regex: .*
target_label: __address__
replacement: switch-monitoring-service.default.svc.cluster.local:8080

# Scrape byos-nodes every minute.
- job_name: 'byos-nodes'
scrape_timeout: 40s
file_sd_configs:
- files:
- /byos-nodes/*.json
# Attempt to re-read files every five minutes.
refresh_interval: 5m
scheme: http
6 changes: 6 additions & 0 deletions k8s/prometheus-federation/deployments/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ spec:
- mountPath: /switch-monitoring-targets
name: prometheus-storage
subPath: switch-monitoring-targets
- mountPath: /byos-nodes
name: prometheus-storage
subPath: byos-nodes
# /etc/prometheus/prometheus.yml contains the M-Lab Prometheus config.
- mountPath: /etc/prometheus
name: prometheus-config
Expand Down Expand Up @@ -128,6 +131,9 @@ spec:
"--http-source=https://storage.googleapis.com/operator-{{GCLOUD_PROJECT}}/prometheus/bmc-targets/bmc_e2e.json",
"--http-target=/targets/switch-monitoring-targets/switch-monitoring.json",
"--http-source=https://storage.googleapis.com/operator-{{GCLOUD_PROJECT}}/prometheus/switch-monitoring-targets/switch-monitoring.json",
# TODO(soltesz): remove byos configuration in favor of separate deployment dedicated to autojoin platform & pipeline.
"--http-target=/targets/byos-nodes/byos-nodes.json",
"--http-source=https://autojoin-dot-{{AUTOJOIN_PROJECT}}.appspot.com/autojoin/v0/node/list?format=prometheus",
"--project={{GCLOUD_PROJECT}}",
"--prometheusx.listen-address=:9373"]
ports:
Expand Down
1 change: 1 addition & 0 deletions k8s/prometheus-federation/mlab-oti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

GCLOUD_PROJECT: mlab-oti
LOCATE_PROJECT: mlab-ns
AUTOJOIN_PROJECT: mlab-autojoin
PROMETHEUS_VOLUME_SIZE: 400Gi
EXTERNAL_IP: 35.184.81.106
GITHUB_RECEIVER_INMEMORY: false
Expand Down
1 change: 1 addition & 0 deletions k8s/prometheus-federation/mlab-sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

GCLOUD_PROJECT: mlab-sandbox
LOCATE_PROJECT: mlab-sandbox
AUTOJOIN_PROJECT: mlab-sandbox
PROMETHEUS_VOLUME_SIZE: 500Gi
EXTERNAL_IP: 35.184.166.181
GITHUB_RECEIVER_INMEMORY: true
Expand Down
1 change: 1 addition & 0 deletions k8s/prometheus-federation/mlab-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

GCLOUD_PROJECT: mlab-staging
LOCATE_PROJECT: mlab-staging
AUTOJOIN_PROJECT: mlab-staging
PROMETHEUS_VOLUME_SIZE: 400Gi
EXTERNAL_IP: 35.185.76.159
GITHUB_RECEIVER_INMEMORY: true
Expand Down

0 comments on commit 59bd2b7

Please sign in to comment.