Ad Widget

Collapse

How to setup Windows Zabbix Agent 2 with PostgreSQL template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Iggy
    Junior Member
    • May 2023
    • 8

    #1

    How to setup Windows Zabbix Agent 2 with PostgreSQL template

    Hello all,
    I'm new to Zabbix and I need to setup monitoring PostgreSQL database.

    Here is the configiuration:
    Zabbix server: Linux CentOS appliance
    PostgreSQL 14.5, installed on Windows Server 2019
    Zabbix Agent 2 Installed on Windows Server 2019 (the same server as PostgreSQL)

    I linked Template PostgreSQL Zabbix Agent 2 to server:
    PostgreSQL template
    Windows Template

    Windows template is working fine.

    pg_hba.conf is configured correctly, allowing localhost connection
    Macros are configured correctly: username/password, port, URI​

    I followed guides on:


    It is unknown how to "Deploy Zabbix agent2 with Postgres plugin.". All instructions mentions that I nned to compile from source, like here:


    But how to run "make"?

    Can anybody gude me in the right direction or where I can donwload already prepared plugin for windows environment, copy it somewhere and set up macros according to my environment?

    Thanks in advance.
  • Gordonbaird
    Junior Member
    • Jun 2023
    • 1

    #2
    Originally posted by Iggy
    Hello all,
    I'm new to Zabbix and I need to setup monitoring PostgreSQL database.

    Here is the configiuration:
    Zabbix server: Linux CentOS appliance
    PostgreSQL 14.5, installed on Windows Server 2019
    Zabbix Agent 2 Installed on Windows Server 2019 (the same server as PostgreSQL)

    I linked Template PostgreSQL Zabbix Agent 2 to server:
    PostgreSQL template
    Windows Template

    Windows template is working fine.

    pg_hba.conf is configured correctly, allowing localhost connection
    Macros are configured correctly: username/password, port, URI​

    I followed guides on:
    https://www.zabbix.com/integrations/...tgresql_agent2

    It is unknown how to "Deploy Zabbix agent2 with Postgres plugin.". All instructions mentions that I nned to compile from source, like here:
    https://www.zabbix.com/documentation.../plugins/build

    But how to run "make"?

    Can anybody gude me in the right direction or where I can donwload already prepared plugin for windows environment, copy it somewhere and set up macros according to my environment?

    Thanks in advance.
    Hello,

    To set up the Zabbix Agent 2 with the PostgreSQL template on a Windows Server 2019 machine, you don't need to compile from source or build plugins. The Zabbix Agent 2 for Windows already includes the necessary functionality to monitor PostgreSQL databases.

    Here are the steps to configure the Zabbix Agent 2 with the PostgreSQL template on your Windows Server 2019 machine:

    Download the Zabbix Agent 2 for Windows: Visit the official Zabbix website (https://www.zabbix.com/) and navigate to the Downloads section. Download the Zabbix Agent 2 for Windows installer appropriate for your system.

    Install the Zabbix Agent 2: Run the downloaded installer and follow the installation wizard to install the Zabbix Agent 2 on your Windows Server 2019 machine. During the installation, make sure to note down the Zabbix Agent 2 installation path.

    Configure the Zabbix Agent 2: Open the Zabbix Agent 2 configuration file, zabbix_agent2.conf, located in the installation path. Update the following settings:

    Set the Server and ServerActive parameters to the IP address or hostname of your Zabbix server running on the Linux CentOS appliance.
    Set the Hostname parameter to a unique name to identify your Windows Server machine in Zabbix.
    Enable the UnsafeUserParameters parameter by removing the # symbol at the beginning of the line.
    Enable PostgreSQL monitoring: In the Zabbix Agent 2 configuration file, add the following user parameter to enable PostgreSQL monitoring:​
    UserParameter=pgsql[*],"{#PSQLCONNECTION},$1"
    ​Restart the Zabbix Agent 2 service: Save the changes to the configuration file and restart the Zabbix Agent 2 service for the changes to take effect.

    Import the PostgreSQL template: In your Zabbix web interface, import the Template DB PostgreSQL template, which is already included with Zabbix. This template contains the necessary items and triggers to monitor PostgreSQL databases.

    Assign the template to the Windows Server host: Go to the Hosts section in the Zabbix web interface, find your Windows Server host, and link it to the Template DB PostgreSQL template.​

    I hope this information helps you.







    Comment

    Working...