|  | 
|  | 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 | +interval = 60 | 
|  | 82 | + | 
|  | 83 | +[archivecommand] | 
|  | 84 | +interval = 60 | 
|  | 85 | + | 
|  | 86 | +# Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization. | 
|  | 87 | +# But this metric is instantaneous, so recommended to run this plugin frequently | 
|  | 88 | +# to get a complete picture of autovacuum utilization. | 
|  | 89 | +[autovacuum] | 
|  | 90 | +interval = 30 | 
|  | 91 | + | 
|  | 92 | +[bgwriter] | 
|  | 93 | +interval = 60 | 
|  | 94 | + | 
|  | 95 | +[cfs] | 
|  | 96 | +force_enable = False | 
|  | 97 | +interval = 60 | 
|  | 98 | + | 
|  | 99 | +[checkpoint] | 
|  | 100 | +interval = 300 | 
|  | 101 | + | 
|  | 102 | +[connections] | 
|  | 103 | +interval = 60 | 
|  | 104 | + | 
|  | 105 | +[databases] | 
|  | 106 | +interval = 300 | 
|  | 107 | + | 
|  | 108 | +[pghealth] | 
|  | 109 | +interval = 60 | 
|  | 110 | + | 
|  | 111 | +[instance] | 
|  | 112 | +interval = 60 | 
|  | 113 | + | 
|  | 114 | +# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm | 
|  | 115 | +# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory. | 
|  | 116 | +# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below | 
|  | 117 | +# statm -  'pid: {pid},  RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n' | 
|  | 118 | +# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added. | 
|  | 119 | +# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory. | 
|  | 120 | +# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message. | 
|  | 121 | +# By default this plugin disabled. To enable this plugin - set bellow "enabled = False" | 
|  | 122 | +# #interval - (onitoring frequency in seconds. 60 seconds by default | 
|  | 123 | +# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default. | 
|  | 124 | +# Possible values MB, GB, TB. For example 1GB | 
|  | 125 | +[memoryleakdiagnostic] | 
|  | 126 | +enabled = True | 
|  | 127 | +interval = 15 | 
|  | 128 | +private_anon_mem_threshold = 1GB | 
|  | 129 | + | 
|  | 130 | +[oldest] | 
|  | 131 | +interval = 60 | 
|  | 132 | + | 
|  | 133 | +[pgbuffercache] | 
|  | 134 | +interval = 60 | 
|  | 135 | + | 
|  | 136 | +[pglocks] | 
|  | 137 | +interval = 60 | 
|  | 138 | + | 
|  | 139 | +# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit. | 
|  | 140 | +# https://www.postgresql.org/docs/current/sql-prepare-transaction.html | 
|  | 141 | +# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html | 
|  | 142 | +# max_prepared_transaction_time - age of prepared transaction in seconds. | 
|  | 143 | +# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires. | 
|  | 144 | +[preparedtransaction] | 
|  | 145 | +interval = 60 | 
|  | 146 | + | 
|  | 147 | +# Get size of relations defined in this section | 
|  | 148 | +# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size. | 
|  | 149 | +# Example: | 
|  | 150 | +# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user | 
|  | 151 | +# If the relation is blocked by some process such as vacuum full or create index, the result will be -1 | 
|  | 152 | +# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations. | 
|  | 153 | +[relationssize] | 
|  | 154 | +enabled = True | 
|  | 155 | +relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config | 
|  | 156 | +interval = 15 | 
|  | 157 | + | 
|  | 158 | +[replication] | 
|  | 159 | +interval = 60 | 
|  | 160 | + | 
|  | 161 | +[statstatements] | 
|  | 162 | +interval = 60 | 
|  | 163 | + | 
|  | 164 | +[waitsampling] | 
|  | 165 | +interval = 60 | 
|  | 166 | + | 
|  | 167 | +[wal] | 
|  | 168 | +interval = 60 | 
|  | 169 | + | 
|  | 170 | +[disksizes] | 
|  | 171 | +interval = 60 | 
|  | 172 | + | 
|  | 173 | +[diskstats] | 
|  | 174 | +interval = 60 | 
|  | 175 | + | 
|  | 176 | +[la] | 
|  | 177 | +interval = 60 | 
|  | 178 | + | 
|  | 179 | +[memory] | 
|  | 180 | +interval = 60 | 
|  | 181 | + | 
|  | 182 | +[net] | 
|  | 183 | +interval = 60 | 
|  | 184 | + | 
|  | 185 | +[openfiles] | 
|  | 186 | +interval = 60 | 
|  | 187 | + | 
|  | 188 | +# Get size of backup catalogs stroring all WAL and backup files using pg_probackup | 
|  | 189 | +# (https://github.com/postgrespro/pg_probackup) | 
|  | 190 | +# Trigger fires if some backup has bad status e.g. (ERROR,CORRUPT,ORPHAN). | 
|  | 191 | +[pgprobackup] | 
|  | 192 | +enabled = False | 
|  | 193 | +interval = 300 | 
|  | 194 | +backup_dirs = /backup_dir1,/backup_dir2 | 
|  | 195 | +pg_probackup_path = /usr/bin/pg_probackup-11 | 
|  | 196 | + | 
|  | 197 | +[procstat] | 
|  | 198 | +interval = 60 | 
|  | 199 | + | 
|  | 200 | +[systemuptime] | 
|  | 201 | +interval = 60 | 
|  | 202 | + | 
|  | 203 | +[agentapi] | 
|  | 204 | +interval = 60 | 
|  | 205 | + | 
|  | 206 | +[logsender] | 
|  | 207 | +interval = 2 | 
|  | 208 | + | 
|  | 209 | +[zbxsender] | 
|  | 210 | +interval = 10 | 
0 commit comments