Ad Widget

Collapse

Network discovery by script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brambo
    Senior Member
    • Jul 2023
    • 245

    #1

    Network discovery by script

    I know of the existence of discovery in the data collection section but I can't see how I could match everything I want (maybe my lack of knowledge).
    What I want to do is scan a subnet of IP's and if pingable check certain additional ports and/or try open a http connection and parse the result to know what kind of device is living on the IP.

    Now the manual is written to do discovery for host where a zabbix agent is running. That part is clear.
    See if http is available is also clear but then the tricky part comes in with the default functionality. I don't see how I could then filter out these device base on lets say html title or even better specific html body content.
    Is it correct that my 'wish' to detect specific host based on html content isn't possible?

    And if so, what would be the best approach to create host from a running script> zabbix API or use zabbix trapper and LLD discovery on virtual host? And why
    I'm not certain if the Zabbix API route would delete a host if it's not detected for X amount of time (where LLD is able to do that)
  • Clontarf[X]
    Member
    • Jan 2017
    • 80

    #2
    Zabbix API is what you should be using. What you describe is easily done by simply scanning the network with your tool of choice, getting the right information (like IP, DNS, Open Ports) and then calling Zabbix API.

    That all being said, why aren't you using Zabbix Discovery for this? It does exactly what you describe except for using returned HTTP information as a criteria I think.

    Comment

    • Brambo
      Senior Member
      • Jul 2023
      • 245

      #3
      Originally posted by Clontarf[X]
      Zabbix API is what you should be using. What you describe is easily done by simply scanning the network with your tool of choice, getting the right information (like IP, DNS, Open Ports) and then calling Zabbix API.

      That all being said, why aren't you using Zabbix Discovery for this? It does exactly what you describe except for using returned HTTP information as a criteria I think.
      Finding a host isn't the problem, only auto applying the correct template is the challenge. Where several host will have a webserver active but getting the performance details of those host is completely different from each other. So knowing is has e.g. port 80 open or a combination of 80&443 isn't saying anything about which host it is.
      Parsing the provided landing page does. And I rather not use the script route but for know I don't see how.

      If I would use the Zabbix API how will a host automaticly be removed? The script would only 'send' host which are alive.

      Comment

      Working...