summaryrefslogtreecommitdiff
path: root/config/prometheus/additional_metrics.yml
blob: d33fae4182d99b5c42d5a5924428ed0f43d93b6a (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
- group: AWS Elastic Load Balancer
  priority: 10
  metrics:
  - title: "Throughput"
    y_label: "Requests / Sec"
    required_metrics:
      - aws_elb_request_count_sum
    weight: 1
    queries:
    - query_range: 'sum(aws_elb_request_count_sum{%{environment_filter}}) * 60'
      label: Total
      unit: req / sec
  - title: "Latency"
    y_label: "Latency (ms)"
    required_metrics:
      - aws_elb_latency_average
    weight: 1
    queries:
    - query_range: 'avg(aws_elb_latency_average{%{environment_filter}}) * 1000'
      label: Average
      unit: ms
  - title: "HTTP Error Rate"
    y_label: "Error Rate (%)"
    required_metrics:
      - aws_elb_request_count_sum
      - aws_elb_httpcode_backend_5_xx_sum
    weight: 1
    queries:
    - query_range: 'sum(aws_elb_httpcode_backend_5_xx_sum{%{environment_filter}}) / sum(aws_elb_request_count_sum{%{environment_filter}})'
      label: HTTP Errors
      unit: "%"
- group: NGINX
  priority: 10
  metrics:
  - title: "Throughput"
    y_label: "Requests / Sec"
    required_metrics:
      - nginx_requests_total
    weight: 1
    queries:
    - query_range: 'sum(rate(nginx_requests_total{server_zone!="*", server_zone!="_", %{environment_filter}}[2m]))'
      label: Total
      unit: req / sec
  - title: "Latency"
    y_label: "Latency (ms)"
    required_metrics:
      - nginx_upstream_response_msecs_avg
    weight: 1
    queries:
    - query_range: 'avg(nginx_upstream_response_msecs_avg{%{environment_filter}}) * 1000'
      label: Upstream
      unit: ms
  - title: "HTTP Error Rate"
    y_label: "Error Rate (%)"
    required_metrics:
      - nginx_responses_total
    weight: 1
    queries:
    - query_range: 'sum(nginx_responses_total{status_code="5xx", %{environment_filter}}) / sum(nginx_responses_total{server_zone!="*", server_zone!="_", %{environment_filter}})'
      label: HTTP Errors
      unit: "%"
- group: Kubernetes
  priority: 5
  metrics:
  - title: "Memory Usage"
    y_label: "Memory Usage (MB)"
    required_metrics:
      - container_memory_usage_bytes
    weight: 1
    queries:
    - query_range: '(sum(container_memory_usage_bytes{container_name!="POD",%{environment_filter}}) / count(container_memory_usage_bytes{container_name!="POD",%{environment_filter}})) /1024/1024'
      label: Average
      unit: MB
  - title: "CPU Utilization"
    y_label: "CPU Utilization (%)"
    required_metrics:
     - container_cpu_usage_seconds_total
    weight: 1
    queries:
    - query_range: 'sum(rate(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}[2m])) / count(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}) * 100'
      label: Average
      unit: "%"