Ad Widget

Collapse

Configuring host to check one 'active' IP out of three known IPs (without DNS...)

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • andrewwatts
    Junior Member
    • Apr 2024
    • 4

    #1

    Configuring host to check one 'active' IP out of three known IPs (without DNS...)

    Hi there,

    New here! Hoping someone can help!

    Bit of a weird one, but due to a firmware issue a particular host I'm using for a project is unable to use DNS correctly (I'm attempting to get that fixed, but there's a lot of FPGA work going on inside - so I don't expect that to happen soon enough!).

    Anyway, because of the nature of the system, I know the host will have one of three IP addresses depending on where it's physically located (DHCP reservations in each area).

    My question is - how can I define one host, but with the ability ping/find the current IP address (and then perform some HTTP GET items). I seem to be able to define more than one IP address, but it only looks at the "default" one? Only one IP will be active at any one time, and reality the IP address would change as the device moves around the facility - so maybe one day to once a week on average.

    Click image for larger version

Name:	image.png
Views:	246
Size:	68.1 KB
ID:	483130
    Appreciate DNS would fix this and this way of working is a tad hacky - but I cannot count on the manufacturer fixing their DNS implementation issue at this stage.

    Thanks in advance!

    Andrew
    Zabbix 6.4.4
    Ubuntu Server 20.04.6 LTS
  • Answer selected by andrewwatts at 21-11-2024, 13:43.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4808

    Unfortunately, Zabbix does not have such capability, as first look up, which IP answers, then continue.. Working with just a name would help, but as you say, you cannot hope it to be fixed..
    Hacky way would be to update hosts config over the API, but it would require some external part to identify, what is correct one for now and then update...

    Comment

    • wiliamL
      Junior Member
      • Feb 2022
      • 28

      #2
      I think you are looking for this in your conf file.

      ### Option: SourceIP
      # Source IP address for outgoing connections.
      #
      # Mandatory: no
      # Default:
      # SourceIP=

      Comment

      • andrewwatts
        Junior Member
        • Apr 2024
        • 4

        #3
        Originally posted by wiliamL
        I think you are looking for this in your conf file.

        ### Option: SourceIP
        # Source IP address for outgoing connections.
        #
        # Mandatory: no
        # Default:
        # SourceIP=
        Sorry, williamL - I don't see how this is relevant or related at all? By host, I'm referring to a network host (i.e., an end device) not the Zabbix server.

        Comment

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

          #4
          Unfortunately, Zabbix does not have such capability, as first look up, which IP answers, then continue.. Working with just a name would help, but as you say, you cannot hope it to be fixed..
          Hacky way would be to update hosts config over the API, but it would require some external part to identify, what is correct one for now and then update...

          Comment

          • andrewwatts
            Junior Member
            • Apr 2024
            • 4

            #5
            Thanks cyber - I figured as much. It's such an obscure edge case because how many hosts have non-functioning DNS!?

            In the end I've come up with an external workaround (I've made script which pings to identify the known addresses to find the "active" IP and manually updates the A record in our DNS server).

            Comment

            Working...