-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathquick-install.txt
85 lines (64 loc) · 2.72 KB
/
quick-install.txt
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
* How to install pg_monz v2
1. requirements
- Zabbix server version 2.0+
- monitored PostgreSQL 9.2+
- monitored pgpool-II 3.4.0
- installing zabbix_agentd to PostgreSQL and pgpool-II host.
- installing zabbix_sender to PostgreSQL and pgpool-II host.
- ServerActive setting in zabbix_agentd.conf (zabbix_sender read this file)
- psql command(and serch path setting) on each PostgreSQL/pgpool server
1. Uploading Zabbix template using Zabbix frontend.
Template_App_PostgreSQL.xml
Template_App_PostgreSQL_SR.xml
Template_App_PostgreSQL_SR_Cluster.xml
Template_App_pgpool-II.xml
Template_App_pgpool-II-36.xml
Template_App_pgpool-II_watchdog.xml
2. Copy usr-local-etc files (pgsql_funcs.conf and pgpool_funcs.conf) to "/usr/local/etc"
#cp usr-local-etc/* /usr/local/etc
default variables for pgsql_funcs.conf
----
PGHOST=127.0.0.1
PGPORT=5432
PGROLE=postgres
PGDATABASE=postgres
----
default variables for pgpool_funcs.conf
----
PGPOOLHOST=127.0.0.1
PGPOOLPORT=9999
PGPOOLROLE=postgres
PGPOOLDATABASE=postgres
PGPOOLCONF=/usr/local/etc/pgpool.conf
----
(*) the definition of configuration directory is in the tempalte macro.
{$PGSCRIPT_CONFDIR}
{$PGPOOLSCRIPTS_CONFDIR}
3. Copy usr-local-bin files (*.sh) to "/usr/local/bin"
#cp usr-local-bin/* /usr/local/bin
(*) the definition of scripts directory is in the template macro.
{$PGSCRIPTDIR}
{$PGPOOLSCRIPTDIR}
4. Define groups using Zabbix frontend.
Create "PostgreSQL" group and add PostgreSQL host to "PostgreSQL" group.
Create "pgpool" group and add pgpool-II host to "pgpool" group.
Each groups are referenced by Template_App_PostgreSQL_SR_Cluster.xml
and Template_App_pgpool-II_watchdog.xml using {$HOST_GROUP} template macro.
5. Check the filepath of zabbix_agentd.conf.
if your installation of zabbix_agentd.conf is not /etc/zabbix/zabbix_agentd.conf,
add {$ZABBIX_AGENTD_CONF} macro to HOST'S MACRO.
# the definition of zabbix_agentd.conf path is in the template macro.
{$ZABBIX_AGENTD_CONF} => /etc/zabbix/zabbix_agentd.conf
6. Link template to host.
Link "Template App PostgreSQL SR" to PostgreSQL host.
Link "Template App pgpool-II" to pgpool-II host.
"Template App PostgreSQL SR Cluster"/ "Template App pgpool-II-watchdog"
are simply counting
-the number of running service (sr/pgpool-II),
-the number of primary server (sr),
-the number of standby server (sr),
-the number of delegate_ip (pgpool-II),
in same {$HOST_GROUP} using zabbix aggregate key.
you want to monitor the split-brain or the number of primary server,
Link the above templates to arbitrary host.
ex) "PostgreSQL Cluster" as a virtual host