Create an HTTP classification

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 3 minutes to read
  • An HTTP classifier enables the horizontal discovery process to find devices via the HTTP protocol.

    Before you begin

    Role required: discovery_admin

    About this task

    You can create additional HTTP classifications if you want to classify devices via HTTP/REST, rather than by another protocol. Use HTTP classification for device discovery only, not for application discovery.

    Note:
    By default, the F5 HTTP classifier is provided to classify F5 load balancers using REST. The F5 LB REST pattern is also provided to explore the device. You do not need to create a new HTTP classifier for F5 load balancers.
    Of all protocols that Discovery uses (including WMI, SSH, and SNMP), HTTP is the lowest priority by default. Discovery uses HTTP classification only if:
    • Shazzam determines that the ports for HTTP (80) and HTTPS (443) traffic are open.
    • The horizontal discovery process fails for the higher priority port probes (WMI, SSH, and SNMP) if the ports for those protocols are not open, or if discovery for those protocols fail. The horizontal discovery process can fail, for example, if SSH and SNMP credentials are not configured or are incorrect.
      Note:
      See Port Probes for more details on how port scanning works and to see the priorities of the different protocols.
    HTTP classification launches the HTTP Classify probe to classify the device. The HTTP - Classify probe runs a GET request for each device for each HTTP classification. The URL of the request is built as follows: PROTOCOL://IP:PORT/PATH, where:

    Procedure

    1. Navigate to All > Discovery Definition > CI Classification > HTTP.
    2. Click New.
    3. Fill out the form fields (see table):
      Figure 1. The F5 HTTP classification
      HTTP classification
      Field Description
      Name Enter a name for the classifier.
      Path Enter the path for the HTTP GET request.
      Headers Add an option header with a value. You can use a variable in the format ${variable} instead of a static value.

      Supported headers depend on the REST web service provider that you want to connect to. See the documentation for your web service provider to identify which headers are valid or required.

      Port (IP Service)

      If you want this classifier to use a custom port that is not already a default value in the IP Service [cmdb_ip_service] table, do the following:

      1. Select the lookup icon to see the list of IP Services.
      2. Select New and create a port-to-protocol mapping.
      3. Select that port-to-protocol mapping for this Port field.

      Many commonly used protocols are already mapped to ports by default, such as http to port 80 and the https to port 443.

      If you want to use one of these default port-to-protocol mappings, don’t enter any values in the Port field. The HTTP port probe uses the correct one by default.

      Order

      Enter a number that represents the priority of this classifier. If Discovery finds more than one classifier that applies, it uses the classifier with lower Order number.

      Protocol

      [optional]

      This field isn’t visible by default. You must configure the form to add it.

      If you configure a unique port-to-protocol mapping for the Port field, enter an optional protocol override that Discovery uses with this classifier.

      For example, if you want to use port 5000 and the HTTP protocol, add the 5000/HTTP port-to-protocol mapping to the Port field, and then choose http in the Protocol field.
    4. Right-click the header and select Save.

      A record is created in the HTTP Classifications [discovery_classy_http] table.

      The HTTP Classification Match related list appears. This related list shows criteria that you can configure to match against the body of the response to the GET Request that Discovery sends.

    5. In the HTTP Classification Match related list, define the criteria and specify the pattern to launch for this classifier.
      The criteria must be met for Discovery to use this HTTP classifier.
      1. Click New.
      2. On the HTTP Classification Match form, fill in the form fields (see table).
        HTTP classification match
        Field Description
        Operator Choose the operator that the system uses to evaluate the condition:
        • Contains
        • Equals
        • Regex
        Order

        Enter a number that represents the priority of this condition. If Discovery finds more than one condition that applies, it uses the condition with lower Order number.

        Pattern Specify the pattern to launch upon a correct match. This pattern must use HTTP to discover the device.
        Value Enter the value that the body of the returned REST method must have.
      3. Click Submit.
      4. If there are different patterns for different versions of the device you are trying to discover, define as many HTTP Classification Matches as necessary.