Skip to content

Commit 9e11c79

Browse files
committed
cicd: fixed failing pipelines
- 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
1 parent a1b0f51 commit 9e11c79

12 files changed

+265
-11
lines changed

Diff for: github-actions-tests/mamonsu_build.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ if [ "${OS%:*}" = "centos" ]; then
4242
make rpm
4343
sudo rpm -i ./mamonsu*.rpm
4444
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf
45-
systemctl daemon-reload
46-
systemctl restart mamonsu
45+
# ensuring mamonsu can actually start
46+
sudo su -s /bin/bash -c "mamonsu bootstrap --user postgres" mamonsu
47+
/etc/init.d/mamonsu restart
4748
sleep 5
4849
echo && echo && echo "mamonsu version:"
4950
mamonsu --version
@@ -65,6 +66,8 @@ elif [ "${OS%:*}" = "ubuntu" ]; then
6566
make deb
6667
sudo dpkg -i ./mamonsu*.deb
6768
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf
69+
# ensuring mamonsu can actually start
70+
sudo su -s /bin/bash -c "mamonsu bootstrap --user postgres" mamonsu
6871
service mamonsu restart
6972
sleep 5
7073
echo && echo && echo "mamonsu version:"

Diff for: github-actions-tests/metrics.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ END
6060
sleep 120
6161

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

7171
echo && echo

Diff for: github-actions-tests/pg_install.sh

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ sudo -u postgres ${PG_PATH}pg_ctl start -D /pg${PG_VERSION}/data_master/
7878
sleep 3
7979
sudo -u postgres ${PG_PATH}psql -c "CREATE DATABASE mamonsu_test_db;"
8080
sudo -u postgres ${PG_PATH}psql -d mamonsu_test_db -c "CREATE EXTENSION pg_stat_statements;"
81+
sudo -u postgres ${PG_PATH}psql -d mamonsu_test_db -c "CREATE EXTENSION pg_buffercache;"
8182
sudo -u postgres ${PG_PATH}psql -d mamonsu_test_db -c "CREATE TABLE mamonsu_test_table(id serial, value integer);"
8283
sudo -u postgres ${PG_PATH}psql -d mamonsu_test_db -c "INSERT INTO mamonsu_test_table(value) SELECT * FROM generate_series(1, 10000);"
8384
sudo -u postgres ${PG_PATH}psql -c "CREATE USER replicator WITH REPLICATION ENCRYPTED PASSWORD 'secret';"

Diff for: github-actions-tests/sources/metrics-linux-10.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ system.vfs.free[/]
120120
system.vfs.percent_free[/]
121121
system.vfs.percent_inode_free[/]
122122
system.vfs.used[/]
123-
system.up_time[]
123+
system.uptime[]

Diff for: github-actions-tests/sources/metrics-linux-11.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ system.vfs.free[/]
120120
system.vfs.percent_free[/]
121121
system.vfs.percent_inode_free[/]
122122
system.vfs.used[/]
123-
system.up_time[]
123+
system.uptime[]

Diff for: github-actions-tests/sources/metrics-linux-12.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,4 @@ system.vfs.free[/]
121121
system.vfs.percent_free[/]
122122
system.vfs.percent_inode_free[/]
123123
system.vfs.used[/]
124-
system.up_time[]
124+
system.uptime[]

Diff for: github-actions-tests/sources/metrics-linux-13.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,4 @@ system.vfs.free[/]
125125
system.vfs.percent_free[/]
126126
system.vfs.percent_inode_free[/]
127127
system.vfs.used[/]
128-
system.up_time[]
128+
system.uptime[]

Diff for: github-actions-tests/sources/metrics-linux-14.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ system.vfs.free[/]
132132
system.vfs.percent_free[/]
133133
system.vfs.percent_inode_free[/]
134134
system.vfs.used[/]
135-
system.up_time[]
135+
system.uptime[]

Diff for: github-actions-tests/sources/metrics-linux-16.txt

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
mamonsu.memory.rss[max]
2+
mamonsu.plugin.errors[]
3+
mamonsu.plugin.keepalive[]
4+
pgsql.archive_command[archived_files]
5+
pgsql.archive_command[count_files_to_archive]
6+
pgsql.archive_command[failed_trying_to_archive]
7+
pgsql.archive_command[size_files_to_archive]
8+
pgsql.autovacuum.count[]
9+
pgsql.autovacuum.utilization[]
10+
pgsql.bgwriter[buffers_alloc]
11+
pgsql.bgwriter[buffers_backend]
12+
pgsql.bgwriter[buffers_backend_fsync]
13+
pgsql.bgwriter[buffers_checkpoint]
14+
pgsql.bgwriter[buffers_clean]
15+
pgsql.bgwriter[maxwritten_clean]
16+
pgsql.blocks[hit]
17+
pgsql.blocks[read]
18+
pgsql.checkpoint[checkpoint_sync_time]
19+
pgsql.checkpoint[count_timed]
20+
pgsql.checkpoint[count_wal]
21+
pgsql.checkpoint[write_time]
22+
pgsql.connections[active]
23+
pgsql.connections[disabled]
24+
pgsql.connections[fastpath_function_call]
25+
pgsql.connections[idle]
26+
pgsql.connections[idle_in_transaction]
27+
pgsql.connections[idle_in_transaction_aborted]
28+
pgsql.connections[max_connections]
29+
pgsql.connections[other]
30+
pgsql.connections[total]
31+
pgsql.connections[waiting]
32+
pgsql.database.discovery[]
33+
pgsql.database.bloating_tables[mamonsu_test_db]
34+
pgsql.database.bloating_tables[postgres]
35+
pgsql.database.invalid_indexes[mamonsu_test_db]
36+
pgsql.database.invalid_indexes[postgres]
37+
pgsql.database.max_age[mamonsu_test_db]
38+
pgsql.database.max_age[postgres]
39+
pgsql.database.size[mamonsu_test_db]
40+
pgsql.database.size[postgres]
41+
pgsql.events[checksum_failures]
42+
pgsql.events[conflicts]
43+
pgsql.events[deadlocks]
44+
pgsql.events[xact_rollback]
45+
pgsql.memory_leak_diagnostic.count_diff[]
46+
pgsql.memory_leak_diagnostic.msg_text[]
47+
pgsql.oldest[transaction_time]
48+
pgsql.oldest[xid_age]
49+
pgsql.ping[]
50+
pgsql.pg_locks[accessexclusive]
51+
pgsql.pg_locks[accessshare]
52+
pgsql.pg_locks[exclusive]
53+
pgsql.pg_locks[rowexclusive]
54+
pgsql.pg_locks[rowshare]
55+
pgsql.pg_locks[share]
56+
pgsql.pg_locks[sharerowexclusive]
57+
pgsql.pg_locks[shareupdateexclusive]
58+
pgsql.parallel[queries]
59+
pgsql.prepared.count
60+
pgsql.prepared.oldest
61+
pgsql.relation.size[]
62+
pgsql.relation.size[mamonsu_test_db.mamonsu.config]
63+
pgsql.relation.size[postgres.pg_catalog.pg_class]
64+
pgsql.replication.non_active_slots[]
65+
pgsql.replication_lag[sec]
66+
pgsql.replication_lag[sec]
67+
pgsql.stat[dirty_bytes]
68+
pgsql.stat[other_time]
69+
pgsql.stat[read_bytes]
70+
pgsql.stat[read_time]
71+
pgsql.stat[wal_bytes]
72+
pgsql.stat[wal_fpi]
73+
pgsql.stat[wal_records]
74+
pgsql.stat[write_bytes]
75+
pgsql.stat[write_time]
76+
pgsql.stat_info[dealloc]
77+
pgsql.stat_info[stats_reset]
78+
pgsql.temp[bytes]
79+
pgsql.temp[files]
80+
pgsql.transactions[committed]
81+
pgsql.tuples[deleted]
82+
pgsql.tuples[fetched]
83+
pgsql.tuples[inserted]
84+
pgsql.tuples[returned]
85+
pgsql.tuples[updated]
86+
pgsql.uptime[]
87+
pgsql.wal.buffers_full[]
88+
pgsql.wal.count[]
89+
pgsql.wal.fpi.count[]
90+
pgsql.wal.records.count[]
91+
pgsql.wal.sync_time[]
92+
pgsql.wal.write[]
93+
pgsql.wal.write_time[]
94+
system.cpu[idle]
95+
system.cpu[iowait]
96+
system.cpu[irq]
97+
system.cpu[nice]
98+
system.cpu[softirq]
99+
system.cpu[system]
100+
system.cpu[user]
101+
system.disk.discovery[]
102+
system.disk.all_read[]
103+
system.disk.all_write[]
104+
system.disk.all_read_b[]
105+
system.disk.all_write_b[]
106+
system.la[1]
107+
system.memory[active]
108+
system.memory[available]
109+
system.memory[buffers]
110+
system.memory[cached]
111+
system.memory[committed]
112+
system.memory[inactive]
113+
system.memory[mapped]
114+
system.memory[page_tables]
115+
system.memory[slab]
116+
system.memory[swap]
117+
system.memory[swap_cache]
118+
system.memory[total]
119+
system.memory[vmalloc_used]
120+
system.memory[unused]
121+
system.memory[used]
122+
system.net.discovery[]
123+
system.open_files[]
124+
system.processes[blocked]
125+
system.processes[forkrate]
126+
system.processes[running]
127+
system.vfs.discovery[]
128+
system.vfs.free[/]
129+
system.vfs.percent_free[/]
130+
system.vfs.percent_inode_free[/]
131+
system.vfs.used[/]
132+
system.uptime[]

Diff for: github-actions-tests/sources/metrics-linux-17.txt

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
mamonsu.memory.rss[max]
2+
mamonsu.plugin.errors[]
3+
mamonsu.plugin.keepalive[]
4+
pgsql.archive_command[archived_files]
5+
pgsql.archive_command[count_files_to_archive]
6+
pgsql.archive_command[failed_trying_to_archive]
7+
pgsql.archive_command[size_files_to_archive]
8+
pgsql.autovacuum.count[]
9+
pgsql.autovacuum.utilization[]
10+
pgsql.bgwriter[buffers_alloc]
11+
pgsql.bgwriter[buffers_clean]
12+
pgsql.bgwriter[maxwritten_clean]
13+
pgsql.blocks[hit]
14+
pgsql.blocks[read]
15+
pgsql.checkpoint[checkpoint_sync_time]
16+
pgsql.checkpoint[count_timed]
17+
pgsql.checkpoint[count_wal]
18+
pgsql.checkpoint[write_time]
19+
pgsql.connections[active]
20+
pgsql.connections[disabled]
21+
pgsql.connections[fastpath_function_call]
22+
pgsql.connections[idle]
23+
pgsql.connections[idle_in_transaction]
24+
pgsql.connections[idle_in_transaction_aborted]
25+
pgsql.connections[max_connections]
26+
pgsql.connections[other]
27+
pgsql.connections[total]
28+
pgsql.connections[waiting]
29+
pgsql.database.discovery[]
30+
pgsql.database.bloating_tables[mamonsu_test_db]
31+
pgsql.database.bloating_tables[postgres]
32+
pgsql.database.invalid_indexes[mamonsu_test_db]
33+
pgsql.database.invalid_indexes[postgres]
34+
pgsql.database.max_age[mamonsu_test_db]
35+
pgsql.database.max_age[postgres]
36+
pgsql.database.size[mamonsu_test_db]
37+
pgsql.database.size[postgres]
38+
pgsql.events[checksum_failures]
39+
pgsql.events[conflicts]
40+
pgsql.events[deadlocks]
41+
pgsql.events[xact_rollback]
42+
pgsql.memory_leak_diagnostic.count_diff[]
43+
pgsql.memory_leak_diagnostic.msg_text[]
44+
pgsql.oldest[transaction_time]
45+
pgsql.oldest[xid_age]
46+
pgsql.ping[]
47+
pgsql.pg_locks[accessexclusive]
48+
pgsql.pg_locks[accessshare]
49+
pgsql.pg_locks[exclusive]
50+
pgsql.pg_locks[rowexclusive]
51+
pgsql.pg_locks[rowshare]
52+
pgsql.pg_locks[share]
53+
pgsql.pg_locks[sharerowexclusive]
54+
pgsql.pg_locks[shareupdateexclusive]
55+
pgsql.parallel[queries]
56+
pgsql.prepared.count
57+
pgsql.prepared.oldest
58+
pgsql.relation.size[]
59+
pgsql.relation.size[mamonsu_test_db.mamonsu.config]
60+
pgsql.relation.size[postgres.pg_catalog.pg_class]
61+
pgsql.replication.non_active_slots[]
62+
pgsql.replication_lag[sec]
63+
pgsql.replication_lag[sec]
64+
pgsql.temp[bytes]
65+
pgsql.temp[files]
66+
pgsql.transactions[committed]
67+
pgsql.tuples[deleted]
68+
pgsql.tuples[fetched]
69+
pgsql.tuples[inserted]
70+
pgsql.tuples[returned]
71+
pgsql.tuples[updated]
72+
pgsql.uptime[]
73+
pgsql.wal.buffers_full[]
74+
pgsql.wal.count[]
75+
pgsql.wal.fpi.count[]
76+
pgsql.wal.records.count[]
77+
pgsql.wal.sync_time[]
78+
pgsql.wal.write[]
79+
pgsql.wal.write_time[]
80+
system.cpu[idle]
81+
system.cpu[iowait]
82+
system.cpu[irq]
83+
system.cpu[nice]
84+
system.cpu[softirq]
85+
system.cpu[system]
86+
system.cpu[user]
87+
system.disk.discovery[]
88+
system.disk.all_read[]
89+
system.disk.all_write[]
90+
system.disk.all_read_b[]
91+
system.disk.all_write_b[]
92+
system.la[1]
93+
system.memory[active]
94+
system.memory[available]
95+
system.memory[buffers]
96+
system.memory[cached]
97+
system.memory[committed]
98+
system.memory[inactive]
99+
system.memory[mapped]
100+
system.memory[page_tables]
101+
system.memory[slab]
102+
system.memory[swap]
103+
system.memory[swap_cache]
104+
system.memory[total]
105+
system.memory[vmalloc_used]
106+
system.memory[unused]
107+
system.memory[used]
108+
system.net.discovery[]
109+
system.open_files[]
110+
system.processes[blocked]
111+
system.processes[forkrate]
112+
system.processes[running]
113+
system.vfs.discovery[]
114+
system.vfs.free[/]
115+
system.vfs.percent_free[/]
116+
system.vfs.percent_inode_free[/]
117+
system.vfs.used[/]
118+
system.uptime[]

Diff for: github-actions-tests/sources/metrics-linux-9.6.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ system.vfs.free[/]
119119
system.vfs.percent_free[/]
120120
system.vfs.percent_inode_free[/]
121121
system.vfs.used[/]
122-
system.up_time[]
122+
system.uptime[]

Diff for: github-actions-tests/sources/metrics-linux-full-list.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ system.vfs.free[/]
133133
system.vfs.percent_free[/]
134134
system.vfs.percent_inode_free[/]
135135
system.vfs.used[/]
136-
system.up_time[]
136+
system.uptime[]

0 commit comments

Comments
 (0)