Add summarized gitaly apdex for usage ping
What does this MR do?
Adds a 5 minute summarised apdex rule for gitaly so that it can be queried from usage ping.
Related issues
Testing (GDK)
Enable prometheus: gdk.yml
:
prometheus:
enabled: true
Rejigger gdk:
gdk reconfigure
Turn on gitaly' prometheus metrics port and histogram latencies: gitaly/gitaly-0.praefect.toml
:
# Optional: export metrics via Prometheus
prometheus_listen_addr = "127.0.0.1:9236"
[prometheus]
grpc_latency_buckets = [0.001, 0.005, 0.025, 0.1, 0.5, 1.0, 10.0, 30.0, 60.0, 300.0, 1500.0]
Download and setup gitlab prometheus rules from omnibus:
curl https://gitlab.com/gitlab-org/omnibus-gitlab/-/raw/usage_ping_gitaly_apdex/files/gitlab-cookbooks/monitoring/templates/rules/gitlab.rules?inline=false -o <GDK_ROOT>/prometheus/gitlab.rules
prometheus/prometheus.yml
:
rule_files:
- 'gitlab.rules'
Procfile
:
prometheus: exec docker run -p 9090:9090 -v <GDK_ROOT>/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml -v <GDK_ROOT>/prometheus/gitlab.rules:/etc/prometheus/gitlab.rules prom/prometheus:v2.25.0
Restart GDK:
gdk restart
Check that prometheus has detected our gitaly target as healthy in http://localhost:9090/targets
:
Make some git activity. The rule should now have data.
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com -
Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks -
trigger-package
has a green pipeline running against latest commit
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA -
Equivalent MR/issue for the GitLab Chart opened
Edited by Robert Marshall