Ad Widget

Collapse

Difficulty setting up ZABBIX web interface with PostgreSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nate Bell
    Senior Member
    • Feb 2005
    • 141

    #1

    Difficulty setting up ZABBIX web interface with PostgreSQL

    Hello,
    I recently installed ZABBIX 1.0 on a Debian box using MySQL and managed to get the entire program working with monitored hosts and a few custom items running. However, my knowledge of MySQL and PostgreSQL is very limited and since my office uses Postgres, I have been trying to migrate ZABBIX over to a Postgres database.
    I changed the db.inc.php file to use a Postgres database, installed Postgres, added a user named zabbix, and created a databased named zabbix. I then used cat to add the postgres schema.sql and data.sql values to the zabbix database. I added a line in pg_hba.conf to allow access for the user to the zabbix host server. However, when pointing my browser to the address: http://<ip-address>/~zabbix, I get this error:
    Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "<ip-address>", user "zabbix", database "zabbix", SSL off in /home/zabbix/html/include/db.inc.php on line 43
    Error connecting to database
    Nothing has been changed in the ZABBIX frontend except commenting out the MySQL line and uncommenting the PostgreSQL line and no changes have been made to Apache. As far as I can tell, all required software is installed including the various php modules. I'm afraid this is simply a PostgreSQL configuration problem and my ignorance of PostgreSQL is leaving me in a quandary. The various forms of online Postgres documentation haven't alluded any clues. If any of you have any ideas as to what is giving me this error, they would be most appreciated. Also, if you need further information, I'll be happy to provide it.
    Thanks for your time,
    Nate
  • Nate Bell
    Senior Member
    • Feb 2005
    • 141

    #2
    Curse you Murphy and your silly law!

    You know, it figures that a few minutes after posting I would figure out my problem. The solution was I added the line to grant access to the host in the pg_hba.conf file but this time before the line that rejects all other TCP/IP connections. Anyway, I have the ZABBIX interface up and running again.

    Just as a side note, we are in the proccess of integrating ZABBIX into our small web business and so far it looks like ZABBIX can provide everything we need. Thanks for making such a great product and thanks to anyone who checked my previous post.
    Nate

    Comment

    Working...