forked from perforce/p4prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.yaml
321 lines (290 loc) · 11 KB
/
dashboard.yaml
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# Grafana Dashboard YAML format
# This YAML config file has format shown below.
#
# Explanation of entries:
# =======================
# - section: Section heading
# - row: Indicates a new row (future will allow multiples per row)
# - title: Title of the panel
# - expr: # is the PromQL query - note that variables are frefixed by '$'
# # In the case of the flag --no-sdp, then this will be removed: 'sdpinst="$sdpinst",'
# - expr: p4_monitor_by_cmd{sdpinst="$sdpinst",serverid="$serverid"}
# # legend is to ensure the legend shows relevant fields from metrics labels
# # For more information on options - see 'Labels' column in: https://github.com/perforce/p4prometheus#metrics-available
# legend: "{{cmd}}"
# Example:
# - section: Monitor Tracking
# - row: 1
# - title: Monitor Processes (by cmd)
# target:
# - expr: p4_monitor_by_cmd{sdpinst="$sdpinst",serverid="$serverid"}
# legend: "{{cmd}}"
#
# Extra fields:
# type: gauge # Note default is counter
# yformat: s # good for setting time values (seconds/hours/weeks/...), or byte values, e.g. 'decbytes'
#
#========================================================================
# Expected customisations:
# * Check the hardcoded values for replication in 'expr' and adjust for your environment:
# Anything with the value '(Update for your site)'
# E.g.
#
# - title: Replica Lag for sample_replica from sample_master (Update for your site)
# target:
# - expr: >-
# p4_replica_curr_pos{instance="sample_master_instance",job="node_exporter",sdpinst="1",servername="sample_master"} -
# ignoring (serverid, servername)
# p4_replica_curr_pos{instance="sample_master_instance",job="node_exporter",sdpinst="1",servername="sample_replica"}
#========================================================================
# The following counters not included (for now)
# p4_cmd_ip_counter
# p4_cmd_ip_cumulative_seconds
# p4_cmd_running
# p4_cmd_user_counter
# p4_cmd_user_cumulative_seconds
# p4_cmd_user_detail_counter
# p4_cmd_user_detail_cumulative_seconds
- section: Monitor Tracking
- row: 1
- title: Monitor Processes (by cmd)
target:
- expr: p4_monitor_by_cmd{sdpinst="$sdpinst",serverid="$serverid"}
legend: "{{cmd}}"
- expr: sum(p4_monitor_by_cmd{sdpinst="$sdpinst",serverid="$serverid"})
legend: all
- title: Monitor Processes (by user)
target:
- expr: p4_monitor_by_user{sdpinst="$sdpinst",serverid="$serverid"}
legend: "{{user}}"
- expr: sum(p4_monitor_by_user{sdpinst="$sdpinst",serverid="$serverid"})
legend: all
- row: 1
- title: p4d process count
target:
- expr: p4_process_count
- title: rtv sessions active
target:
- expr: p4_rtv_svr_sessions_active
- row: 1
- title: $serverid Time for last SDP checkpoint
target:
- expr: p4_sdp_checkpoint_duration{sdpinst="$sdpinst",serverid="$serverid"}
yformat: s
- title: Uptime
type: gauge
target:
- expr: p4_server_uptime{sdpinst="$sdpinst"}
yformat: s
- row: 1
- title: $serverid time since last SDP checkpoint
target:
- expr: time() - p4_sdp_checkpoint_log_time{sdpinst="$sdpinst",serverid="$serverid"}
yformat: s
- row: 1
- title: All P4 Cmds Count (rate/10min)
target:
- expr: rate(p4_completed_cmds_per_day{sdpinst="$sdpinst",serverid="$serverid"}[10m])
- expr: sum(rate(p4_cmd_counter{sdpinst="$sdpinst",serverid="$serverid"}[10m]))
- title: p4d log lines read (rate/min)
target:
- expr: rate(p4_prom_log_lines_read{sdpinst="$sdpinst",serverid="$serverid"}[1m])
- row: 1
- title: p4prometheus cmds pending
target:
- expr: p4_prom_cmds_pending{sdpinst="$sdpinst",serverid="$serverid"}
- title: p4prometheus cmds processed (rate/min)
target:
- expr: rate(p4_prom_cmds_processed{sdpinst="$sdpinst",serverid="$serverid"}[1m])
- row: 1
- title: p4prometheus CPU system (rate/min)
target:
- expr: rate(p4_prom_cpu_system{sdpinst="$sdpinst",serverid="$serverid"}[1m])
- title: p4prometheus CPU user (rate/min)
target:
- expr: rate(p4_prom_cpu_user{sdpinst="$sdpinst",serverid="$serverid"}[1m])
- row: 1
- title: Error Count rates by subsystem/id
target:
- expr: rate(p4_error_count{sdpinst="$sdpinst",serverid="$serverid",subsystem!~"[0-9].*"}[1m])
legend: subsys {{subsystem}}, level {{level}}, id {{error_id}}
- row: 1
- title: P4 cmds by program - count (rate/10min)
target:
- expr: rate(p4_cmd_program_counter{sdpinst="$sdpinst",serverid="$serverid"}[10m])
legend: "{{program}}"
- title: P4 cmds by program - duration (rate/10min)
target:
- expr: rate(p4_cmd_program_cumulative_seconds{sdpinst="$sdpinst",serverid="$serverid"}[10m])
legend: "{{program}}"
- section: Replication
- row: 1
- title: Replica Journal number (from servers -J on master)
target:
- expr: p4_replica_curr_jnl{sdpinst="$sdpinst",serverid="$serverid"}
legend: "{{servername}}"
- title: Replica Journal Pos (from servers -J on master)
target:
- expr: p4_replica_curr_pos{sdpinst="$sdpinst",serverid="$serverid"}
legend: "{{servername}}"
- row: 1
- title: Replica Lag for sample_replica from sample_master (Update for your site)
target:
- expr: >-
p4_replica_curr_pos{instance="p4poke-chi:9100",job="node_exporter",sdpinst="1",servername="sample_master"} -
ignoring (serverid, servername)
p4_replica_curr_pos{instance="p4poke-chi:9100",job="node_exporter",sdpinst="1",servername="sample_replica"}
- row: 1
- title: Pull queue size on replica
target:
- expr: p4_pull_queue{sdpinst="$sdpinst"}
- title: rtv_repl_behind_bytes sample_replica (Update for your site)
target:
- expr: p4_rtv_rpl_behind_bytes{instance="gemini:9100", job="node_exporter", sdpinst="1", serverid="sample_replica"}
- row: 1
- title: Pull queue errors
target:
- expr: p4_pull_errors{sdpinst="$sdpinst",serverid="$serverid"}
- row: 1
- title: Cmd counts per replica IP rate/min
target:
- expr: rate(p4_cmd_replica_counter{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "{{replica}}"
- title: Cmd counts per replica IP duration/min
target:
- expr: rate(p4_cmd_replica_cumulative_seconds{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "{{replica}}"
- row: 1
- title: Files synced (add/update/delete) /min
target:
- expr: rate(p4_sync_files_added{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "added"
- expr: rate(p4_sync_files_updated{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "updated"
- expr: rate(p4_sync_files_deleted{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "deleted"
- title: Bytes synced (add/update) /min
target:
- expr: rate(p4_sync_bytes_added{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "added"
yformat: decbytes
- expr: rate(p4_sync_bytes_updated{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "updated"
yformat: decbytes
- section: Cmd Count and Duration
- row: 1
- title: Cmds duration (rate/min)
target:
- expr: rate(p4_cmd_cumulative_seconds{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "{{cmd}}"
- title: p4 cmds top 10 (rate/min)
target:
- expr: sum without (instance, job)(rate(p4_cmd_counter{sdpinst="$sdpinst",serverid="$serverid"}[1m]))
legend: "{{cmd}}"
- row: 1
- title: Cmds CPU System (rate/min)
target:
- expr: rate(p4_cmd_cpu_system_cumulative_seconds{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "{{cmd}}"
- title: Cmds CPU User (rate/min)
target:
- expr: rate(p4_cmd_cpu_user_cumulative_seconds{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "{{cmd}}"
- row: 1
- title: Cmd Error Counter (rate/min)
target:
- expr: rate(p4_cmd_error_counter{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "{{cmd}}"
- title: Trigger duration (rate/min)
target:
- expr: rate(p4_total_trigger_lapse_seconds{sdpinst="$sdpinst",serverid="$serverid"}[1m])
legend: "{{trigger}}"
- section: Table Locking
- row: 1
- title: P4 Read Locks
target:
- expr: p4_locks_db_read{sdpinst="$sdpinst",serverid="$serverid"}
legend: db
- expr: p4_locks_cliententity_read{sdpinst="$sdpinst",serverid="$serverid"}
legend: cliententity
- expr: p4_locks_meta_read{sdpinst="$sdpinst",serverid="$serverid"}
legend: meta
- title: P4 Write Locks
target:
- expr: p4_locks_db_write{sdpinst="$sdpinst",serverid="$serverid"}
legend: db
- expr: p4_locks_cliententity_write{sdpinst="$sdpinst",serverid="$serverid"}
legend: cliententity
- expr: p4_locks_meta_write{sdpinst="$sdpinst",serverid="$serverid"}
legend: meta
- row: 1
- title: p4 read locks held per table (rate/min)
target:
- expr: sum without (instance, job) (rate(p4_total_read_held_seconds{sdpinst="$sdpinst",serverid="$serverid"}[1m]))
legend: "{{table}}"
- title: p4 read locks waiting (rate/min)
target:
- expr: sum without (instance, job) (rate(p4_total_read_wait_seconds{sdpinst="$sdpinst",serverid="$serverid"}[1m]))
legend: "{{table}}"
- row: 1
- title: p4 write locks held per table (rate/min)
target:
- expr: sum without (instance, job) (rate(p4_total_write_held_seconds{sdpinst="$sdpinst",serverid="$serverid"}[1m]))
legend: "{{table}}"
- title: p4 write locks wait per table (rate/min)
target:
- expr: sum without (instance, job) (rate(p4_total_write_wait_seconds{sdpinst="$sdpinst",serverid="$serverid"}[1m]))
legend: "{{table}}"
- row: 1
- title: RTV processes waiting for locks
target:
- expr: p4_rtv_db_lockwait{sdpinst="$sdpinst",serverid="$serverid"}
- title: RTV DB I/O record count
target:
- expr: p4_rtv_db_io_records{sdpinst="$sdpinst",serverid="$serverid"}
- row: 1
- title: RTV is checkpoint active
target:
- expr: p4_rtv_db_ckp_active{sdpinst="$sdpinst",serverid="$serverid"}
- title: RTV checkpoint records processed
target:
- expr: p4_rtv_db_ckp_records{sdpinst="$sdpinst",serverid="$serverid"}
- row: 1
- title: RTV replica byte lag
target:
- expr: p4_rtv_rpl_behind_bytes{sdpinst="$sdpinst",serverid="$serverid"}
- title: RTV replica journal lag
target:
- expr: p4_rtv_rpl_behind_journals{sdpinst="$sdpinst",serverid="$serverid"}
- row: 1
- title: RTV active sessions
target:
- expr: p4_rtv_svr_sessions_active{sdpinst="$sdpinst",serverid="$serverid"}
- title: RTV total sessions
target:
- expr: p4_rtv_svr_sessions_total{sdpinst="$sdpinst",serverid="$serverid"}
- row: 1
- title: Processes waiting on read locks
target:
- expr: p4_locks_db_read{sdpinst="$sdpinst",serverid="$serverid"}
- title: Processes waiting on write locks
target:
- expr: p4_locks_db_write{sdpinst="$sdpinst",serverid="$serverid"}
- row: 1
- title: Processes waiting on cliententity read locks
target:
- expr: p4_locks_cliententity_read{sdpinst="$sdpinst",serverid="$serverid"}
- title: Processes waiting on cliententity write locks
target:
- expr: p4_locks_cliententity_write{sdpinst="$sdpinst",serverid="$serverid"}
- row: 1
- title: Processes waiting on meta_read locks
target:
- expr: p4_locks_meta_read{sdpinst="$sdpinst",serverid="$serverid"}
- title: Processes waiting on meta_write
target:
- expr: p4_locks_meta_write{sdpinst="$sdpinst",serverid="$serverid"}
- row: 1
- title: Processes blocked count
target:
- expr: p4_locks_cmds_blocked{sdpinst="$sdpinst",serverid="$serverid"}