Wednesday, December 06, 2017

Zabbix 3.4 for Postgresql 9.6 installation in Centos 7

This installation extended to my home hour, since both Postgresql and Zabbix are new to me.

Followed few articles without much difficulty.

https://www.zabbix.com/documentation/3.4/manual/installation/install_from_packages/rhel_centos
 
follow above, but replace 'mysql' with 'pgsql' 
 
yum install zabbix-server-pgsql
yum install zabbix-proxy-pgsql
yum install zabbix-web-pgsql 
 
 
below is my final packages started with zabbix
 
[oracle@hmc-P55A-UD3 zabbix]$ rpm -qa |grep zabbix
zabbix-get-3.4.4-2.el7.x86_64
zabbix-web-3.4.4-2.el7.noarch
zabbix-release-3.4-2.el7.noarch
zabbix-proxy-pgsql-3.4.4-2.el7.x86_64
zabbix-web-pgsql-3.4.4-2.el7.noarch
zabbix-server-pgsql-3.4.4-2.el7.x86_64
zabbix-agent-3.4.4-2.el7.x86_64
 
 

Zabbix 3 Install on CEntOS 7 with PostgreSQL 9.5

database creation

postgres createuser --pwprompt zabbix
 
postgres createdb -O zabbix zabbix
 
 
logon as postgres
 
 zcat /usr/share/doc/zabbix-proxy-pgsql*/schema.sql.gz |  psql -U zabbix -d zabbix
 
 
-- /etc/httpd/conf.d/zabbix.conf. 
set php_value date.timezone accordingly 
 


Problem starts when I started in web page installation step.

Problem  1  
"system error occurred. please contact zabbix administrator"


Then I realized the agent was not installed and started, but this didn't solve the problem.

Problem  2
 
From the agent logfile /var/log/zabbix/zabbix_agentd.log, it says zabbix-agent failed to connect to 10051


Then I realized the

problem 3  - the zabbix-server failed to start

although the systemctl start zabbix-server.service return 0 , and didn't show any errror on screen.

Errors in var/log/zabbix/zabbix_serverd.log are :

7676:20171206:223117.081 Starting Zabbix Server. Zabbix 3.4.4 (revision 74338).
7676:20171206:223117.081 ****** Enabled features ******
7676:20171206:223117.081 SNMP monitoring: YES
7676:20171206:223117.081 IPMI monitoring: YES
7676:20171206:223117.081 Web monitoring: YES
7676:20171206:223117.081 VMware monitoring: YES
7676:20171206:223117.081 SMTP authentication: YES
7676:20171206:223117.081 Jabber notifications: YES
7676:20171206:223117.081 Ez Texting notifications: YES
7676:20171206:223117.081 ODBC: YES
7676:20171206:223117.081 SSH2 support: YES
7676:20171206:223117.081 IPv6 support: YES
7676:20171206:223117.081 TLS support: YES
7676:20171206:223117.081 ******************************
7676:20171206:223117.081 using configuration file: /etc/zabbix/zabbix_server.conf
7676:20171206:223117.090 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: relation "users" does not exist
LINE 1: select userid from users limit 1
^
[select userid from users limit 1]
7676:20171206:223117.090 cannot use database "zabbix": database is not a Zabbix database
zabbix_server [7686]: cannot open log: cannot create semaphore set: [28] No space left on device
zabbix_server [7691]: cannot open log: cannot create semaphore set: [28] No space left on device



Problem 4 -  PGRES_FATAL_ERROR:ERROR: relation "users" does not exist

Googled this crucial article to my final successwhich tell me should leave default (blank) for DBSchema inside the /etc/zabbix/zabbix_server.conf


Next I attempted to solve  "cannot create semaphore set", but even the zabbix-server is stopped, the tail of logfile still moved on. I guess something not clean with IPC, to safe time , I rebooted my PC, which worked!

The zabbix-server is up without error.


Next, I almost faced no challenges with web page installation steps, as shown below.

Again , there Database schema is important, leave as blank. both public and named as zabbix not working. 





The default login ID is Admin (case sensitive) and password is zabbix

empty dashboard at first logon


enable local serer for moniting


Finally see something.