Generate new secret for Prometheus ingress#
Important
This procedure applies only for products for which Prometheus Remote Write has been implemented.
Prometheus customer (zone svc-monitoring-stack-client-XXXX)#
CLIENT=xxxx # obs-pf : CLIENT=pf
In order to generate a new ingress password, follow the next steps:
-
Create a new secret and push it into Vault by redeploying Central Prometheus with
bootstrap=trueoption:trackbone apply -c kube-prometheus-stack -z svc-monitoring-stack-client-${CLIENT} -t bootstrap=trueWarning
At this time, the two secrets coexist (this avoids the interruption of service).
-
Communicate the new password to the client
-
Update
PROMETHEUS_PASSWORDandPROMETHEUS_USERin the External Gitlab > Settings > CI/CD > Variablesxdg-open "https://sourcehub.orange-business.com/cs-factory/cs-factory-environments/obs-${CLIENT}/-/settings/ci_cd"Important
Wait for customer feedback to ensure that they are using the new passwords correctly before continuing.
-
Clean-up. After making sure that the new secret works and the customer is aware of it, you can delete the old secret in Vault. The secret is stored in the following path:
secrets/secret/zones/fe/<service_zone_name>/prometheus-ingress/prometheus-ingress-YYYYMMDD-HHMMSS, whereYYYYMMDD-HHMMSSindicates the date and hour when the secret has been generated. -
Redeploy the client Prometheus so it can take into consideration the removal of the old password:
trackbone apply -c kube-prometheus-stack -z svc-monitoring-stack-client-${CLIENT} -
Redeploy Blackbox-Exporter and prometheus-rules, because it uses Prometheus secrets to monitor it:
trackbone apply -z svc-monitoring-stack-client-"${CLIENT}" -c blackbox-exporter-probe-monitoring-stack-client-mon3 --add-services trackbone apply -z svc-monitoring-stack-client-"${CLIENT}" -c blackbox-exporter-probe-monitoring-stack-client-mon4 --add-services trackbone apply -z svc-monitoring-stack-corp-prd-1 -c prometheus-rules -c blackbox-exporter-core -t blackbox_exporter_refresh_cache=true --add-services trackbone apply -z svc-monitoring-stack-corp-prd-2 -c prometheus-rules -c blackbox-exporter-core --add-servicestrackbone apply -z svc-monitoring-stack-client-"${CLIENT}" -c blackbox-exporter-probe-monitoring-stack-client-mon3 --add-services trackbone apply -z svc-monitoring-stack-client-"${CLIENT}" -c blackbox-exporter-probe-monitoring-stack-client-mon4 --add-services trackbone apply -z svc-monitoring-stack-corp-stg-1 -c prometheus-rules -c blackbox-exporter-core -t blackbox_exporter_refresh_cache=true --add-services trackbone apply -z svc-monitoring-stack-corp-stg-2 -c prometheus-rules -c blackbox-exporter-core --add-services
Thanos stack#
mon3/mon4 (Thanos-Receive)#
This is not Prometheus. Follow the Thanos documentation.