summaryrefslogtreecommitdiffstats
path: root/health/health.d/cockroachdb.conf
blob: dccd2b0644eeb73b36e20dd8d49afc8bf4c30dcf (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Availability

 template: cockroachdb_last_collected_secs
       on: cockroachdb.live_nodes
    class: Database
component: CockroachDB
     type: Latency
     calc: $now - $last_collected_t
    units: seconds ago
    every: 10s
     warn: $this > (($status >= $WARNING)  ? ($update_every) : ( 5 * $update_every))
     crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
    delay: down 5m multiplier 1.5 max 1h
     info: number of seconds since the last successful data collection
       to: dba

# Capacity

 template: cockroachdb_used_storage_capacity
       on: cockroachdb.storage_used_capacity_percentage
    class: Database
component: CockroachDB
     type: Utilization
     calc: $capacity_used_percent
    units: %
    every: 10s
     warn: $this > (($status >= $WARNING)  ? (80) : (85))
     crit: $this > (($status == $CRITICAL) ? (85) : (95))
    delay: down 15m multiplier 1.5 max 1h
     info: storage capacity utilization
       to: dba

 template: cockroachdb_used_usable_storage_capacity
       on: cockroachdb.storage_used_capacity_percentage
    class: Database
component: CockroachDB
     type: Utilization
     calc: $capacity_usable_used_percent
    units: %
    every: 10s
     warn: $this > (($status >= $WARNING)  ? (80) : (85))
     crit: $this > (($status == $CRITICAL) ? (85) : (95))
    delay: down 15m multiplier 1.5 max 1h
     info: storage usable space utilization
       to: dba

# Replication

 template: cockroachdb_unavailable_ranges
       on: cockroachdb.ranges_replication_problem
    class: Database
component: CockroachDB
     type: Utilization
     calc: $ranges_unavailable
    units: num
    every: 10s
     warn: $this > 0
    delay: down 15m multiplier 1.5 max 1h
     info: number of ranges with fewer live replicas than the replication target
       to: dba

 template: cockroachdb_replicas_leaders_not_leaseholders
       on: cockroachdb.replicas_leaders
    class: Database
component: CockroachDB
     type: Utilization
     calc: $replicas_leaders_not_leaseholders
    units: num
    every: 10s
     warn: $this > 0
    delay: down 15m multiplier 1.5 max 1h
     info: number of replicas that are Raft leaders whose range lease is held by another store
       to: dba

# FD

 template: cockroachdb_open_file_descriptors_limit
       on: cockroachdb.process_file_descriptors
    class: Database
component: CockroachDB
     type: Utilization
     calc: $sys_fd_open/$sys_fd_softlimit * 100
    units: %
    every: 10s
     warn: $this > 80
    delay: down 15m multiplier 1.5 max 1h
     info: open file descriptors utilization (against softlimit)
       to: dba

# SQL

 template: cockroachdb_sql_active_connections
       on: cockroachdb.sql_connections
    class: Database
component: CockroachDB
     type: Utilization
     calc: $sql_conns
    units: active connections
    every: 10s
     info: number of active SQL connections
       to: dba

 template: cockroachdb_sql_executed_statements_total_last_5m
       on: cockroachdb.sql_statements_total
    class: Database
component: CockroachDB
     type: Workload
   lookup: sum -5m absolute of sql_query_count
    units: statements
    every: 10s
     warn: $this == 0 AND $cockroachdb_sql_active_connections != 0
    delay: down 15m up 30s multiplier 1.5 max 1h
     info: number of executed SQL statements in the last 5 minutes
       to: dba