Skip to content

Releases: postgrespro/mamonsu

3.5.1

29 Jul 06:57
Compare
Choose a tag to compare

Changelog

3.5.0

13 Jul 13:04
Compare
Choose a tag to compare

Changelog

  • divided Instance Rate graph into two graphs - Blocks Rate, Transactions Rate
  • divided XLOG plugin into two plugins - WAL, Replication
  • changed pg_wait_sampling plugin name to Wait Sampling
  • changed pg_stat_statements plugin name to Statements
  • changed default agent.conf file permissions: now it read/write only for mamonsu user
  • added new Replication plugin metrics: Send Lag, Receive Lag
  • added pgpro_stats support to PostgresPro cluster (automatic switch from pg_stat_statements and pg_wait_sampling)
  • added new bootstrap features: now the '-x' option also configures pg_stat_statements, pg_wait_sampling and pgpro_stats extensions
  • added custom schema check for pg_stat_statements, pg_wait_sampling and pgpro_stats extensions
  • added new lock types to the Wait Sampling plugin to fit PostgreSQL 10+: Extension Locks, Client Locks, Other Locks (e.g. IPC Timeout IO), Autovacuum Locks, Logical Replication Locks
  • added new System Free/Used Memory graph
  • added new active locking queries feature to the report tool
  • replaced System Memory Overview graph with System Free/Used Memory in dashboards
  • fixed Statements plugin items generation for native zabbix agent
  • fixed Rollbacks item delta type
  • fixed WAL metrics delta types
  • fixed PostgreSQL Uptime trigger
  • improved Replication metrics evaluation algorithm
  • unified Zabbix objects names
  • unified config file sections and parameters names
  • set new color scheme

pgpro_stats support

By default mamonsu uses pg_stat_statements and pg_wait_samplings in plugins Statements and Wait Sampling. These extensions need to be installed additionally via shared_preload_libraries. But if mamonsu detects PostgresPro instead of vanilla PostgreSQL, it switched automatically to pgpro_stats for both plugins. This is more convenient because pgpro_stats is going by default with PostgresPro.

agent.conf permissions

Now by default mamonsu sets for agent.conf the following permissions:

permissions  user    group
-rw-------   mamonsu mamonsu  jun 16 12:21 agent.conf

new report feature

With other PostgreSQL stats, report now evaluates information about current locks:

$ mamonsu report --run-system --run-postgres -U mamonsu
<...>
# CURRENT LOCKS ##################################
blocked_pid     database          blocked_user  blocking_pid    blocking_user   blocked_statement                                     duration
49934           mamonsu_test_db   postgres      91741           postgres        update mamonsu_logs set value = 0 where value = 3;    0:00:35.199513

NOTE: objects new names

Pay attention to new Zabbix template object names. All mamonsu objects have been unified in template representation, so you should update the template carefully. For example, PostgreSQL: number of user total connections switched to PostgreSQL Connections: Number of Total User Connections. All changes are shown in documentation.

3.4.0

22 Feb 05:26
Compare
Choose a tag to compare

Changelog

  • added Server Version metric;
  • added Available Memory metric;
  • fixed native Zabbix Agent user parameters format;
  • added new Mamonsu zabbix tool: 'mamonsu zabbix dashboard upload' for Zabbix 6.0+;

mamonsu zabbix dashboard upload

New Zabbix CLI tool to generate pretty Zabbix 6.0 dashboard and upload it to the mamonsu template by its name.
Usage:

mamonsu zabbix dashboard upload [template_name]

Example:

cuprumtan@station ~/mamonsu$ export OPTIONS="  --url=http://127.0.0.1/ --user=Admin --password=zabbix"
cuprumtan@station ~/mamonsu$ mamonsu zabbix $OPTIONS dashboard upload "Mamonsu PostgreSQL Linux"
True

Can be used only with Zabbix server 6.0 and higher.

Click to view Mamonsu Dashboard

3.3.1

02 Feb 15:08
Compare
Choose a tag to compare

Mamonsu 3.3.1:

  • fixed logrotate script;
  • #181 added Server Mode metric and trigger;

3.3.0

18 Jan 09:34
Compare
Choose a tag to compare

Changelog

  • fixed auxiliary extension schema search;
  • fixed WAL metrics definition for native Zabbix agent;
  • upgraded Autovacuum and Connection metrics for PG 10+: now it is evaluating using pg_stat_activity.backend_type which makes the calculation more accurate;
  • added new Other Connections metric for PG 10+ to count metrics like auxiliary extension backends;
  • added new configuration parameter to the [zabbix] section: timeout (in seconds);
  • fixed Plugin Errors metric time interval to fit default '60 seconds' value;
  • fixed Slave Replication Lag metric to exclude master server from calculation #180;

pg_stat_activity.backend_type

Using pg_stat_activity.backend_type we can determine user backends by 'client backend' and 'parallel worker' values. So for PG 10+ current strategy for gathering connection metrics relies on backend_type field.
For example, query for gathering waiting user connection:

SELECT count(*)
FROM pg_catalog.pg_stat_activity
WHERE (backend_type = 'client backend' OR backend_type = 'parallel worker')
AND wait_event_type IS NOT NULL;

Also backend_type is useful to count accurately autovacuum processes in the system using 'autovacuum worker' field value.

'Other Connections' metric

Following the previous statement, we added new Other Connections metric to represent count of connections with additional backend_type. Additional backend_type usually means that there are background workers registered by extensions.

New 'zabbix.timeout' parameter

We added a new configuration parameter for [zabbix] section to define zabbix server response timeout in seconds:

<...>
[zabbix]
enabled = True
client = pg-master
address = 127.0.0.1
port = 10051
; that's it!
timeout = 15 
;
re_send = False
<...>

Default value: 15 seconds.

3.2.1

14 Dec 08:39
Compare
Choose a tag to compare

Mamonsu 3.2.1:

  • fixed Non-active Replication Slots trigger syntax;
  • #179 upgraded Archive Queue Size and Archive Queue Length metrics to ignore non-standard WAL files (e.g. XXX.history);
  • upgraded template syntax to fit Zabbix 3.0+;

3.2.0

26 Nov 10:06
Compare
Choose a tag to compare

Changelog

  • added new Invalid Indexes metric and trigger to the Databases discovery rule;
  • added version number output to log (#175);
  • fixed template syntax (#173, #177);
  • fixed Archive plugin to fit PostgreSQL 10 or lower;
  • fixed Cache Hit Ratio and Sync Duty Zabbix item formula syntax;

Invalid Indexes

Following the PostgreSQL documentation:

If a problem arises while scanning the table, such as a deadlock or a uniqueness violation in a unique index, the CREATE INDEX command will fail but leave behind an “invalid” index. This index will be ignored for querying purposes because it might be incomplete; however it will still consume update overhead.
-- source

Mamonsu now can track invalid indexes using pg_locks view to ignore indexes are currently being created and alert us about this if there is at least one invalid index in the database:

SELECT count (*)
FROM pg_catalog.pg_index i LEFT JOIN pg_catalog.pg_locks l
ON (i.indexrelid = l.relation)
WHERE NOT (i.indisvalid AND i.indisready) AND l.relation IS NULL;

3.1.2

08 Nov 19:08
Compare
Choose a tag to compare

Mamonsu 3.1.2:

  • fixed Files Need To Archive and Size Of Files Need To Archive evaluation;

3.1.1

03 Nov 12:30
Compare
Choose a tag to compare

Mamonsu 3.1.1 (for Windows users):

  • fixed template generation for Windows platform;
  • added System screen for Windows platform;

3.1.0

19 Oct 09:46
Compare
Choose a tag to compare

Mamonsu 3.1.0:

  • fixed unknown options check in mamonsu tools;
  • fixed item units with Speed Per Second delta;
  • fixed #166 (1): Walreceiver Lag items name generation;
  • fixed #166 (2): item Total Replication Lag delta evaluation;
  • fixed #107: slave replication lag evaluation;
  • #172: set 'dbname' bootstrap parameter required, added default value read from config file;
  • fixed extension functions calling without special mamonsu user and schema;
  • refactoring;

bootstrap update
Added new -c/--config option to bootstrap tool. Usage:

mamonsu bootstrap [-M mamonsu_user] [-x | --create-extensions] [-c | --config] [connection_options]

This option is needed for automatic dbname parameter detection. Now if you have not set the dbname explicitly, parameter will be set as database defined in [postgres] section in mamonsu config file.