Ad Widget

Collapse

Azure SaaS Managed PostgreSQL Database Issue with Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sabsebolo
    Junior Member
    • Jun 2025
    • 7

    #1

    Azure SaaS Managed PostgreSQL Database Issue with Zabbix

    Hello Team,

    I have been using Zabbix for several years, and I’ve recently decided to migrate the backend database to Azure SaaS Postgres DB. Currently, I’m using Zabbix version 7.2.6 running in containers, and I’ve configured it to connect to Azure’s SaaS Managed PostgreSQL. Created DB user & granted required permissions.

    After restarting the zabbix-server and zabbix-web containers, they are able to connect to the PostgreSQL database. However, when I try to access the Zabbix web portal, I encounter the following error: "Database Error: Error connecting to database." (Please refer to the attached screenshot.)

    I dont see any error in zabbix logs related to this issue, If anyone has experience using Azure SaaS database with Zabbix and has faced this issue, your help would be greatly appreciated.
    Attached Files
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Does the web server log tell anything more about the problem?

    Curious: what is the detail why you say that the web container is able to connect to the database when the UI says it cannot?

    Markku

    Comment

    • sabsebolo
      Junior Member
      • Jun 2025
      • 7

      #3
      Hi Markku When I restart the web container, the logs show that it is connecting to the database. However, when I try to access the Zabbix portal, it throws an error, and I don't see any logs in the container console when accessing the portal." see the attached logs screenshot.

      Note: I am using Azure Flexible Postgres Database.
      Attached Files

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        In your picture, the upper one ("Zabbix-Web") is Zabbix server, not web server. Lower one looks like a web server.

        I'm pretty sure the nginx+php container saves access logs somewhere, you just need to find out where. That's one of the problems in containers: it is not always clear where the newly created application data (like logs) is saved.

        Markku

        Comment

        • sabsebolo
          Junior Member
          • Jun 2025
          • 7

          #5
          you correct attachment is not correct, i updated the picture again.

          Everything works fine when I use the PostgreSQL database in a local VM container, and I’m able to access the Zabbix portal. But when I point the database to the Azure managed DB, it throws an error. It looks like an issue with SSL while connecting to the Azure DB, as the "require_secure_transport" setting is enabled by default.

          Comment

          • Markku
            Senior Member
            Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
            • Sep 2018
            • 1781

            #6
            Have you configured the frontend for the encrypted database connection?



            Markku

            Comment

            • sabsebolo
              Junior Member
              • Jun 2025
              • 7

              #7
              The issue has been resolved. The problem was that the PHP module was missing in the Zabbix image. I used another Alpine Zabbix image that has PHP. The details are provided below.

              image: zabbix/zabbix-server-pgsql:alpine-7.2-latest

              Also added in zabbix-web docker compose yaml, "ZBX_DB_TLSCONNECT: require" , not added any db certs for connect azure database.

              Comment

              Working...