Skip to content

Commit

Permalink
cicd: fixed failing pipelines
Browse files Browse the repository at this point in the history
- workaround possible /sys/fs/cgroup issue
- add test mertric files for Postgres 16 and 17
- install pg_buffercache extension in test DB
- fix system.uptime expected metric name
  • Loading branch information
mstyushin committed Dec 13, 2024
1 parent a1b0f51 commit 9cafa89
Show file tree
Hide file tree
Showing 11 changed files with 260 additions and 11 deletions.
7 changes: 5 additions & 2 deletions github-actions-tests/mamonsu_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ if [ "${OS%:*}" = "centos" ]; then
make rpm
sudo rpm -i ./mamonsu*.rpm
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf
systemctl daemon-reload
systemctl restart mamonsu
# ensuring mamonsu can actually start
sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu
/etc/init.d/mamonsu restart
sleep 5
echo && echo && echo "mamonsu version:"
mamonsu --version
Expand All @@ -65,6 +66,8 @@ elif [ "${OS%:*}" = "ubuntu" ]; then
make deb
sudo dpkg -i ./mamonsu*.deb
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf
# ensuring mamonsu can actually start
sudo su -s /bin/bash -c "mamonsu bootstrap -x --user postgres -d mamonsu_test_db" mamonsu
service mamonsu restart
sleep 5
echo && echo && echo "mamonsu version:"
Expand Down
4 changes: 2 additions & 2 deletions github-actions-tests/metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ END
sleep 120

# read metric for specific version
while read metric; do
for metric in $(cat ${METRICS_FILE}); do
GREP=$( mamonsu agent metric-get ${metric} | grep "pgsql\|sys\|mamonsu" )
if [ -z "$GREP" ]; then
echo "---> ERROR: Cannot found metric $metric"
exit 11
fi
done <"${METRICS_FILE}"
done

echo && echo
2 changes: 1 addition & 1 deletion github-actions-tests/sources/metrics-linux-10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ system.vfs.free[/]
system.vfs.percent_free[/]
system.vfs.percent_inode_free[/]
system.vfs.used[/]
system.up_time[]
system.uptime[]
2 changes: 1 addition & 1 deletion github-actions-tests/sources/metrics-linux-11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ system.vfs.free[/]
system.vfs.percent_free[/]
system.vfs.percent_inode_free[/]
system.vfs.used[/]
system.up_time[]
system.uptime[]
2 changes: 1 addition & 1 deletion github-actions-tests/sources/metrics-linux-12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ system.vfs.free[/]
system.vfs.percent_free[/]
system.vfs.percent_inode_free[/]
system.vfs.used[/]
system.up_time[]
system.uptime[]
2 changes: 1 addition & 1 deletion github-actions-tests/sources/metrics-linux-13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ system.vfs.free[/]
system.vfs.percent_free[/]
system.vfs.percent_inode_free[/]
system.vfs.used[/]
system.up_time[]
system.uptime[]
2 changes: 1 addition & 1 deletion github-actions-tests/sources/metrics-linux-14.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ system.vfs.free[/]
system.vfs.percent_free[/]
system.vfs.percent_inode_free[/]
system.vfs.used[/]
system.up_time[]
system.uptime[]
130 changes: 130 additions & 0 deletions github-actions-tests/sources/metrics-linux-16.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
mamonsu.memory.rss[max]
mamonsu.plugin.errors[]
mamonsu.plugin.keepalive[]
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.bgwriter[buffers_alloc]
pgsql.bgwriter[buffers_backend]
pgsql.bgwriter[buffers_backend_fsync]
pgsql.bgwriter[buffers_checkpoint]
pgsql.bgwriter[buffers_clean]
pgsql.bgwriter[maxwritten_clean]
pgsql.blocks[hit]
pgsql.blocks[read]
pgsql.checkpoint[checkpoint_sync_time]
pgsql.checkpoint[count_timed]
pgsql.checkpoint[count_wal]
pgsql.checkpoint[write_time]
pgsql.connections[active]
pgsql.connections[disabled]
pgsql.connections[fastpath_function_call]
pgsql.connections[idle]
pgsql.connections[idle_in_transaction]
pgsql.connections[idle_in_transaction_aborted]
pgsql.connections[max_connections]
pgsql.connections[other]
pgsql.connections[total]
pgsql.connections[waiting]
pgsql.database.discovery[]
pgsql.database.bloating_tables[mamonsu_test_db]
pgsql.database.bloating_tables[postgres]
pgsql.database.invalid_indexes[mamonsu_test_db]
pgsql.database.invalid_indexes[postgres]
pgsql.database.max_age[mamonsu_test_db]
pgsql.database.max_age[postgres]
pgsql.database.size[mamonsu_test_db]
pgsql.database.size[postgres]
pgsql.events[checksum_failures]
pgsql.events[conflicts]
pgsql.events[deadlocks]
pgsql.events[xact_rollback]
pgsql.oldest[transaction_time]
pgsql.oldest[xid_age]
pgsql.ping[]
pgsql.pg_locks[accessexclusive]
pgsql.pg_locks[accessshare]
pgsql.pg_locks[exclusive]
pgsql.pg_locks[rowexclusive]
pgsql.pg_locks[rowshare]
pgsql.pg_locks[share]
pgsql.pg_locks[sharerowexclusive]
pgsql.pg_locks[shareupdateexclusive]
pgsql.parallel[queries]
pgsql.prepared.count
pgsql.prepared.oldest
pgsql.relation.size[]
pgsql.relation.size[mamonsu_test_db.mamonsu.config]
pgsql.relation.size[postgres.pg_catalog.pg_class]
pgsql.replication.non_active_slots[]
pgsql.replication_lag[sec]
pgsql.replication_lag[sec]
pgsql.stat[dirty_bytes]
pgsql.stat[other_time]
pgsql.stat[read_bytes]
pgsql.stat[read_time]
pgsql.stat[wal_bytes]
pgsql.stat[wal_fpi]
pgsql.stat[wal_records]
pgsql.stat[write_bytes]
pgsql.stat[write_time]
pgsql.stat_info[dealloc]
pgsql.stat_info[stats_reset]
pgsql.temp[bytes]
pgsql.temp[files]
pgsql.transactions[committed]
pgsql.tuples[deleted]
pgsql.tuples[fetched]
pgsql.tuples[inserted]
pgsql.tuples[returned]
pgsql.tuples[updated]
pgsql.uptime[]
pgsql.wal.buffers_full[]
pgsql.wal.count[]
pgsql.wal.fpi.count[]
pgsql.wal.records.count[]
pgsql.wal.sync_time[]
pgsql.wal.write[]
pgsql.wal.write_time[]
system.cpu[idle]
system.cpu[iowait]
system.cpu[irq]
system.cpu[nice]
system.cpu[softirq]
system.cpu[system]
system.cpu[user]
system.disk.discovery[]
system.disk.all_read[]
system.disk.all_write[]
system.disk.all_read_b[]
system.disk.all_write_b[]
system.la[1]
system.memory[active]
system.memory[available]
system.memory[buffers]
system.memory[cached]
system.memory[committed]
system.memory[inactive]
system.memory[mapped]
system.memory[page_tables]
system.memory[slab]
system.memory[swap]
system.memory[swap_cache]
system.memory[total]
system.memory[vmalloc_used]
system.memory[unused]
system.memory[used]
system.net.discovery[]
system.open_files[]
system.processes[blocked]
system.processes[forkrate]
system.processes[running]
system.vfs.discovery[]
system.vfs.free[/]
system.vfs.percent_free[/]
system.vfs.percent_inode_free[/]
system.vfs.used[/]
system.uptime[]
116 changes: 116 additions & 0 deletions github-actions-tests/sources/metrics-linux-17.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
mamonsu.memory.rss[max]
mamonsu.plugin.errors[]
mamonsu.plugin.keepalive[]
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.bgwriter[buffers_alloc]
pgsql.bgwriter[buffers_clean]
pgsql.bgwriter[maxwritten_clean]
pgsql.blocks[hit]
pgsql.blocks[read]
pgsql.checkpoint[checkpoint_sync_time]
pgsql.checkpoint[count_timed]
pgsql.checkpoint[count_wal]
pgsql.checkpoint[write_time]
pgsql.connections[active]
pgsql.connections[disabled]
pgsql.connections[fastpath_function_call]
pgsql.connections[idle]
pgsql.connections[idle_in_transaction]
pgsql.connections[idle_in_transaction_aborted]
pgsql.connections[max_connections]
pgsql.connections[other]
pgsql.connections[total]
pgsql.connections[waiting]
pgsql.database.discovery[]
pgsql.database.bloating_tables[mamonsu_test_db]
pgsql.database.bloating_tables[postgres]
pgsql.database.invalid_indexes[mamonsu_test_db]
pgsql.database.invalid_indexes[postgres]
pgsql.database.max_age[mamonsu_test_db]
pgsql.database.max_age[postgres]
pgsql.database.size[mamonsu_test_db]
pgsql.database.size[postgres]
pgsql.events[checksum_failures]
pgsql.events[conflicts]
pgsql.events[deadlocks]
pgsql.events[xact_rollback]
pgsql.oldest[transaction_time]
pgsql.oldest[xid_age]
pgsql.ping[]
pgsql.pg_locks[accessexclusive]
pgsql.pg_locks[accessshare]
pgsql.pg_locks[exclusive]
pgsql.pg_locks[rowexclusive]
pgsql.pg_locks[rowshare]
pgsql.pg_locks[share]
pgsql.pg_locks[sharerowexclusive]
pgsql.pg_locks[shareupdateexclusive]
pgsql.parallel[queries]
pgsql.prepared.count
pgsql.prepared.oldest
pgsql.relation.size[]
pgsql.relation.size[mamonsu_test_db.mamonsu.config]
pgsql.relation.size[postgres.pg_catalog.pg_class]
pgsql.replication.non_active_slots[]
pgsql.replication_lag[sec]
pgsql.replication_lag[sec]
pgsql.temp[bytes]
pgsql.temp[files]
pgsql.transactions[committed]
pgsql.tuples[deleted]
pgsql.tuples[fetched]
pgsql.tuples[inserted]
pgsql.tuples[returned]
pgsql.tuples[updated]
pgsql.uptime[]
pgsql.wal.buffers_full[]
pgsql.wal.count[]
pgsql.wal.fpi.count[]
pgsql.wal.records.count[]
pgsql.wal.sync_time[]
pgsql.wal.write[]
pgsql.wal.write_time[]
system.cpu[idle]
system.cpu[iowait]
system.cpu[irq]
system.cpu[nice]
system.cpu[softirq]
system.cpu[system]
system.cpu[user]
system.disk.discovery[]
system.disk.all_read[]
system.disk.all_write[]
system.disk.all_read_b[]
system.disk.all_write_b[]
system.la[1]
system.memory[active]
system.memory[available]
system.memory[buffers]
system.memory[cached]
system.memory[committed]
system.memory[inactive]
system.memory[mapped]
system.memory[page_tables]
system.memory[slab]
system.memory[swap]
system.memory[swap_cache]
system.memory[total]
system.memory[vmalloc_used]
system.memory[unused]
system.memory[used]
system.net.discovery[]
system.open_files[]
system.processes[blocked]
system.processes[forkrate]
system.processes[running]
system.vfs.discovery[]
system.vfs.free[/]
system.vfs.percent_free[/]
system.vfs.percent_inode_free[/]
system.vfs.used[/]
system.uptime[]
2 changes: 1 addition & 1 deletion github-actions-tests/sources/metrics-linux-9.6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ system.vfs.free[/]
system.vfs.percent_free[/]
system.vfs.percent_inode_free[/]
system.vfs.used[/]
system.up_time[]
system.uptime[]
2 changes: 1 addition & 1 deletion github-actions-tests/sources/metrics-linux-full-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ system.vfs.free[/]
system.vfs.percent_free[/]
system.vfs.percent_inode_free[/]
system.vfs.used[/]
system.up_time[]
system.uptime[]

0 comments on commit 9cafa89

Please sign in to comment.