Skip to content

Commit 7371940

Browse files
committed
build: upgraded to 3.5.0
1 parent eeb7419 commit 7371940

File tree

2 files changed

+220
-1
lines changed

2 files changed

+220
-1
lines changed
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
# This is a configuration file for mamonsu
2+
# To get more information about mamonsu, visit https://postgrespro.ru/docs/postgrespro/12/mamonsu
3+
4+
######### Connection parameters sections ##############
5+
6+
# specify connection parameters for the Postgres cluster
7+
# in the user, password, and database fields, you must specify the mamonsu_user, mamonsu_password,
8+
# and the mamonsu_database used for bootstrap, respectively.
9+
# if you skipped the bootstrap, specify a superuser credentials and the database to connect to.
10+
11+
[postgres]
12+
enabled = True
13+
user = mamonsu
14+
password = mamonsu
15+
database = mamonsu_test_db
16+
host = localhost
17+
port = 5432
18+
application_name = mamonsu
19+
query_timeout = 10
20+
21+
# the address field must point to the running Zabbix server, while the client field must provide the name of
22+
# the Zabbix host. You can find the list of hosts available for your account in the Zabbix web
23+
# interface under Configuration > Hosts.
24+
# re_send - True - in case of transmission error, mamonsu repeats sending metrics one by one to look in log metrics with error
25+
26+
[zabbix]
27+
enabled = True
28+
client = pg-master
29+
address = 127.0.0.1
30+
port = 10051
31+
timeout = 15
32+
re_send = False
33+
34+
######### General parameters sections ############
35+
36+
# enable or disable collection of system metrics.
37+
38+
[system]
39+
enabled = True
40+
41+
# control the queue size of the data to be sent to the Zabbix server
42+
43+
[sender]
44+
queue = 2048
45+
46+
# specify the location of mamonsu and whether it is allowed to access metrics from the command line
47+
48+
[agent]
49+
enabled = True
50+
host = 127.0.0.1
51+
port = 10052
52+
53+
# specify custom plugins to be added for metrics collection
54+
55+
[plugins]
56+
enabled = False
57+
directory = /etc/mamonsu/plugins
58+
59+
# enable storing the collected metric data in text files locally.
60+
61+
[metric_log]
62+
enabled = False
63+
directory = /var/log/mamonsu
64+
max_size_mb = 1024
65+
66+
# specify logging settings for mamonsu
67+
68+
[log]
69+
file = /var/log/mamonsu/mamonsu.log
70+
level = DEBUG
71+
format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s
72+
73+
######### Individual Plugin Sections ############
74+
75+
# to disable any plugin set the enabled option to False.
76+
# modify collection interval for each plugin in the interval field.
77+
# set customer parameters for some plugins in the individual section.
78+
# below listed all available parameters for each plugin to modify.
79+
80+
[health]
81+
max_memory_usage = 41943040
82+
interval = 15
83+
84+
[archivecommand]
85+
max_count_files = 2
86+
interval = 15
87+
88+
[bgwriter]
89+
interval = 15
90+
91+
[cfs]
92+
force_enable = False
93+
interval = 15
94+
95+
[checkpoint]
96+
max_checkpoint_by_wal_in_hour = 12
97+
interval = 300
98+
99+
[connections]
100+
percent_connections_tr = 90
101+
interval = 15
102+
103+
[databases]
104+
bloat_scale = 0.2
105+
min_rows = 50
106+
interval = 300
107+
108+
[pghealth]
109+
uptime = 600
110+
cache = 80
111+
interval = 15
112+
113+
[instance]
114+
interval = 15
115+
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
129+
interval = 15
130+
private_anon_mem_threshold = 1GB
131+
132+
[oldest]
133+
max_xid_age = 18000000
134+
max_query_time = 18000
135+
interval = 15
136+
137+
[pgbuffercache]
138+
interval = 15
139+
140+
[pglocks]
141+
interval = 15
142+
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 = 15
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
161+
interval = 300
162+
163+
[replication]
164+
lag_more_than_in_sec = 300
165+
interval = 15
166+
167+
[statstatements]
168+
interval = 15
169+
170+
[waitsampling]
171+
interval = 15
172+
173+
[wal]
174+
interval = 15
175+
176+
[disksizes]
177+
vfs_percent_free = 10
178+
vfs_inode_percent_free = 10
179+
interval = 15
180+
181+
[diskstats]
182+
interval = 15
183+
184+
[la]
185+
interval = 15
186+
187+
[memory]
188+
interval = 15
189+
190+
[net]
191+
interval = 15
192+
193+
[openfiles]
194+
interval = 15
195+
196+
# Get size of backup catalogs stroring all WAL and backup files using pg_probackup
197+
# (https://github.com/postgrespro/pg_probackup)
198+
# Trigger fires if some backup has bad status e.g. (ERROR,CORRUPT,ORPHAN).
199+
[pgprobackup]
200+
enabled = False
201+
interval = 300
202+
backup_dirs = /backup_dir1,/backup_dir2
203+
pg_probackup_path = /usr/bin/pg_probackup-11
204+
205+
[procstat]
206+
interval = 15
207+
208+
[systemuptime]
209+
up_time = 300
210+
interval = 15
211+
212+
[agentapi]
213+
interval = 15
214+
215+
[logsender]
216+
interval = 2
217+
218+
[zbxsender]
219+
interval = 10

mamonsu/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__author__ = 'Dmitry Vasilyev'
22
__author_email__ = '[email protected]'
33
__description__ = 'Monitoring agent for PostgreSQL'
4-
__version__ = '3.4.0'
4+
__version__ = '3.5.0'
55
__licence__ = 'BSD'
66

77
__url__ = 'https://github.com/postgrespro/mamonsu'

0 commit comments

Comments
 (0)