Skip to content

Commit e1e17ec

Browse files
author
alexander popov
committed
test: add test in make test for relationssize and preparedtransaction
1 parent ad3f699 commit e1e17ec

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/check.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ directory = /tmp
168168
[log]
169169
file = /var/log/mamonsu/agent.log
170170
level = DEBUG
171+
172+
[relationssize]
173+
enabled = True
174+
relations=pg_catalog.pg_class,pg_catalog.pg_user
175+
interval = 60
176+
177+
[preparedtransaction]
178+
max_prepared_transaction_time = 60
179+
interval = 60
171180
EOF
172181
mamonsu bootstrap -U postgres mamonsu -M mamonsu
173182
##/etc/init.d/mamonsu start
@@ -185,6 +194,9 @@ mamonsu agent -c /etc/mamonsu/agent.conf metric-list | grep system
185194
## metric log
186195
grep utilization /tmp/localhost.log || exit 7
187196
grep 'pgsql\.uptime' /tmp/localhost.log || exit 7
197+
grep 'pgsql\.relation\.size' /tmp/localhost.log || exit 7
198+
grep 'pgsql\.prepared\.count' /tmp/localhost.log || exit 7
199+
grep 'pgsql\.prepared\.oldest' /tmp/localhost.log || exit 7
188200

189201
## error in zabbix server
190202
(mamonsu zabbix item error $ZABBIX_CLIENT_HOST | grep ZBX_NOTSUPPORTED) && exit 8

0 commit comments

Comments
 (0)