Skip to content

Commit d29da5d

Browse files
committed
Merge branch 'dev'
2 parents fd75eb0 + 55bff23 commit d29da5d

24 files changed

+459
-93
lines changed

.github/workflows/mamonsu-tests-dev.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jobs:
3636
- docker_os: 'centos:8'
3737
pg_version: '16'
3838
zabbix_version: '6.4.13'
39+
- docker_os: 'centos:8'
40+
pg_version: '17'
41+
zabbix_version: '6.4.13'
42+
- docker_os: 'ubuntu:22.04'
43+
pg_version: '17'
44+
zabbix_version: '6.4.13'
3945
- docker_os: 'ubuntu:24.04'
4046
pg_version: '16'
4147
zabbix_version: '6.4.13'
@@ -80,7 +86,7 @@ jobs:
8086
echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT
8187
id: zabbix_address
8288
- name: Edit Zabbix address in agent.conf
83-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf
89+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.10.conf
8490

8591
- name: Copy test scripts to container
8692
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/

.github/workflows/mamonsu-tests-master.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT
9292
id: zabbix_address
9393
- name: Edit Zabbix address in agent.conf
94-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf
94+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.10.conf
9595

9696
- name: Copy test scripts to container
9797
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Supported platforms:
1818
- Windows;
1919

2020
Supported Zabbix server versions: 4.0.44 - 6.4.13
21-
Supported PostgreSQL versions: 12 - 16
21+
22+
Supported PostgreSQL versions: 12 - 17
2223
***
2324

2425
***Table of Contents***

documentation/metrics.md

+38-4
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ Default config:
19971997
</tr>
19981998
<tr>
19991999
<th>Supported Version</th>
2000-
<td>9.5+</td>
2000+
<td>9.5 - 16</td>
20012001
</tr>
20022002
</table>
20032003

@@ -2030,7 +2030,7 @@ Default config:
20302030
</tr>
20312031
<tr>
20322032
<th>Supported Version</th>
2033-
<td>9.5+</td>
2033+
<td>9.5 - 16</td>
20342034
</tr>
20352035
</table>
20362036

@@ -2096,7 +2096,7 @@ Default config:
20962096
</tr>
20972097
<tr>
20982098
<th>Supported Version</th>
2099-
<td>9.5+</td>
2099+
<td>9.5 - 16</td>
21002100
</tr>
21012101
</table>
21022102

@@ -2208,7 +2208,7 @@ Default config:
22082208

22092209
### Items
22102210

2211-
*Checkpoints metrics* use information from `pg_stat_bgwriter`.
2211+
*Checkpoints metrics* use information from `pg_stat_bgwriter`. Starting from Postgres 17 this information is pulled from view `pg_stat_checkpointer`.
22122212

22132213
- **Checkpoints Sync Time**
22142214

@@ -2341,6 +2341,40 @@ Default config:
23412341

23422342
*Requested Checkpoints* maps `checkpoints_req`.
23432343

2344+
2345+
- **Buffers Written During Checkpoints**
2346+
2347+
Zabbix item:
2348+
<table>
2349+
<tr>
2350+
<th>Name</th>
2351+
<td>PostgreSQL bgwriter: Buffers Written During Checkpoints</td>
2352+
</tr>
2353+
<tr>
2354+
<th>Key</th>
2355+
<td>pgsql.checkpoint[buffers_written]</td>
2356+
</tr>
2357+
<tr>
2358+
<th>Type</th>
2359+
<td>Numeric (float)</td>
2360+
</tr>
2361+
<tr>
2362+
<th>Units</th>
2363+
<td></td>
2364+
</tr>
2365+
<tr>
2366+
<th>Delta</th>
2367+
<td>Simple Change</td>
2368+
</tr>
2369+
<tr>
2370+
<th>Supported Version</th>
2371+
<td>17+</td>
2372+
</tr>
2373+
</table>
2374+
2375+
*Buffers Written During Checkpoints* maps `buffers_written`.
2376+
2377+
23442378
### Graphs
23452379

23462380
<table>

github-actions-tests/mamonsu_build.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ if [ "${OS%:*}" = "centos" ]; then
4141
python3 setup.py build && python3 setup.py install
4242
make rpm
4343
sudo rpm -i ./mamonsu*.rpm
44-
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf
45-
systemctl daemon-reload
46-
systemctl restart mamonsu
44+
cat /mamonsu/github-actions-tests/sources/agent_3.5.10.conf > /etc/mamonsu/agent.conf
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
@@ -64,7 +65,9 @@ elif [ "${OS%:*}" = "ubuntu" ]; then
6465
python3 setup.py build && python3 setup.py install
6566
make deb
6667
sudo dpkg -i ./mamonsu*.deb
67-
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf
68+
cat /mamonsu/github-actions-tests/sources/agent_3.5.10.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:"

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

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[]

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[]

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[]

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[]

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[]
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[]

0 commit comments

Comments
 (0)