diff --git a/doc/prometheus.md b/doc/prometheus.md index dd1d00c0c..b338f6a7b 100644 --- a/doc/prometheus.md +++ b/doc/prometheus.md @@ -1,6 +1,6 @@ # TL;DR -We deploy [prometheus](https://prometheus.io) onto a kubernetes cluster with `kube-setup-prometheus`. +We deploy [prometheus](https://prometheus.io) like database called mimir onto a kubernetes cluster with `kube-setup-monitoring`. ## Overview diff --git a/gen3/bin/kube-roll-all.sh b/gen3/bin/kube-roll-all.sh index 744e8e288..d382084fe 100644 --- a/gen3/bin/kube-roll-all.sh +++ b/gen3/bin/kube-roll-all.sh @@ -265,7 +265,7 @@ gen3 kube-setup-revproxy if [[ "$GEN3_ROLL_FAST" != "true" ]]; then if g3k_manifest_lookup .global.argocd 2> /dev/null; then - gen3 kube-setup-prometheus + gen3 kube-setup-monitoring fi # Internal k8s systems gen3 kube-setup-fluentd & diff --git a/gen3/bin/kube-setup-ambassador.sh b/gen3/bin/kube-setup-ambassador.sh index 5f92af5cc..95e6593d5 100644 --- a/gen3/bin/kube-setup-ambassador.sh +++ b/gen3/bin/kube-setup-ambassador.sh @@ -68,11 +68,11 @@ case "$command" in ;; "hatchery") deploy_hatchery_proxy "$@" - gen3 kube-setup-prometheus prometheus + gen3 kube-setup-monitoring ;; *) deploy_hatchery_proxy "$@" deploy_api_gateway "$@" - gen3 kube-setup-prometheus prometheus + gen3 kube-setup-monitoring ;; esac \ No newline at end of file diff --git a/gen3/bin/prometheus.sh b/gen3/bin/prometheus.sh index 1d71c6a7a..d50ab92cc 100644 --- a/gen3/bin/prometheus.sh +++ b/gen3/bin/prometheus.sh @@ -5,8 +5,7 @@ source "${GEN3_HOME}/gen3/lib/utils.sh" gen3_load "gen3/gen3setup" -#export GEN3_PROMHOST="${GEN3_PROMHOST:-"http://prometheus-server.prometheus.svc.cluster.local"}" -export GEN3_PROMHOST="${GEN3_PROMHOST:-"http://prometheus-operated.monitoring.svc.cluster.local:9090"}" +export GEN3_PROMHOST="${GEN3_PROMHOST:-"http://monitoring-mimir-nginx.monitoring.svc.cluster.local"}" gen3_prom_help() { gen3 help prometheus diff --git a/kube/services/revproxy/gen3.nginx.conf/prometheus-server.conf b/kube/services/revproxy/gen3.nginx.conf/prometheus-server.conf index c936f541e..50e9f0d60 100644 --- a/kube/services/revproxy/gen3.nginx.conf/prometheus-server.conf +++ b/kube/services/revproxy/gen3.nginx.conf/prometheus-server.conf @@ -1,4 +1,4 @@ - location /prometheus/ { + location /prometheus/ { error_page 403 @errorworkspace; set $authz_resource "/prometheus"; set $authz_method "access"; @@ -7,13 +7,13 @@ auth_request /gen3-authz; set $proxy_service "prometheus"; - set $upstream http://prometheus-kube-prometheus-prometheus.monitoring.svc.cluster.local:9090; + set $upstream http://monitoring-mimir-nginx.monitoring.svc.cluster.local; rewrite ^/prometheus/(.*) /$1 break; proxy_pass $upstream; - } - location /grafana/ { + } + location /grafana/ { error_page 403 @errorworkspace; set $authz_resource "/prometheus"; set $authz_method "access"; @@ -24,52 +24,9 @@ proxy_set_header Host $http_host; set $proxy_service "grafana"; - set $upstream http://prometheus-grafana.monitoring.svc.cluster.local; + set $upstream http://monitoring-grafana.monitoring.svc.cluster.local; rewrite ^/grafana/(.*) /$1 break; proxy_pass $upstream; - } - location /alertmanager/ { - error_page 403 @errorworkspace; - set $authz_resource "/prometheus"; - set $authz_method "access"; - set $authz_service "prometheus"; - # be careful - sub-request runs in same context as this request - auth_request /gen3-authz; - - set $proxy_service "alertmanager"; - set $upstream http://alertmanager-operated.monitoring.svc.cluster.local:9093; - - #rewrite ^/alertmanager/(.*) /$1 break; - - proxy_pass $upstream; - } - location /thanos-query/ { - error_page 403 @errorworkspace; - set $authz_resource "/prometheus"; - set $authz_method "access"; - set $authz_service "prometheus"; - # be careful - sub-request runs in same context as this request - auth_request /gen3-authz; - - set $proxy_service "thanos-query"; - set $upstream http://thanos-query.monitoring.svc.cluster.local:9090; - - proxy_pass $upstream; - } - location /thanos-compactor/ { - error_page 403 @errorworkspace; - set $authz_resource "/prometheus"; - set $authz_method "access"; - set $authz_service "prometheus"; - # be careful - sub-request runs in same context as this request - auth_request /gen3-authz; - - set $proxy_service "thanos-compactor"; - set $upstream http://thanos-compactor.monitoring.svc.cluster.local:10902; - - rewrite ^/thanos-compactor/(.*) /$1 break; - - proxy_pass $upstream; - } \ No newline at end of file + } \ No newline at end of file