Commit 6bea6ebd authored by JooHan Hong's avatar JooHan Hong

zabbix-ha contents input4

parent 216e12f0
Pipeline #6970 passed with stages
in 1 minute and 3 seconds
......@@ -178,4 +178,85 @@ DBPassword=ghdwngkselql
Pacemaker는 Heartbeat Network으로 구성되기 때문에 다음과 같이 `/etc/hosts` 파일에 IP를 설정한다.
```bash
# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.0.211 zabbix211
172.16.0.217 zabbix217
```
1. 패키지 설치 및 기본구성
```bash
# yum install pcs fence-agents-all
# systemctl start pcsd; systemctl enable pcsd
# echo 패스워드 | passwd --stdin hacluster
# pcs cluster auth zabbix211 zabbix217
# pcs cluster setup --start --name ZABBIX zabbix211 zabbix217
# pcs cluster enable --all
# pcs property set stonith-enabled=false
# pcs property set no-quorum-policy=ignore
```
2. VIP 클러스터 리소소 구성
```bash
# pcs resource create PU-VIP IPaddr2 ip=61.100.0.244 cidr_netmask=32 nic=eth0 op monitor interval=10s timeout=30s on-fail=standby
# pcs resource create PR-VIP IPaddr2 ip=172.16.0.244 cidr_netmask=32 nic=eth1 op monitor interval=10s timeout=30s on-fail=standby
```
3. Zabbix Server 요소별 리소스 구성
```bash
# pcs resource create HTTPD systemd:httpd
# pcs resource create PHP-FPM systemd:rh-php72-php-fpm
# pcs resource create GRAFANA systemd:grafana-server
# pcs resource create ZABBIX systemd:zabbix-server
```
> GRAFANA는 Zabbix의 그래프 인터페이스를 개선하기 위한 연동이다. Grafana는 아주 훌륭한 그래프를 제공해 준다.
4. 클러스터 리소스의 순서 제약조건을 구성
```bash
# pcs constraint order start PU-VIP then start PR-VIP
# pcs constraint order start PR-VIP then start PHP-FPM
# pcs constraint order start PHP-FPM then start HTTPD
# pcs constraint order start HTTPD then start GRAFANA
# pcs constraint order start GRAFANA then start ZABBIX
```
5. 요소별 리소스가 위치하는 제약조건을 구성
```bash
# pcs constraint colocation add PU-VIP with PR-VIP
# pcs constraint colocation add PR-VIP with PHP-FPM
# pcs constraint colocation add PHP-FPM with HTTPD
# pcs constraint colocation add HTTPD with GRAFANA
# pcs constraint colocation add GRAFANA with ZABBIX
# pcs constraint location ZABBIX prefers zabbix211=100
```
!참고 : 다음은 Zabbix Proxy의 Pacemaker 구성내역이다.
```bash
# pcs resource create PU-VIP IPaddr2 ip=61.100.0.220 cidr_netmask=32 nic=eth0 op monitor interval=10s timeout=30s on-fail=standby
# pcs resource create PR-VIP IPaddr2 ip=172.16.0.220 cidr_netmask=32 nic=eth1 op monitor interval=10s timeout=30s on-fail=standby
# pcs resource create ZABBIX-PROXY systemd:zabbix-proxy
# pcs constraint order start PU-VIP then start PR-VIP
# pcs constraint order start PR-VIP then start ZABBIX-PROXY
# pcs constraint colocation add PU-VIP with PR-VIP
# pcs constraint colocation add PR-VIP with ZABBIX-PROXY
# pcs constraint location ZABBIX-PROXY prefers zabbix-proxy224=100
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment