-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathexport.sh
45 lines (38 loc) · 1.53 KB
/
export.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
# 'mamonsu export' tool testing
# default parameters:
PG_VERSION="14"
for i in "$@"
do
case $i in
--pg-version=*)
PG_VERSION="${i#*=}"
shift
;;
*)
# unknown option
;;
esac
done
echo && echo
echo "================================================================================================================="
echo "---> Test MAMONSU EXPORT tool"
echo && echo
echo && echo "------> mamonsu export config mamonsu.conf --add-plugins"
mamonsu export config mamonsu.conf --add-plugins=/etc/mamonsu/plugins
file mamonsu.conf || exit 11
echo && echo "------> mamonsu export template template.xml --add-plugins"
mamonsu export template template.xml --add-plugins=/etc/mamonsu/plugins
file template.xml || exit 11
echo && echo "------> mamonsu export zabbix-parameters zabbix.conf --add-plugins=/etc/mamonsu/plugins --config=/etc/mamonsu/agent.conf --pg-version=${PG_VERSION}"
mamonsu export zabbix-parameters zabbix.conf --add-plugins=/etc/mamonsu/plugins --config=/etc/mamonsu/agent.conf --pg-version=${PG_VERSION}
file zabbix.conf || exit 11
echo && echo "------> mamonsu export zabbix-template zabbix_template.xml --template-name=\"mamonsu-zabbix\" --add-plugins=/etc/mamonsu/plugins --config=/etc/mamonsu/agent.conf"
mamonsu export zabbix-template zabbix_template.xml --template-name="mamonsu-zabbix" --add-plugins=/etc/mamonsu/plugins --config=/etc/mamonsu/agent.conf
file zabbix_template.xml || exit 11
rm -rf mamonsu.conf
rm -rf template.xml
rm -rf zabbix.conf
rm -rf scripts/
rm -rf zabbix_template.xml
exit 0