summaryrefslogtreecommitdiff
path: root/config/prometheus/cluster_metrics.yml
blob: 3df76b0974f02fd80519c30fdd681f61e9466195 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
- group: Cluster Health
  priority: 1
  metrics:
  - title: "CPU Usage"
    y_label: "CPU"
    required_metrics: ['container_cpu_usage_seconds_total']
    weight: 1
    queries:
    - query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{id="/"}[15m])) by (job)) without (job)'
      label: Usage
      unit: "cores"
      appearance:
        line:
          width: 2
        area:
          opacity: 0
    - query_range: 'sum(kube_pod_container_resource_requests_cpu_cores{kubernetes_namespace="gitlab-managed-apps"})'
      label: Requested
      unit: "cores"
      appearance:
        line:
          width: 2
        area:
          opacity: 0
    - query_range: 'sum(kube_node_status_capacity_cpu_cores{kubernetes_namespace="gitlab-managed-apps"})'
      label: Capacity
      unit: "cores"
      appearance:
        line:
          type: 'dashed'
          width: 2
        area:
          opacity: 0
  - title: "Memory usage"
    y_label: "Memory"
    required_metrics: ['container_memory_usage_bytes']
    weight: 1
    queries:
    - query_range: 'avg(sum(container_memory_usage_bytes{id="/"}) by (job)) without (job) / 2^30'
      label: Usage
      unit: "GiB"
      appearance:
        line:
          width: 2
        area:
          opacity: 0
    - query_range: 'sum(kube_pod_container_resource_requests_memory_bytes{kubernetes_namespace="gitlab-managed-apps"})/2^30'
      label: Requested
      unit: "GiB"
      appearance:
        line:
          width: 2
        area:
          opacity: 0
    - query_range: 'sum(kube_node_status_capacity_memory_bytes{kubernetes_namespace="gitlab-managed-apps"})/2^30'
      label: Capacity
      unit: "GiB"
      appearance:
        line:
          type: 'dashed'
          width: 2
        area:
          opacity: 0