Ad Widget

Collapse

Need some help/feedback on Host Discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Smoke
    Junior Member
    • Jul 2014
    • 29

    #1

    Need some help/feedback on Host Discovery

    Hello Community, Wanted to reach out this time looking for some feedback on using the Host Discovery functionality, that even after playing with it and reading the docs couldn't address by myself. - Btw, this goes for zabbix 6.2.6 , haven't upgrade to 6.4 just yet, but i checked the changelog and i dont think this has changed.

    The goal is to have my hosts discovered on my network - by a zabbix proxy - and have them added to a host-group, as easy as it sounds, I am struggling with the following.

    1) All my hosts do have 2 IP addresses on the same network, so they get discovered twice (of course), I did set "Device uniqueness criteria", which works, and I only end up with 1 host, BUT zabbix adds BOTH addresses as interfaces, which is a bit annoying because then the Availability icon remains black and you have to hover to check each interface status, and one is always in "unknown" state, is there any way to prevent it from even add the secondary IP? (I don't mind which IP it chooses actually, but just keep 1)
    - also important is the fact that one of those IPs can change, and potentially used by another host, so idk how zabbix discovery will react or update the hosts once that happens, (thus, the 2nd point below)

    2) The other issue I have is that I didn't found a way for the discovery to use the DNS NAME on the interface, instead of the IP address, and the IPs do change from time to time, so I prefer to use the DNS for my interfaces instead of IP, how can I switch so it uses that?

    3) Last one is a bit of feedback on how the discovery will react upon changes on the physical host, lets say that my machine name got changed from pc1 to pc2, and my discovery rule has Visible name = hostname, it was discovered as pc1, will the host be updated to pc2 later or once its "added" to the inventory it will not be modified at all?


    As a bit of information as needed, my discovery rule check type is zabbix agent, on port 10150 (not the default one) and on key I have put "system.hostname" , but honestly I couldn't find much information on what options or alternatives i can use here
    My discovery action-operations is set to add host, link a template and add to a host-group, nothing strange there.


    Thank you very much to everyone in advance for the help.
    Regards
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #2
    As for the DNS interface, maybe you could try one of the following keys as device uniqueness criteria.
    Code:
    system.run["hostname -f"] - Your hosts must have system.run key enabled
    Code:
    system.hostname - Your hostnames must be resolved by your local DNS system
    Also, you can vote up to this issue (ZBXNEXT-7132 - "system.hostname[fqdn]") so it will implemented on the next Zabbix major version.

    Comment


    • markfree
      markfree commented
      Editing a comment
      I tested over here and it didn't work out as I expected. It always uses the IP address.
  • Smoke
    Junior Member
    • Jul 2014
    • 29

    #3
    I actually did try both of these and as markfree commented , it does discover the FQDN or hostname, and it adds that to the host name, but for the addresses/interfaces it always uses the IP address.
    Maybe we need to open a Jira ticket and double check with the devs, it might be hardcoded or forced to always use the IP address for the interfaces and would be good if they add an option to use either IP or DNS.

    It was already really tricky to make it use a non default port, or to have a discovery lets say on port 22 but then add the interface of the agent on port 999

    Comment

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

      #4


      You can force it to use DNS name with agent autoregistration...

      IMHO all this discovery instead of agent autoregistration is just a pain in backside..

      Comment

      Working...