Steps for installing Prometheus and Grafana. This installation includes the use of blackbox exporter to allow probes against our containers.
This repository contains OpenShift deployment templates for BlackBox, Prometheus and Grafana. Running the instructions below should stand up an instance of Education monitoring stack. This includes two dashboards which are monitoring Education services (in your namespace).
prometheus-application.yaml
file. Specifically, the prometheus.yml
section
static_configs:
- targets:
- https://digitalid-api-${COMMON_NAMESPACE}-${ENVIRONMENT}.pathfinder.gov.bc.ca/health
- http://grafana-${NAMESPACE}-${ENVIRONMENT}.pathfinder.gov.bc.ca
- https://pen-demographics-api-${NAMESPACE}-${ENVIRONMENT}.pathfinder.gov.bc.ca/health
- https://pen-request-api-${NAMESPACE}-${ENVIRONMENT}.pathfinder.gov.bc.ca/health
- https://pen-request-email-api-${NAMESPACE}-${ENVIRONMENT}.pathfinder.gov.bc.ca/health
...
To Delete existing blackbox switch to namespace where you want to delete, then run the below command.
oc delete all,rc,svc,dc,route,pvc,secret,configmap,sa,RoleBinding -l name=blackbox
oc new-app -f https://raw.githubusercontent.com/bcgov/EDUC-PROMETHEUS-GRAFANA/master/blackbox/blackbox-application.yaml -p NAMESPACE=<your common namespace> -p ENVIRONMENT=<your env i.e. tools> -p DOMAIN="apps.silver.devops.gov.bc.ca"
To Delete existing Prometheus switch to namespace where you want to delete, then run the below command.
oc delete all,rc,svc,dc,route,pvc,secret,configmap,sa,RoleBinding -l name=prometheus
oc new-app -f https://raw.githubusercontent.com/bcgov/EDUC-PROMETHEUS-GRAFANA/master/prometheus/prometheus-application-single-env.yaml -p COMMON_NAMESPACE=<your common namespace> -p PEN_NAMESPACE=<pen namespace i.e. v3s4sw> -p ENVIRONMENT=<your env i.e. tools> -p EQUIV_ENVIRONMENT=<your equivalent env i.e. tools is dev, dev is test, test is uat>
To Delete existing grafana switch to namespace where you want to delete, then run the below command.
oc delete all,rc,svc,dc,route,pvc,secret,configmap,sa,RoleBinding -l name=grafana
EMAIL_SUPPORT_LIST
parameter if you wish to receive alerts. List is comma separated. PROD_URL
parameter allows you to add a vanity URL if your app contains one (specific to our implementation)oc new-app -f https://raw.githubusercontent.com/bcgov/EDUC-PROMETHEUS-GRAFANA/master/grafana/grafana-application-dc-single-env.yaml -p COMMON_NAMESPACE=<your common namespace> -p PEN_NAMESPACE=<pen namespace i.e. v3s4sw> -p ENVIRONMENT=<your env i.e. tools> -p EQUIV_ENVIRONMENT=<your equivalent env i.e. tools is dev, dev is test, test is uat> -p EMAIL_SUPPORT_LIST="abc@sda.com,akdl@sadf.com"