Skip to content

Commit 9cafa89

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 9cafa89

11 files changed

+260
-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 -x --user postgres -d mamonsu_test_db" 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 -x --user postgres -d mamonsu_test_db" 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/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

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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.oldest[transaction_time]
46+
pgsql.oldest[xid_age]
47+
pgsql.ping[]
48+
pgsql.pg_locks[accessexclusive]
49+
pgsql.pg_locks[accessshare]
50+
pgsql.pg_locks[exclusive]
51+
pgsql.pg_locks[rowexclusive]
52+
pgsql.pg_locks[rowshare]
53+
pgsql.pg_locks[share]
54+
pgsql.pg_locks[sharerowexclusive]
55+
pgsql.pg_locks[shareupdateexclusive]
56+
pgsql.parallel[queries]
57+
pgsql.prepared.count
58+
pgsql.prepared.oldest
59+
pgsql.relation.size[]
60+
pgsql.relation.size[mamonsu_test_db.mamonsu.config]
61+
pgsql.relation.size[postgres.pg_catalog.pg_class]
62+
pgsql.replication.non_active_slots[]
63+
pgsql.replication_lag[sec]
64+
pgsql.replication_lag[sec]
65+
pgsql.stat[dirty_bytes]
66+
pgsql.stat[other_time]
67+
pgsql.stat[read_bytes]
68+
pgsql.stat[read_time]
69+
pgsql.stat[wal_bytes]
70+
pgsql.stat[wal_fpi]
71+
pgsql.stat[wal_records]
72+
pgsql.stat[write_bytes]
73+
pgsql.stat[write_time]
74+
pgsql.stat_info[dealloc]
75+
pgsql.stat_info[stats_reset]
76+
pgsql.temp[bytes]
77+
pgsql.temp[files]
78+
pgsql.transactions[committed]
79+
pgsql.tuples[deleted]
80+
pgsql.tuples[fetched]
81+
pgsql.tuples[inserted]
82+
pgsql.tuples[returned]
83+
pgsql.tuples[updated]
84+
pgsql.uptime[]
85+
pgsql.wal.buffers_full[]
86+
pgsql.wal.count[]
87+
pgsql.wal.fpi.count[]
88+
pgsql.wal.records.count[]
89+
pgsql.wal.sync_time[]
90+
pgsql.wal.write[]
91+
pgsql.wal.write_time[]
92+
system.cpu[idle]
93+
system.cpu[iowait]
94+
system.cpu[irq]
95+
system.cpu[nice]
96+
system.cpu[softirq]
97+
system.cpu[system]
98+
system.cpu[user]
99+
system.disk.discovery[]
100+
system.disk.all_read[]
101+
system.disk.all_write[]
102+
system.disk.all_read_b[]
103+
system.disk.all_write_b[]
104+
system.la[1]
105+
system.memory[active]
106+
system.memory[available]
107+
system.memory[buffers]
108+
system.memory[cached]
109+
system.memory[committed]
110+
system.memory[inactive]
111+
system.memory[mapped]
112+
system.memory[page_tables]
113+
system.memory[slab]
114+
system.memory[swap]
115+
system.memory[swap_cache]
116+
system.memory[total]
117+
system.memory[vmalloc_used]
118+
system.memory[unused]
119+
system.memory[used]
120+
system.net.discovery[]
121+
system.open_files[]
122+
system.processes[blocked]
123+
system.processes[forkrate]
124+
system.processes[running]
125+
system.vfs.discovery[]
126+
system.vfs.free[/]
127+
system.vfs.percent_free[/]
128+
system.vfs.percent_inode_free[/]
129+
system.vfs.used[/]
130+
system.uptime[]

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

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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.oldest[transaction_time]
43+
pgsql.oldest[xid_age]
44+
pgsql.ping[]
45+
pgsql.pg_locks[accessexclusive]
46+
pgsql.pg_locks[accessshare]
47+
pgsql.pg_locks[exclusive]
48+
pgsql.pg_locks[rowexclusive]
49+
pgsql.pg_locks[rowshare]
50+
pgsql.pg_locks[share]
51+
pgsql.pg_locks[sharerowexclusive]
52+
pgsql.pg_locks[shareupdateexclusive]
53+
pgsql.parallel[queries]
54+
pgsql.prepared.count
55+
pgsql.prepared.oldest
56+
pgsql.relation.size[]
57+
pgsql.relation.size[mamonsu_test_db.mamonsu.config]
58+
pgsql.relation.size[postgres.pg_catalog.pg_class]
59+
pgsql.replication.non_active_slots[]
60+
pgsql.replication_lag[sec]
61+
pgsql.replication_lag[sec]
62+
pgsql.temp[bytes]
63+
pgsql.temp[files]
64+
pgsql.transactions[committed]
65+
pgsql.tuples[deleted]
66+
pgsql.tuples[fetched]
67+
pgsql.tuples[inserted]
68+
pgsql.tuples[returned]
69+
pgsql.tuples[updated]
70+
pgsql.uptime[]
71+
pgsql.wal.buffers_full[]
72+
pgsql.wal.count[]
73+
pgsql.wal.fpi.count[]
74+
pgsql.wal.records.count[]
75+
pgsql.wal.sync_time[]
76+
pgsql.wal.write[]
77+
pgsql.wal.write_time[]
78+
system.cpu[idle]
79+
system.cpu[iowait]
80+
system.cpu[irq]
81+
system.cpu[nice]
82+
system.cpu[softirq]
83+
system.cpu[system]
84+
system.cpu[user]
85+
system.disk.discovery[]
86+
system.disk.all_read[]
87+
system.disk.all_write[]
88+
system.disk.all_read_b[]
89+
system.disk.all_write_b[]
90+
system.la[1]
91+
system.memory[active]
92+
system.memory[available]
93+
system.memory[buffers]
94+
system.memory[cached]
95+
system.memory[committed]
96+
system.memory[inactive]
97+
system.memory[mapped]
98+
system.memory[page_tables]
99+
system.memory[slab]
100+
system.memory[swap]
101+
system.memory[swap_cache]
102+
system.memory[total]
103+
system.memory[vmalloc_used]
104+
system.memory[unused]
105+
system.memory[used]
106+
system.net.discovery[]
107+
system.open_files[]
108+
system.processes[blocked]
109+
system.processes[forkrate]
110+
system.processes[running]
111+
system.vfs.discovery[]
112+
system.vfs.free[/]
113+
system.vfs.percent_free[/]
114+
system.vfs.percent_inode_free[/]
115+
system.vfs.used[/]
116+
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)