Confused configuring monitoring in gitlab.rb
We are currently looking at configuring the Alertmanager (Prometheus). But we were wondering how. In alertmanager.rb we see that we can specify the whole yml file for Alertmanager. But the gitlab.rb does not show that we can edit this.
The question is: should we and can we configure the Alertmanager through gitlab.rb
Second question: should we create Prometheus alerts such as
- alert: OutOfMemory
expr: (node_memory_MemFree_bytes + node_memory_Cached_bytes + node_memory_Buffers_bytes) / node_memory_MemTotal_bytes * 100 < 10
for: 5m
labels:
severity: warning
annotations:
summary: "Out of memory (instance {{ $labels.instance }})"
description: "Node memory is filling up (< 10% left)\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
in the gitlab.rb file or can we directly create files in the /var/opt/gitlab/prometheus/rules
directory?