Ad Widget

Collapse

How do handle host with changing ip addresses

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • schoeppi
    Member
    • Jan 2024
    • 31

    #1

    How do handle host with changing ip addresses

    Ho can I configure hosts in Zabbix that ip address might change from time to time.

    Take this example:

    -----
    cs@d5421:~$ host bla.desk.ly
    bla.desk.ly is an alias for deskly-shared-infra-prod-alb-56902411.eu-central-1.elb.amazonaws.com.
    deskly-shared-infra-prod-alb-56902411.eu-central-1.elb.amazonaws.com has address 18.195.173.138
    deskly-shared-infra-prod-alb-56902411.eu-central-1.elb.amazonaws.com has address 3.66.50.26
    cs@d5421:~$
    -----

    I want to monitor the web content of bla.desk.ly. To do this I create a host and configure one or more interfaces with the regarding ip addresses and then create a web scenario which is linked to this host.

    But what if the ip address change which could be easily the case with hosts running in AWS?

    Is it better to configure a host with the ip address 127.0.0.1 in this case and link the webscenario to such a dummy host or how can I deal with a situation in Zabbix?

    Thanks a lot for any hint and hjelp :-)!

  • Brambo
    Senior Member
    • Jul 2023
    • 245

    #2
    There are multiple ways, if you connect to agent in passive mode then I would suggest use a FQDN.
    Other option is agent in Active mode connecting to your proxy/server.
    Then you items can let your agent talk to localhost address.

    As this is a fundamental basic it's good to understand the mechanisms before you choose either route. A solution for 1 problem might not be the best for your total setup.

    Comment

    • schoeppi
      Member
      • Jan 2024
      • 31

      #3
      [QUOTE=Brambo;n500402]There are multiple ways, if you connect to agent in passive mode then I would suggest use a FQDN.
      Other option is agent in Active mode connecting to your proxy/server.
      Then you items can let your agent talk to localhost address.

      Because the host is not under my control I think I can only use passive checks then. No possebility to install an agent...

      So then I think I will use 127.0.0.1 as ip address for this host or just the dns name...

      Thanks!

      Comment

      • schoeppi
        Member
        • Jan 2024
        • 31

        #4
        Sorry, I do still have a problem.

        If I link the icmp template to such host where the ip might change and even if I use 127.0.0.1 as ip address and select dns instead ip in the host configuration the ping is executed for the 127.0.0.1 ip address which is totaly not what I need.

        Is this a problem with the icmp template or what am I missing?

        I just want to ping such a host and configure a webscenario but it seems to be still not clear to me how to setup such a configuration for a host with a non static ip...

        Comment

        • Brambo
          Senior Member
          • Jul 2023
          • 245

          #5
          I we chew everything up for you don't learn anything. So have a look at https://www.zabbix.com/documentation...%2CMacro#hosts
          Here are all host macro's explained.
          I've have rebuild my own ICMP version of the default template using {HOST.HOST}
          example: icmpping[{HOST.HOST},2]
          where the original uses icmpping
          I believe the original expect a host interface and {HOST.HOST} is the Host Name of your host (not the friendly name) (see macro link in the beginning)
          So if you need something different than default you need to understand what to edit where.

          Comment

          • jhboricua
            Senior Member
            • Dec 2021
            • 113

            #6
            For web monitoning, Just use FQDN of the site on the zabbix host entity and select DNS for the interface, not IP.

            But doing ICMP monitoring against the site FQDN has little to no value since the IP of the AWS Load Balancer nodes it resolves to can change at any time and they are not indicative of the site being up or down. Instead setup ICMP monitoring against the actual host running the website.

            Comment

            Working...