-
Notifications
You must be signed in to change notification settings - Fork 1
/
yugabytedb.yml
56 lines (50 loc) · 2.11 KB
/
yugabytedb.yml
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
global:
scrape_interval: 5s # Set the scrape interval to every 5 seconds. Default is every 1 minute.
evaluation_interval: 5s # Evaluate rules every 5 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# YugabyteDB configuration to scrape Prometheus time-series metrics
scrape_configs:
- job_name: "yugabytedb"
metrics_path: /prometheus-metrics
relabel_configs:
- target_label: "node_prefix"
replacement: "cluster-1"
metric_relabel_configs:
# Save the name of the metric so we can group_by since we cannot by __name__ directly...
- source_labels: ["__name__"]
regex: "(.*)"
target_label: "saved_name"
replacement: "$1"
# The following basically retrofit the handler_latency_* metrics to label format.
- source_labels: ["__name__"]
regex: "handler_latency_(yb_[^_]*)_([^_]*)_([^_]*)(.*)"
target_label: "server_type"
replacement: "$1"
- source_labels: ["__name__"]
regex: "handler_latency_(yb_[^_]*)_([^_]*)_([^_]*)(.*)"
target_label: "service_type"
replacement: "$2"
- source_labels: ["__name__"]
regex: "handler_latency_(yb_[^_]*)_([^_]*)_([^_]*)(_sum|_count)?"
target_label: "service_method"
replacement: "$3"
- source_labels: ["__name__"]
regex: "handler_latency_(yb_[^_]*)_([^_]*)_([^_]*)(_sum|_count)?"
target_label: "__name__"
replacement: "rpc_latency$4"
static_configs:
- targets: ["10.0.0.66:7000", "10.0.1.108:7000", "10.0.1.155:7000"]
labels:
export_type: "master_export"
- targets: ["10.0.0.66:9000", "10.0.1.108:9000", "10.0.1.155:9000"]
labels:
export_type: "tserver_export"
- targets: ["10.0.0.66:9042", "10.0.1.108:9042", "10.0.1.155:9042"]
labels:
export_type: "cql_export"
- targets: ["10.0.0.66:5433", "10.0.1.108:5433", "10.0.1.155:5433"]
labels:
export_type: "ysql_export"
- targets: ["10.0.0.66:6379", "10.0.1.108:6379", "10.0.1.155:6379"]
labels:
export_type: "redis_export"