Skip to content

Commit 9b10e44

Browse files
committed
build: updated config files
1 parent 7973ac7 commit 9b10e44

File tree

2 files changed

+129
-121
lines changed

2 files changed

+129
-121
lines changed

packaging/conf/example_linux.conf

Lines changed: 70 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ enabled = True
2828
client = localhost
2929
address = 127.0.0.1
3030
port = 10051
31+
timeout = 15
3132
re_send = False
3233

3334
######### General parameters sections ############
@@ -80,9 +81,21 @@ format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s
8081
max_memory_usage = 41943040
8182
interval = 60
8283

84+
[archivecommand]
85+
max_count_files = 2
86+
interval = 60
87+
8388
[bgwriter]
8489
interval = 60
8590

91+
[cfs]
92+
force_enable = False
93+
interval = 60
94+
95+
[checkpoint]
96+
max_checkpoint_by_wal_in_hour = 12
97+
interval = 300
98+
8699
[connections]
87100
percent_connections_tr = 90
88101
interval = 60
@@ -100,82 +113,84 @@ interval = 60
100113
[instance]
101114
interval = 60
102115

103-
[xlog]
104-
lag_more_than_in_sec = 300
116+
# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm
117+
# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory.
118+
# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below
119+
# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n'
120+
# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added.
121+
# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory.
122+
# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message.
123+
# By default this plugin disabled. To enable this plugin - set bellow "enabled = False"
124+
# #interval - (onitoring frequency in seconds. 60 seconds by default
125+
# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default.
126+
# Possible values MB, GB, TB. For example 1GB
127+
[memoryleakdiagnostic]
128+
enabled = False
105129
interval = 60
130+
private_anon_mem_threshold = 1GB
106131

107-
[pgstatstatement]
132+
[oldest]
133+
max_xid_age = 18000000
134+
max_query_time = 18000
108135
interval = 60
109136

110137
[pgbuffercache]
111138
interval = 60
112139

113-
[pgwaitsampling]
140+
[pglocks]
114141
interval = 60
115142

116-
[checkpoint]
117-
max_checkpoint_by_wal_in_hour = 12
118-
interval = 300
119-
120-
[oldest]
121-
max_xid_age = 18000000
122-
max_query_time = 18000
143+
# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit.
144+
# https://www.postgresql.org/docs/current/sql-prepare-transaction.html
145+
# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html
146+
# max_prepared_transaction_time - age of prepared transaction in seconds.
147+
# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires.
148+
[preparedtransaction]
149+
max_prepared_transaction_time = 60
123150
interval = 60
124151

125-
[pglocks]
126-
interval = 60
152+
# Get size of relations defined in this section
153+
# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size.
154+
# Example:
155+
# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
156+
# If the relation is blocked by some process such as vacuum full or create index, the result will be -1
157+
# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations.
158+
[relationssize]
159+
enabled = False
160+
relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
161+
interval = 300
127162

128-
[cfs]
129-
force_enable = False
163+
[replication]
164+
lag_more_than_in_sec = 300
130165
interval = 60
131166

132-
[archivecommand]
133-
max_count_files = 2
167+
[statstatements]
134168
interval = 60
135169

136-
[procstat]
170+
[waitsampling]
137171
interval = 60
138172

139-
[diskstats]
173+
[wal]
140174
interval = 60
141175

142176
[disksizes]
143177
vfs_percent_free = 10
144178
vfs_inode_percent_free = 10
145179
interval = 60
146180

147-
[memory]
181+
[diskstats]
148182
interval = 60
149183

150-
[systemuptime]
151-
up_time = 300
184+
[la]
152185
interval = 60
153186

154-
[openfiles]
187+
[memory]
155188
interval = 60
156189

157190
[net]
158191
interval = 60
159192

160-
[la]
161-
interval = 60
162-
163-
[zbxsender]
164-
interval = 10
165-
166-
[logsender]
167-
interval = 2
168-
169-
[agentapi]
170-
interval = 60
171-
172-
# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit.
173-
# https://www.postgresql.org/docs/current/sql-prepare-transaction.html
174-
# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html
175-
# max_prepared_transaction_time - age of prepared transaction in seconds.
176-
# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires.
177-
[preparedtransaction]
178-
max_prepared_transaction_time = 60
193+
[openfiles]
179194
interval = 60
180195

181196
# Get size of backup catalogs stroring all WAL and backup files using pg_probackup
@@ -187,29 +202,18 @@ interval = 300
187202
backup_dirs = /backup_dir1,/backup_dir2
188203
pg_probackup_path = /usr/bin/pg_probackup-11
189204

190-
# Get size of relations defined in this section
191-
# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size.
192-
# Example:
193-
# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
194-
# If the relation is blocked by some process such as vacuum full or create index, the result will be -1
195-
# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations.
196-
[relationssize]
197-
enabled = False
198-
relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
199-
interval = 300
205+
[procstat]
206+
interval = 60
200207

201-
# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm
202-
# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory.
203-
# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below
204-
# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n'
205-
# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added.
206-
# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory.
207-
# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message.
208-
# By default this plugin disabled. To enable this plugin - set bellow "enabled = False"
209-
# #interval - (onitoring frequency in seconds. 60 seconds by default
210-
# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default.
211-
# Possible values MB, GB, TB. For example 1GB
212-
[memoryleakdiagnostic]
213-
enabled = False
208+
[systemuptime]
209+
up_time = 300
214210
interval = 60
215-
private_anon_mem_threshold = 1GB
211+
212+
[agentapi]
213+
interval = 60
214+
215+
[logsender]
216+
interval = 2
217+
218+
[zbxsender]
219+
interval = 10

packaging/conf/example_win.conf

Lines changed: 59 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ enabled = True
2828
client = localhost
2929
address = 127.0.0.1
3030
port = 10051
31+
timeout = 15
3132
re_send = False
3233

3334
######### General parameters sections ############
@@ -80,9 +81,21 @@ format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s
8081
max_memory_usage = 41943040
8182
interval = 60
8283

84+
[archivecommand]
85+
max_count_files = 2
86+
interval = 60
87+
8388
[bgwriter]
8489
interval = 60
8590

91+
[cfs]
92+
force_enable = False
93+
interval = 60
94+
95+
[checkpoint]
96+
max_checkpoint_by_wal_in_hour = 12
97+
interval = 300
98+
8699
[connections]
87100
percent_connections_tr = 90
88101
interval = 60
@@ -100,92 +113,83 @@ interval = 60
100113
[instance]
101114
interval = 60
102115

103-
[xlog]
104-
lag_more_than_in_sec = 300
116+
# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm
117+
# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory.
118+
# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below
119+
# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n'
120+
# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added.
121+
# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory.
122+
# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message.
123+
# By default this plugin disabled. To enable this plugin - set bellow "enabled = False"
124+
# #interval - (onitoring frequency in seconds. 60 seconds by default
125+
# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default.
126+
# Possible values MB, GB, TB. For example 1GB
127+
[memoryleakdiagnostic]
128+
enabled = False
105129
interval = 60
130+
private_anon_mem_threshold = 1GB
106131

107-
[pgstatstatement]
132+
[oldest]
133+
max_xid_age = 18000000
134+
max_query_time = 18000
108135
interval = 60
109136

110137
[pgbuffercache]
111138
interval = 60
112139

113-
[pgwaitsampling]
140+
[pglocks]
114141
interval = 60
115142

116-
[checkpoint]
117-
max_checkpoint_by_wal_in_hour = 12
143+
# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit.
144+
# https://www.postgresql.org/docs/current/sql-prepare-transaction.html
145+
# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html
146+
# max_prepared_transaction_time - age of prepared transaction in seconds.
147+
# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires.
148+
[preparedtransaction]
149+
max_prepared_transaction_time = 60
150+
interval = 60
151+
152+
# Get size of relations defined in this section
153+
# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size.
154+
# Example:
155+
# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
156+
# If the relation is blocked by some process such as vacuum full or create index, the result will be -1
157+
# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations.
158+
[relationssize]
159+
enabled = False
160+
relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
118161
interval = 300
119162

120-
[oldest]
121-
max_xid_age = 18000000
122-
max_query_time = 18000
163+
[replication]
164+
lag_more_than_in_sec = 300
123165
interval = 60
124166

125-
[pglocks]
167+
[statstatements]
126168
interval = 60
127169

128-
[cfs]
129-
force_enable = False
170+
[waitsampling]
130171
interval = 60
131172

132-
[archivecommand]
133-
max_count_files = 2
173+
[wal]
134174
interval = 60
135175

136-
[procstat]
176+
[cpu]
137177
interval = 60
138178

139179
[diskstats]
140180
interval = 60
141181

142-
[disksizes]
143-
vfs_percent_free = 10
144-
vfs_inode_percent_free = 10
145-
interval = 60
146-
147182
[memory]
148-
enabled = False
149183
interval = 60
150184

151-
[systemuptime]
152-
up_time = 300
185+
[network]
153186
interval = 60
154187

155-
[openfiles]
156-
interval = 60
157-
158-
[net]
159-
interval = 60
160-
161-
[la]
188+
[agentapi]
162189
interval = 60
163190

164-
[zbxsender]
165-
interval = 10
166-
167191
[logsender]
168192
interval = 2
169193

170-
[agentapi]
171-
interval = 60
172-
173-
# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit.
174-
# https://www.postgresql.org/docs/current/sql-prepare-transaction.html
175-
# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html
176-
# max_prepared_transaction_time - age of prepared transaction in seconds.
177-
# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires.
178-
[preparedtransaction]
179-
max_prepared_transaction_time = 60
180-
interval = 60
181-
182-
# Get size of relations defined in this section
183-
# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size.
184-
# Example:
185-
# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
186-
# If the relation is blocked by some process such as vacuum full or create index, the result will be -1
187-
# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations.
188-
[relationssize]
189-
enabled = False
190-
relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
191-
interval = 300
194+
[zbxsender]
195+
interval = 10

0 commit comments

Comments
 (0)