Ad Widget

Collapse

PostgreSQL Template Displays Down with Docker Setup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PostgreSQL Template Displays Down with Docker Setup

    Hi all,

    I'm a first time Zabbix user, and I wanted to get our system set up with Dockerized Zabbix (4.4.4). The system is booted and running fine. However, getting the agents to monitor applications has been a pain. I'm currently trying to monitor a PostgreSQL 9.6 installation with a containerized agent (centos-4.4.4) using the default template (https://www.zabbix.com/integrations/postgresql). Here's what I've done so far:

    1. Created the agent and established connection with the server
    2. Confirmed that the agent works (it can monitor other stuff fine)
    3. Put the container on the host network (docker run --net="host") so that it works with 127.0.0.1 and passes pg_hba
    4. Installed psql within the container using a Dockerfile and yum since the agent complained about not finding it
    5. Mounted /var/run/postgresql per this StackOverflow post (https://stackoverflow.com/questions/...cker-container) as I was getting the same error.

    Most of the items seem to be working, but the ping item is giving a 0 value (invoking the "PostgreSQL: Service is down" trigger). I've changed the macros so that the arguments to the item are correct, and I know that it can establish a connection to PostgreSQL because database names are showing up in Zabbix. Why is this one specific value not working?

    #2
    Bumping for response

    Comment


      #3
      Originally posted by dentonmwood View Post
      Hi all,

      I'm a first time Zabbix user, and I wanted to get our system set up with Dockerized Zabbix (4.4.4). The system is booted and running fine. However, getting the agents to monitor applications has been a pain. I'm currently trying to monitor a PostgreSQL 9.6 installation with a containerized agent (centos-4.4.4) using the default template (https://www.zabbix.com/integrations/postgresql). Here's what I've done so far:

      1. Created the agent and established connection with the server
      2. Confirmed that the agent works (it can monitor other stuff fine)
      3. Put the container on the host network (docker run --net="host") so that it works with 127.0.0.1 and passes pg_hba
      4. Installed psql within the container using a Dockerfile and yum since the agent complained about not finding it
      5. Mounted /var/run/postgresql per this StackOverflow post (https://stackoverflow.com/questions/...cker-container) as I was getting the same error.

      Most of the items seem to be working, but the ping item is giving a 0 value (invoking the "PostgreSQL: Service is down" trigger). I've changed the macros so that the arguments to the item are correct, and I know that it can establish a connection to PostgreSQL because database names are showing up in Zabbix. Why is this one specific value not working?
      1. Make sure you have the pg_isready utility in your agent container.

      2. Please show the result of the following command in the agent container:

      pg_isready -h <pg_host> -p <pg_port> -U <pg_user> -d <pg_dbname>

      Comment

      Announcement

      Collapse
      No announcement yet.
      Working...
      X