This is a set of Cloud Formation Templates and scripts to spin up a monitoring stack.
The stack includes Prometheus, to scrape Gerrit metrics exposed by master and slave, and Grafana to display them.
Create the repository in the Docker registry: aws ecr create-repository --repository-name aws-gerrit/prometheus
From the main cookbook, publish the image: make prometheus-publish
Create the repository in the Docker registry: aws ecr create-repository --repository-name aws-gerrit/grafana
From the main cookbook, publish the image: make grafana-publish
> add_prometheus_secrets_to_aws_secret_manager.sh <yourToken> Adding Prometheus Bearer Token... { "ARN": "arn:aws:secretsmanager:us-east-1:<yourAccountId>:secret:gerrit_secret_prometheus_bearer_token-gXpAFL", "Name": "gerrit_secret_test_prometheus_bearer_token", "VersionId": "e19310a4-8078-4bdb-90b4-74ead48e4339" }
TOKEN_VERSION
to the main cookbook setup.env
gXpAFL
in this caseFrom the main cookbook run: make service-monitoring
Get the URL of your Prometheus instance this way:
aws cloudformation describe-stacks \ --stack-name <SERVICE_PROMETHEUS_STACK_NAME> \ | grep -A1 '"OutputKey": "CanonicalWebUrl"' \ | grep OutputValue \ | cut -d'"' -f 4
Get the URL of your Prometheus instance this way:
aws cloudformation describe-stacks \ --stack-name <SERVICE_PROMETHEUS_STACK_NAME> \ | grep -A1 '"OutputKey": "CanonicalWebUrl"' \ | grep OutputValue \ | cut -d'"' -f 4
The default credentials are:
admin
admin