Ad Widget

Collapse

Running zabbix on docker

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eric25
    Junior Member
    • Nov 2020
    • 16

    #1

    Running zabbix on docker

    Hi. I'm new to the forum so apologize in advance if I'm writing in the wrong section. I wanted to run Zabbix server based on the postgresql database and nginx web page.
    I downloaded the docker repository from https://github.com/zabbix/zabbix-docker and deleted unnecessary files and prepared the docker-compose.yaml which I am sending in the attachment.


    The error that the server is logging in to me:
    cannot send list of active check to "x.x.x.x" host [host] not found

    The error that the agent is logging in to me:
    no active checks on server [zabbix-server:10051]: host [host] not found

    looking for the simplest zabbix configuration on ubuntu. I don't know exactly what the network configuration in docker-compose files means and why it is needed
    Attached Files
  • Eric25
    Junior Member
    • Nov 2020
    • 16

    #2
    Do you think the network configuration in docker-compose.yaml has any meaning? I am asking because I would like all the programs in the docker to be in one network so that I do not have to deal with additional configuration.

    Comment

    • Eric25
      Junior Member
      • Nov 2020
      • 16

      #3
      OK I understand. I am sending the host configuration in the attachment
      After logging in to the zabbix website, there is one entry in the host tab. This is an entry that has existed here from the very beginning. in the docker-compose.yaml file, zabbix agent is set to port 10050, which is the same as in the configuration on the website. The agent was installed on the same computer as the server, so the agent's IP address should be 127.0.0.1. It doesn't install a proxy because I wanted to use a direct server-agent connection.
      Why, despite the default configuration, does the host return the message "Get value from agent failed: cannot connect to [[127.0.0.1]: 10050]: [111] Connection refused"?


      I'm sorry if I ask the same, but I don't really understand why, despite the default configuration, the host cannot connect
      Attached Files

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        If Zabbix server and Zabbix agent are running in different containers, they will not be accessible through the localhost loopback interface (127.0.0.1). 127.0.0.1 can only be used in the same container. Try specifying the interface of the host "Zabbix server" with the name "zabbix-agent" using the DNS name.
        The default is 127.0.0.1, probably because the initial database is registered with the same SQL statement as during normal installation.

        Comment

        • Eric25
          Junior Member
          • Nov 2020
          • 16

          #5
          thank you very much! you saved a few hours of work for me. Nowhere could I find any information as to why this is happening.
          Another problem was setting the network adapter in virtualBox. The primary setting was the NAT card, so I couldn't see the page on the same network. Switching to a bridged card did the trick. Now I will start the client on windows. Thank you very much for all your help!
          I don't know if the administrator will close this topic or leave the topic open in case I need help with another problem.

          Comment

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

            #6
            I think this is not related to any of your docker config... Do you have that [host] defined in Zabbix? Server cannot send any config, if it has no host with somekind of defined configuration.

            Comment

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

              #7
              I have never dealt with any of docker things, so it has no meaning for me, yes... but your error message still says, that you do not have [host] configured in Zabbix
              https://www.zabbix.com/documentation...fig/hosts/host

              Comment

              Working...