File tree Expand file tree Collapse file tree 4 files changed +47
-6
lines changed Expand file tree Collapse file tree 4 files changed +47
-6
lines changed Original file line number Diff line number Diff line change @@ -134,4 +134,7 @@ clean_zabbix:
134134 docker rm `docker ps -a -q --filter="name=zabbix-web-apache-pgsql" ` | true
135135 docker stop pg_for_zabbix | true
136136 docker rm pg_for_zabbix | true
137- docker network rm network-local-tests | true
137+ docker network rm network-local-tests | true
138+
139+ installcheck:
140+ $(WORKDIR)/tests/tests.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash -ex
2+
3+ pwd
4+ cd tests
5+ # ##### test mamonsu report *
6+ ./tests/report.sh
7+
8+ # ##### test mamonsu agent *
9+ # ./tests/agent.sh !!! todo
10+
11+ # ##### test mamonsu bootstrap *
12+ # ./tests/bootstrap.sh
13+ #
14+ #
15+ # ###### test mamonsu zabbix *
16+ # mkdir -p /etc/mamonsu/ !!! todo
17+ # sudo cp ../packaging/conf/example.conf /etc/mamonsu/agent.conf
18+ # #ZABBIX_DOCKER_VERSIONS="5.2 5.0 4.4 4.2 4.0 3.4 3.2 3.0"
19+ # ZABBIX_DOCKER_VERSIONS="5.2 5.0 4.4 4.2 4.0 3.2 3.0"
20+ # for VER in $ZABBIX_DOCKER_VERSIONS
21+ # do
22+ # IFS='.' read -ra VER_ARRAY <<<$VER
23+ # VER_MAJOR=${VER_ARRAY[0]}
24+ # VER_MINOR=${VER_ARRAY[1]}
25+ #
26+ # Z_PORT=":80$VER_MAJOR$VER_MINOR"
27+ #
28+ # export Z_URL="http://192.168.26.228:$Z_PORT"
29+ # export Z_USER=Admin
30+ # export Z_PASSWORD=zabbix
31+ # export Z_VERSION=$VER
32+ # echo " Z_URL=$Z_URL,
33+ # Z_USER=$Z_USER
34+ # Z_PASSWORD=$Z_PASSWORD
35+ # Z_VERSION=$Z_VERSION"
36+ # ./tests/zabbix.sh
37+ # done
38+
39+ exit 0
Original file line number Diff line number Diff line change 88
99mkdir -p /etc/mamonsu
1010
11- cat << EOF > /etc/mamonsu/agent.conf
11+ cat << EOF > sudo /etc/mamonsu/agent.conf
1212[postgres]
1313host = 127.0.0.1
1414user = mamonsu_agent
@@ -18,7 +18,6 @@ password = supersecret
1818[zabbix]
1919enabled = False
2020
21-
2221[agent]
2322enabled = True
2423host = 127.0.0.1
@@ -45,5 +44,5 @@ mamonsu agent metric-list
4544mamonsu agent -c /etc/mamonsu/agent.conf version
4645mamonsu agent metric-get system.disk.all_read[] -c /etc/mamonsu/agent.conf
4746mamonsu agent -c /etc/mamonsu/agent.conf metric-list
48-
47+ kill ` jobs -p `
4948exit 0
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ export PSQL="psql -U $PGSUPERUSER"
1515WHOAMI=` whoami`
1616if [[ " $WHOAMI " != " postgres" ]]
1717then
18- $PSQL -U postgres -c " create user $WHOAMI superuser"
19- $PSQL -U postgres -c " create database $WHOAMI owner $WHOAMI "
18+ $PSQL -U postgres -c " create user $WHOAMI superuser" | true
19+ $PSQL -U postgres -c " create database $WHOAMI owner $WHOAMI " | true
2020 export PGSUPERUSER=$WHOAMI
2121 export PSQL=" psql -U $PGSUPERUSER "
2222fi
You can’t perform that action at this time.
0 commit comments