Ad Widget

Collapse

How to change Zabbix server IP address

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • V-Test
    Junior Member
    • Feb 2022
    • 18

    #1

    How to change Zabbix server IP address

    Hi,

    I got my Zabbix server up and running and now I would like to move it to our Vlan11 IP. I was only able to find this article about it, but it doesn't work. https://chowdera.com/2021/02/20210204162531821l.html

    I tried changing 'localhost' to the IP that I want in /etc/zabbix/zabbix_server.conf and /etc/zabbix/web/zabbix.conf.php and also etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf. Nothing is showing up in the zabbix server log as an error. I turned off the firewalld service, but I'm not sure if this still a firewal/networking issue or is there any other setting for Zabbix that I need to do?
  • tikkami
    Member
    • May 2018
    • 71

    #2
    Maybe stupid question, but did you change IP-address at Linux?

    Zabbix server can always get data from itself by using 127.0.0.1. So you don't need to change that.

    Comment

    • um3n
      Member
      • Aug 2021
      • 47

      #3
      Hey V-Test,

      I assume you are running zabbix on a linux system. Could you please provide the output of
      Code:
      ss -tulpen | grep 10050
      and
      Code:
      ip a s
      .

      The Zabbix server ip-address is configured in /etc/zabbix/zabbix-server.conf and like tikkami already said, you should always be able to get data from the zabbix-server via localhost (127.0.0.1).
      To be safe that there is no hickup, you should restart the network and zabbix services.

      The change of the ip-addresses like described in your mentioned article should work.

      Comment

      • V-Test
        Junior Member
        • Feb 2022
        • 18

        #4
        This is my output from those commands. I'm not sure what is meant by changing the IP at Linux?
        Attached Files

        Comment

        • tikkami
          Member
          • May 2018
          • 71

          #5
          Your linux has 3 IP-addresses.
          • 127.0.0.1, localhost address, Zabbix uses this address internally between server, database, frontend and local agent.
          • 192.168.64.16, bond0.11, address for external communication
          • 192.168.96.16, bond0.13, address for external communication
          Which address you were about to change? By default Zabbix server listens all above addresses.

          Changing external addresses does not affect to internal communication. There is no need to touch Zabbix configuration when external addresses are changed.

          Comment

          • V-Test
            Junior Member
            • Feb 2022
            • 18

            #6
            Originally posted by tikkami
            Your linux has 3 IP-addresses.
            • 127.0.0.1, localhost address, Zabbix uses this address internally between server, database, frontend and local agent.
            • 192.168.64.16, bond0.11, address for external communication
            • 192.168.96.16, bond0.13, address for external communication
            Which address you were about to change? By default Zabbix server listens all above addresses.

            Changing external addresses does not affect to internal communication. There is no need to touch Zabbix configuration when external addresses are changed.

            Thank you Tikkami for your response. My situation is that one of our components that communicates with Zabbix only uses Vlan11. I thought that Zabbix would need to be moved to its Vlan11 IP of 192.168.64.16 to be able to communicate. Is what you are saying that Zabbix can be connected to on its Vlan11 IP when all the configurations are set to localhost(192.168.96.16)?

            Comment

            • tikkami
              Member
              • May 2018
              • 71

              #7
              One of your components? Which component? Do you mean some zabbix component e.g. database or some monitored host?




              ​​​​

              Comment

              • V-Test
                Junior Member
                • Feb 2022
                • 18

                #8
                Originally posted by tikkami
                One of your components? Which component? Do you mean some zabbix component e.g. database or some monitored host?




                ​​​​
                A monitored host.

                Comment

                • tikkami
                  Member
                  • May 2018
                  • 71

                  #9
                  So then do not touch localhost definitions in any zabbix config files.

                  Make sure that
                  • you are connected to correct physical and logical network
                  • IP-addresses and subnet masks are correct
                  • Gateway or static route is defined correctly if traffic must go to another subnet
                  • External and internal firewalls does not block the traffic
                  • Use ping to verify network connectivity from Zabbix to monitored host

                  ​​​​​​

                  Comment

                  • um3n
                    Member
                    • Aug 2021
                    • 47

                    #10
                    Originally posted by tikkami
                    So then do not touch localhost definitions in any zabbix config files.

                    Make sure that
                    • you are connected to correct physical and logical network
                    • IP-addresses and subnet masks are correct
                    • Gateway or static route is defined correctly if traffic must go to another subnet
                    • External and internal firewalls does not block the traffic
                    • Use ping to verify network connectivity from Zabbix to monitored host

                    ​​​​​​
                    Nothing further to add, but please use traceroute to verify. Ping is sometimes disabled. With traceroute you can define TCP and Port,

                    Example
                    Code:
                    traceroute -nTp 80 tar.get.ho.st
                    Because I hate multihomed hosts - its not a good security design and very oldschool - I will recommend using a normal router or firewall to access the monitored host. Also you could place a proxyserver in there, if you dont want to open all the ports and hosts zabbix needs.

                    Comment

                    Working...