I wanted to implement checking a page that is available for the two data centers. However, web scenarios zabbixie 2.2.1 does not properly handle headers. I got the idea that it will use for the apache proxy, but I think I made some mistakes in the configuration. Below is the two files and vhosts hosts file
First Datacenter
<VirtualHost *:80>
ServerName firstDC.test.be
ServerAdmin admins@test.com
Header set Host "test.be"
ProxyPreserveHost On
ProxyPass / https://222.222.22.22/
ProxyPassReverse / https://222.222.22.22/
LogLevel warn
ErrorLog /var/log/httpd/firstDC.log
CustomLog /var/log/httpd/firstDC.log combined
</VirtualHost>
Second Datacenter
<VirtualHost *:80>
ServerName secondDC.test.be
ServerAdmin admins@test.com
Header set Host "test.be"
ProxyPreserveHost On
ProxyPass / https://333.333.33.33/
ProxyPassReverse / https://333.333.33.33/
LogLevel warn
ErrorLog /var/log/httpd/secondDC.log
CustomLog /var/log/httpd/secondDC.log combined
</VirtualHost>
Host file
127.0.0.1 firstDC.test.be secondDC.test.be
192.168.178.151 TESTLINUX TESTLINUX.domain.local firstDC.test.be secondDC.test.be
Please give me advice where is mistake ?
Regards
Mick
Best Answer
This is typical use case for Zabbix 2.4 - custom headers in web monitoring - https://www.zabbix.com/documentation/2.4/manual/web_monitoring
Do you have any serious reason to use Zabbix 2.2?
IMHO you should to add: