Ad Widget

Collapse

Discovering Postgres databases on Agent2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • codechurn
    Junior Member
    • Jun 2025
    • 10

    #1

    Discovering Postgres databases on Agent2

    I have the Postgres plugin working on Zabbix Agent 2. I'm struggling however in understanding how I can have it discover the additional databases on my Postgres installation.

    I've populated the macros as follows:

    Click image for larger version

Name:	image.png
Views:	113
Size:	68.0 KB
ID:	504418

    This results in data being collected on my postgres database, but not any others hosted on that server. I have provisioned the zabbix_monitor account with permissions to all of the databases as follows:
    Code:
    /** For each database, run the following from a PSQL prompt **/
    GRANT CONNECT ON DATABASE <database name> TO zabbix_monitor
    \c <database name>
    
    GRANT USAGE ON SCHEMA public TO zabbix_monitor;
    GRANT SELECT ON ALL TABLES IN SCHEMA public TO zabbix_monitor;
    ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO zabbix_monitor;​
    I can see that there is a macro named:
    Click image for larger version

Name:	image.png
Views:	41
Size:	13.6 KB
ID:	504421

    How do I put this to work?
    Attached Files
  • dropbrick2
    Junior Member
    • Sep 2025
    • 2

    #2
    Having the same issue with the Agent2 - "PostgreSQL by Zabbix Agent 2" works and can discover also the databases, the "PostgreSQL by Zabbix agent 2 active" instead retrieves some telemetry(e.g. cache hit ratio) but doesn't discover the databases. Any clue or logs why ? I can't see any errors in "Latest data"

    Comment

    • dropbrick2
      Junior Member
      • Sep 2025
      • 2

      #3

      I'm running Zabbix 7.2.10 on the server and on clients I have these RPMs
      zabbix-agent2-plugin-postgresql-7.2.10-release1.el8.x86_64
      zabbix-agent2-plugin-nvidia-gpu-7.2.10-release1.el8.x86_64
      zabbix-agent2-7.2.10-release1.el8.x86_64

      Comment

      Working...