Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 451552 - Zabbix Server and PostgreSQL
Summary: Zabbix Server and PostgreSQL
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: zabbix
Version: 9
Hardware: i686
OS: Linux
low
low
Target Milestone: ---
Assignee: Dan Horák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-15 18:28 UTC by Eric Desgranges
Modified: 2008-06-16 10:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-15 19:01:17 UTC


Attachments (Terms of Use)

Description Eric Desgranges 2008-06-15 18:28:03 UTC
Zabbix successfully installed with a PostgreSQL backend, however Zabbix Server
wants to connect to MySQL:

service zabbix start
service zabbix status -> zabbix_server is stopped

------------------------------
  5940:20080615:112302 Starting zabbix_server. ZABBIX 1.4.5.
  5940:20080615:112302 **** Enabled features ****
  5940:20080615:112302 SNMP monitoring:       YES
  5940:20080615:112302 WEB monitoring:        YES
  5940:20080615:112302 Jabber notifications:  YES
  5940:20080615:112302 IPv6 support:           NO
  5940:20080615:112302 **************************
  5940:20080615:112302 Failed to connect to database: Error: Can't connect to
MySQL server on '127.0.0.1' (111) [2003]
------------------------------

My /etc/zabbix/zabbix_server.conf file:
------------------------------
DBHost=127.0.0.1
DBName=zabbix
DBUser=zabbix
DBPassword=*****
#DBSocket=/var/lib/mysql/mysql.sock
------------------------------

Comment 1 Eric Desgranges 2008-06-15 18:29:56 UTC
I also tried with:
DBHost=127.0.0.1:5432

But I'm getting:
6006:20080615:112417 Failed to connect to database: Error: Unknown MySQL server
host '127.0.0.1:5432' (3) [2005]


Comment 2 Jeffrey C. Ollie 2008-06-15 19:01:17 UTC
Zabbix only allows you to compile the server with one database backend at a
time.  When the package was first set up, only the MySQL backend was
complete/stable so the decision was made to compile the Fedora Zabbix packages
with MySQL as the backend.  In theory, it would be possible to compile the
server twice, once for each backend, and package both binaries but none of that
work has been done.  I don't currently have the time to work on it.  Your best
bet would be to recompile the packages yourself with the postgres backend
configured.

Perhaps sometime in the future someone will have time to redo the packages so
that both server binaries can be packaged.

Comment 3 Dan Horák 2008-06-16 08:21:54 UTC
(In reply to comment #0)
> Zabbix successfully installed with a PostgreSQL backend, however Zabbix Server
> wants to connect to MySQL:
> 

Does the "installed with PostgreSQL backend" mean that you did a recompile of
the source rpm to include postgresql support with "rpmbuild --rebuild --with
postgresql zabbix-1.4.5-3.fc9.src.rpm"?

Comment 4 Eric Desgranges 2008-06-16 10:23:04 UTC
I had just executed a
yum install zabbix zabbix-agent zabbix-web

And put this in /etc/zabbix/zabbix.conf.php
--------------------
<?php
global $DB_TYPE, $DB_SERVER, $DB_PORT, $DB_DATABASE, $DB_USER, $DB_PASSWORD,
$IMAGE_FORMAT_DEFAULT;
$DB_TYPE    = "POSTGRESQL";
$DB_SERVER    = "localhost";
$DB_PORT    = "0";
$DB_DATABASE    = "zabbix";
$DB_USER    = "zabbix";
$DB_PASSWORD    = "*****";
$IMAGE_FORMAT_DEFAULT    = IMAGE_FORMAT_PNG;
?>
--------------------

And the web gui works fine with this postgresql backend (I had to put in the SQL
schema manually though).


Comment 5 Dan Horák 2008-06-16 10:40:38 UTC
In this case Jeff is right and this cannot work.


Note You need to log in before you can comment on or make changes to this bug.