Ad Widget

Collapse

Help me monitoring PostgreSQL on Windows Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nguyenhuy100495
    Junior Member
    • Feb 2023
    • 10

    #1

    Help me monitoring PostgreSQL on Windows Server

    I have Windows Server 2012 install PostgreSQL, Zabbix agent 2 and I did steps below:

    Create PostgreSQL user to monitor and inherit permissions from the default role pg_monitor:
    CREATE USER zbx_monitor WITH PASSWORD '123456a@A' INHERIT;
    GRANT pg_monitor TO zbx_monitor;

    Edit pg_hba.conf to allow connections from Zabbix agent (C:\Program Files\PostgreSQL\<version>\data\pg_hba.conf):
    Add these lines to the end:
    host all zbx_monitor localhost md5

    From my Zabbix Server (Ubuntu 20.04 LTS), I added the host and modify macro {$PG.URI}​=tcp://myserverip:5432 {$PG.USER}​=zbx_monitor {$PG.PASSWORD} = 123456a@A

    However I still can not get the monitoring success, the result is "Unknown metric pgsql.ping"

    Anyone please help me, is there any lack of setting?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    What version of agent? Since 6.0.10 (and whatever 6.x version appeared at same time) this plugin is not "built-in" but loadable.

    If you add config to agent to actually load that plugin, it might work...

    Comment

    • nguyenhuy100495
      Junior Member
      • Feb 2023
      • 10

      #3
      Originally posted by cyber
      What version of agent? Since 6.0.10 (and whatever 6.x version appeared at same time) this plugin is not "built-in" but loadable.
      https://www.zabbix.com/documentation...lugin-loadable
      If you add config to agent to actually load that plugin, it might work...
      My Zabbix Server version is Zabbix 6.0.1. © 2001–2022, Zabbix SIA.
      What should I do, please guide me please!
      Thanks so much!​

      Comment

      • nguyenhuy100495
        Junior Member
        • Feb 2023
        • 10

        #4
        My Zabbix Agent version is 6.0.14.2400

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Originally posted by nguyenhuy100495
          My Zabbix Agent version is 6.0.14.2400
          Follow the links I posted... plugin configuration. I am not going to write down step-by-step things here, if you can read it from docs...

          Comment

          • nguyenhuy100495
            Junior Member
            • Feb 2023
            • 10

            #6
            Sorry for my many questions, but I read the links and difficult to understand how to do.
            Do I need download this plugin source on my Windows Server?
            The guide show that need to modify something on plugin configuration file postgresql.conf, but I don't know where it is?
            Please tell me briefly the steps to do it, thank you!​

            Comment

            • MaterazziSan
              Junior Member
              • Feb 2023
              • 18

              #7
              Originally posted by nguyenhuy100495
              Sorry for my many questions, but I read the links and difficult to understand how to do.
              Do I need download this plugin source on my Windows Server?
              The guide show that need to modify something on plugin configuration file postgresql.conf, but I don't know where it is?
              Please tell me briefly the steps to do it, thank you!​
              Hi,

              I think this guide is useful https://blog.zabbix.com/setting-up-z...t-works/13208/

              Best regards

              Comment

              • pscs
                Junior Member
                • Feb 2012
                • 8

                #8
                I know this is a bit late, but I had the same problem. And encountered the normal responses not actually answering the question, but assuming that the person having trouble hasn't read the documentation and then posting links to irrelevant articles.

                The problem is that the Windows Zabbix Agent 2 plugins are not built into the agent any longer, and they are not obviously available for download yet in a compiled form (as far as I can see), so it's not a case of not configuring the agent correctly, it's a case of not being able to get hold of the PostgreSQL plugin at all. The only 'official' way to get the plugin for Windows is to download the source and build it yourself.

                This bugtracker issue has links to various versions of the compiled plugin towards the end of the list

                Comment

                Working...