Skip to content

Commit

Permalink
Rollback to "build: upgraded to 3.5.1"
Browse files Browse the repository at this point in the history
  • Loading branch information
cuprumtan committed Jul 29, 2022
1 parent 4b497c0 commit 4501e4d
Show file tree
Hide file tree
Showing 41 changed files with 271 additions and 499 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mamonsu-tests-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')"
id: zabbix_address
- name: Edit Zabbix address in agent.conf
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.0.conf
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.1.conf

- name: Copy test scripts to container
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mamonsu-tests-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
echo "::set-output name=zabbix_address::$(hostname -I | awk '{print $1}')"
id: zabbix_address
- name: Edit Zabbix address in agent.conf
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.0.conf
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.1.conf

- name: Copy test scripts to container
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/
Expand Down
2 changes: 1 addition & 1 deletion documentation/adding_custom_plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class PLUGIN_NAME(Plugin):
# screen name ('page')
# graph size ('size')
# position on screen ('position', but it's optionally - you can set 0 to avoid sorting)
return [{'dashboard': {'name': self.right_type(self.key_autovacuum),
return [{'dashboard': {'name': self.right_type(self.key_autovacumm),
'page': ZbxTemplate.dashboard_page_PAGE['name'], # see available values in mamonsu/lib/zbx_template.py dashboard_page_*
'size': ZbxTemplate.dashboard_widget_size_SIZE, # see available values in mamonsu/lib/zbx_template.py dashboard_widget_size_*
'position': N}}]
Expand Down
2 changes: 1 addition & 1 deletion documentation/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ Default config:
</tr>
<tr>
<th>Key</th>
<td>pgsql.autovacuum.count[]</td>
<td>pgsql.autovacumm.count[]</td>
</tr>
<tr>
<th>Type</th>
Expand Down
4 changes: 2 additions & 2 deletions github-actions-tests/mamonsu_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then
python3 setup.py build && python3 setup.py install
make rpm
sudo rpm -i ./mamonsu*.rpm
cat /mamonsu/github-actions-tests/sources/agent_3.5.0.conf > /etc/mamonsu/agent.conf
cat /mamonsu/github-actions-tests/sources/agent_3.5.1.conf > /etc/mamonsu/agent.conf
systemctl daemon-reload
systemctl restart mamonsu
sleep 5
Expand All @@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then
python3 setup.py build && python3 setup.py install
make deb
sudo dpkg -i ./mamonsu*.deb
cat /mamonsu/github-actions-tests/sources/agent_3.5.0.conf > /etc/mamonsu/agent.conf
cat /mamonsu/github-actions-tests/sources/agent_3.5.1.conf > /etc/mamonsu/agent.conf
service mamonsu restart
sleep 5
echo && echo && echo "mamonsu version:"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,112 +78,106 @@ format = [%(levelname)s] %(asctime)s - %(name)s - %(message)s
# below listed all available parameters for each plugin to modify.

[health]
interval = 60

[archivecommand]
interval = 60

# Besides standard autovacuum workers count, mamonsu also counts autovacuum utilization.
# But this metric is instantaneous, so recommended to run this plugin frequently
# to get a complete picture of autovacuum utilization.
[autovacuum]
interval = 30
max_memory_usage = 41943040
interval = 15

[bgwriter]
interval = 60

[cfs]
force_enable = False
interval = 60

[checkpoint]
interval = 300
interval = 15

[connections]
interval = 60
percent_connections_tr = 90
interval = 15

[databases]
interval = 300
bloat_scale = 0.2
min_rows = 50
interval = 15

[pghealth]
interval = 60
uptime = 600
cache = 80
interval = 15

[instance]
interval = 60
interval = 15

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

[oldest]
interval = 60
[statements]
interval = 15

[pgbuffercache]
interval = 60

[pglocks]
interval = 60
interval = 15

# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit.
# https://www.postgresql.org/docs/current/sql-prepare-transaction.html
# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html
# max_prepared_transaction_time - age of prepared transaction in seconds.
# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires.
[preparedtransaction]
interval = 60
[waitsampling]
interval = 15

# Get size of relations defined in this section
# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size.
# Example:
# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
# If the relation is blocked by some process such as vacuum full or create index, the result will be -1
# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations.
[relationssize]
enabled = True
relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config
[checkpoint]
max_checkpoint_by_wal_in_hour = 12
interval = 15

[replication]
interval = 60
[oldest]
max_xid_age = 18000000
max_query_time = 18000
interval = 15

[statstatements]
interval = 60
[pglocks]
interval = 15

[waitsampling]
interval = 60
[cfs]
force_enable = False
interval = 15

[wal]
interval = 60
[archivecommand]
max_count_files = 2
interval = 15

[disksizes]
interval = 60
[procstat]
interval = 15

[diskstats]
interval = 60
interval = 15

[la]
interval = 60
[disksizes]
vfs_percent_free = 10
vfs_inode_percent_free = 10
interval = 15

[memory]
interval = 60
interval = 15

[net]
interval = 60
[systemuptime]
up_time = 300
interval = 15

[openfiles]
interval = 60
interval = 15

[net]
interval = 15

[la]
interval = 15

[zbxsender]
interval = 10

[logsender]
interval = 2

[agentapi]
interval = 15

# Get age (in seconds) of the oldest running prepared transaction and number of all prepared transactions for two-phase commit.
# https://www.postgresql.org/docs/current/sql-prepare-transaction.html
# https://www.postgresql.org/docs/12/view-pg-prepared-xacts.html
# max_prepared_transaction_time - age of prepared transaction in seconds.
# If pgsql.prepared.oldest exceeds max_prepared_transaction_time the trigger fires.
[preparedtransaction]
max_prepared_transaction_time = 60
interval = 15

# Get size of backup catalogs stroring all WAL and backup files using pg_probackup
# (https://github.com/postgrespro/pg_probackup)
Expand All @@ -194,17 +188,29 @@ interval = 300
backup_dirs = /backup_dir1,/backup_dir2
pg_probackup_path = /usr/bin/pg_probackup-11

[procstat]
interval = 60

[systemuptime]
interval = 60

[agentapi]
interval = 60

[logsender]
interval = 2
# Get size of relations defined in this section
# Relations - comma separated list of objects - tables and endexes (database_name.schema.relation) used to calculate relations size.
# Example:
# relations=postgres.pg_catalog.pg_class,postgres.pg_catalog.pg_user
# If the relation is blocked by some process such as vacuum full or create index, the result will be -1
# by default this plugin disabled. To enable this plugin - set bellow "enabled = False" and define a list of relations.
[relationssize]
enabled = True
relations=postgres.pg_catalog.pg_class,mamonsu_test_db.mamonsu.config
interval = 15

[zbxsender]
interval = 10
# This plugin allows detects possible memory leaks while working with PostgreSQL using /proc/pid/status and /proc/pid/statm
# We use RES and SHR difference to calculate approximate volume of private anonymous backend memory.
# If it exceeds private_anon_mem_threshold then that pid will be added to a message. An example is presented below
# statm - 'pid: {pid}, RES {RES} - SHR {SHR} more then {private_anon_mem_threshold}\n'
# Since Linux 4.5 RssAnon, RssFile and RssShmem have been added.
# They allows to distinguish types of memory such as private anonymous, file-backed, and shared anonymous memory.
# We are interested in RssAnon. If its value exceeds private_anon_mem_threshold then that pid will also be added to a message.
# By default this plugin disabled. To enable this plugin - set bellow "enabled = False"
# #interval - (onitoring frequency in seconds. 60 seconds by default
# private_anon_mem_threshold - memory volume threshold after which we need an investigation about memory leak. 1GB by default.
# Possible values MB, GB, TB. For example 1GB
[memoryleakdiagnostic]
enabled = True
interval = 15
private_anon_mem_threshold = 1GB
3 changes: 1 addition & 2 deletions github-actions-tests/sources/metrics-linux-10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ pgsql.archive_command[archived_files]
pgsql.archive_command[count_files_to_archive]
pgsql.archive_command[failed_trying_to_archive]
pgsql.archive_command[size_files_to_archive]
pgsql.autovacuum.count[]
pgsql.autovacuum.utilization[]
pgsql.autovacumm.count[]
pgsql.bgwriter[buffers_alloc]
pgsql.bgwriter[buffers_backend]
pgsql.bgwriter[buffers_backend_fsync]
Expand Down
3 changes: 1 addition & 2 deletions github-actions-tests/sources/metrics-linux-11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ pgsql.archive_command[archived_files]
pgsql.archive_command[count_files_to_archive]
pgsql.archive_command[failed_trying_to_archive]
pgsql.archive_command[size_files_to_archive]
pgsql.autovacuum.count[]
pgsql.autovacuum.utilization[]
pgsql.autovacumm.count[]
pgsql.bgwriter[buffers_alloc]
pgsql.bgwriter[buffers_backend]
pgsql.bgwriter[buffers_backend_fsync]
Expand Down
3 changes: 1 addition & 2 deletions github-actions-tests/sources/metrics-linux-12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ pgsql.archive_command[archived_files]
pgsql.archive_command[count_files_to_archive]
pgsql.archive_command[failed_trying_to_archive]
pgsql.archive_command[size_files_to_archive]
pgsql.autovacuum.count[]
pgsql.autovacuum.utilization[]
pgsql.autovacumm.count[]
pgsql.bgwriter[buffers_alloc]
pgsql.bgwriter[buffers_backend]
pgsql.bgwriter[buffers_backend_fsync]
Expand Down
3 changes: 1 addition & 2 deletions github-actions-tests/sources/metrics-linux-13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ pgsql.archive_command[archived_files]
pgsql.archive_command[count_files_to_archive]
pgsql.archive_command[failed_trying_to_archive]
pgsql.archive_command[size_files_to_archive]
pgsql.autovacuum.count[]
pgsql.autovacuum.utilization[]
pgsql.autovacumm.count[]
pgsql.bgwriter[buffers_alloc]
pgsql.bgwriter[buffers_backend]
pgsql.bgwriter[buffers_backend_fsync]
Expand Down
3 changes: 1 addition & 2 deletions github-actions-tests/sources/metrics-linux-14.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ pgsql.archive_command[archived_files]
pgsql.archive_command[count_files_to_archive]
pgsql.archive_command[failed_trying_to_archive]
pgsql.archive_command[size_files_to_archive]
pgsql.autovacuum.count[]
pgsql.autovacuum.utilization[]
pgsql.autovacumm.count[]
pgsql.bgwriter[buffers_alloc]
pgsql.bgwriter[buffers_backend]
pgsql.bgwriter[buffers_backend_fsync]
Expand Down
3 changes: 1 addition & 2 deletions github-actions-tests/sources/metrics-linux-9.6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ pgsql.archive_command[archived_files]
pgsql.archive_command[count_files_to_archive]
pgsql.archive_command[failed_trying_to_archive]
pgsql.archive_command[size_files_to_archive]
pgsql.autovacuum.count[]
pgsql.autovacuum.utilization[]
pgsql.autovacumm.count[]
pgsql.bgwriter[buffers_alloc]
pgsql.bgwriter[buffers_backend]
pgsql.bgwriter[buffers_backend_fsync]
Expand Down
3 changes: 1 addition & 2 deletions github-actions-tests/sources/metrics-linux-full-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ pgsql.archive_command[archived_files]
pgsql.archive_command[count_files_to_archive]
pgsql.archive_command[failed_trying_to_archive]
pgsql.archive_command[size_files_to_archive]
pgsql.autovacuum.count[]
pgsql.autovacuum.utilization[]
pgsql.autovacumm.count[]
pgsql.bgwriter[buffers_alloc]
pgsql.bgwriter[buffers_backend]
pgsql.bgwriter[buffers_backend_fsync]
Expand Down
2 changes: 1 addition & 1 deletion mamonsu/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__author__ = 'Dmitry Vasilyev'
__author_email__ = '[email protected]'
__description__ = 'Monitoring agent for PostgreSQL'
__version__ = '3.5.0'
__version__ = '3.5.1'
__licence__ = 'BSD'

__url__ = 'https://github.com/postgrespro/mamonsu'
Expand Down
3 changes: 0 additions & 3 deletions mamonsu/lib/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,6 @@ def items(self, template, dashboard=False):
def graphs(self, template, dashboard=False):
return None

def macros(self, template, dashboard=False):
return None

def triggers(self, template, dashboard=False):
return None

Expand Down
Loading

0 comments on commit 4501e4d

Please sign in to comment.