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:
134
134
docker rm `docker ps -a -q --filter="name=zabbix-web-apache-pgsql" ` | true
135
135
docker stop pg_for_zabbix | true
136
136
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 8
8
9
9
mkdir -p /etc/mamonsu
10
10
11
- cat << EOF > /etc/mamonsu/agent.conf
11
+ cat << EOF > sudo /etc/mamonsu/agent.conf
12
12
[postgres]
13
13
host = 127.0.0.1
14
14
user = mamonsu_agent
@@ -18,7 +18,6 @@ password = supersecret
18
18
[zabbix]
19
19
enabled = False
20
20
21
-
22
21
[agent]
23
22
enabled = True
24
23
host = 127.0.0.1
@@ -45,5 +44,5 @@ mamonsu agent metric-list
45
44
mamonsu agent -c /etc/mamonsu/agent.conf version
46
45
mamonsu agent metric-get system.disk.all_read[] -c /etc/mamonsu/agent.conf
47
46
mamonsu agent -c /etc/mamonsu/agent.conf metric-list
48
-
47
+ kill ` jobs -p `
49
48
exit 0
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ export PSQL="psql -U $PGSUPERUSER"
15
15
WHOAMI=` whoami`
16
16
if [[ " $WHOAMI " != " postgres" ]]
17
17
then
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
20
20
export PGSUPERUSER=$WHOAMI
21
21
export PSQL=" psql -U $PGSUPERUSER "
22
22
fi
You can’t perform that action at this time.
0 commit comments