Ad Widget

Collapse

Zabbix graph section not working correctly when using Postgresql database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • surenx
    Junior Member
    • Oct 2007
    • 5

    #1

    Zabbix graph section not working correctly when using Postgresql database

    Hi

    I've installed the Zabbix server on my computer and inserted all the data to the zabbix database.
    The zabbix seems to work fine, but when I enter by Admin access and go to configuration->graphs section then, below the (NO Graphs Defined) text it shows the following error

    PHP Code:
        pg_query() [function.pg-query]: Query failedERRORsyntax error at or near "while" LINE 1: ...graphid left join items i on gi.itemid=i.itemid while (g.... ^[/usr/local/share/zabbix/php/include/db.inc.php:293]
        * 
    Error in query [select distinct g.* from graphs g left join graphs_items gi on g.graphid=gi.graphid left join items i on gi.itemid=i.itemid while (g.graphid/100000000000000in (0) and ( i.hostid not in (-1) OR i.hostid is NULL order by g.nameg.graphid] [ERRORsyntax error at or near "while" LINE 1: ...graphid left join items i on gi.itemid=i.itemid while (g.... ^]
        * 
    pg_fetch_array() expects parameter 1 to be resourceboolean given[/usr/local/share/zabbix/php/include/db.inc.php:414
    When I try to create a graph, it seems that it creates the graph, but when I go back to "Graphs" section then I see the same error with no graphs created.

    I'm using the Postgresql Database and the "graphs" table contains all the needed information.

    P.S. This is the first time I try to run Zabbix on Postgresql database, Is it generally working without any problems on this database or not?

    Thanks in Advance!
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    Check the following post, I beleive it's related.




    I posted a fix in that situation I beleive it will work in your case too.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • surenx
      Junior Member
      • Oct 2007
      • 5

      #3
      Thanks your post has helped me very much!

      Comment

      Working...