-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCheckpoints.pm
More file actions
49 lines (30 loc) · 1023 Bytes
/
Checkpoints.pm
File metadata and controls
49 lines (30 loc) · 1023 Bytes
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
package PostgreSQL::SecureMonitoring::Checks::Checkpoints;
=head1 NAME
PostgreSQL::SecureMonitoring::Checks::Checkpoints -- statistics about BGWriter Checkpoints
=head1 SYNOPSIS
This check has no extra config options beside the defaults.
=head1 DESCRIPTION
This check returns scheduled and requested checkpoints
=head2 SQL/Result
The SQL generates a result like this:
checkpoints_timed | checkpoints_req
-------------------+-----------------
24686 | 83
=cut
use PostgreSQL::SecureMonitoring::ChecksHelper;
extends "PostgreSQL::SecureMonitoring::Checks";
#<<<
check_has
description => "Checkpoints scheduled and requested",
result_type => "integer",
result_is_counter => 1,
graph_type => "stacked_area",
graph_colors => [qw(green purple)],
# complex return type
return_type => q{
checkpoints_timed bigint,
checkpoints_req bigint
},
code => "SELECT checkpoints_timed, checkpoints_req FROM pg_stat_bgwriter;";
#>>>
1;