Ad Widget

Collapse

Discovery action condition based on text in http response

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elkropac
    Junior Member
    • Jun 2022
    • 24

    #1

    Discovery action condition based on text in http response

    Hi,
    we are using zabbix 6.0.
    i'm trying to do some host discovery of devices on port 80.
    I know, it has text
    Code:
    <pre>Terminal is running
    as first line in it's output

    I have discovery rule like this
    Click image for larger version

Name:	image.png
Views:	237
Size:	11.1 KB
ID:	450054

    And discovery action
    Click image for larger version

Name:	image.png
Views:	211
Size:	6.6 KB
ID:	450055
    Click image for larger version

Name:	image.png
Views:	195
Size:	5.1 KB
ID:	450056

    Status of discovery shows some devices found, but none is added to zabbix as host.

    Is it even possible to get to the response value using this method?

    With regards,
    Libor
  • elkropac
    Junior Member
    • Jun 2022
    • 24

    #2
    So, i guess i'm out of luck on this?
    HTTP check in discovery rule is based on net.tcp.service[] , which does not fetch any data from target host, only opens connection, so i have no data to compare in discovery action condition?

    Comment


    • Hamardaban
      Hamardaban commented
      Editing a comment
      Yes - you are absolutely right.
  • elkropac
    Junior Member
    • Jun 2022
    • 24

    #3
    Bummer. Is there some other way? Customer wants to add many devices in several C subnets, but adding every device with opened port 80 is not an option
    Last edited by elkropac; 20-08-2022, 18:31.

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #4
      You can write an external script that detects the necessary devices and adds the host to the zabbix using the API.

      Comment

      Working...