LogicMonitor + Catchpoint: Enter the New Era of Autonomous IT

Learn more

When configuring a multi-instance DataSource, you can enable Active Discovery and define protocols such as SNMP, WMI, and HTTP that Active Discovery uses to discover instances.

Note: HTTP Active Discovery does not support authentication. If an HTTP endpoint requires authentication, use scripted Active Discovery.

Requirements for HTTP Active Discovery

To use HTTP Active Discovery in extracting mode, you must have the following:

  • An HTTP URL specifying the port and path, or only the path. For example, https://##HOSTNAME##:8443/customers or /customers (to use port 80)
  • A regular expression that specifies the text to match and the capture group. Each matching occurrence of the capture group is returned as an instance.

HTTP Active Discovery Options

The HTTP Active Discovery method includes the following options in the Arguments section:

OptionDescription
HTTP URL(Required) A URL that Active Discovery sends to the target server during discovery.
For example, if URL is ‘/server-status’, the following HTTP request is sent to the target server:
GET /server-status HTTP/1.0
Connection: close
User-Collector: LogicMonitorCollector/1.0
Regular Expression(Required) If HTTP Active Discovery is running in Extracting mode, this must be a regular expression containing a back reference.
For example, “Customer ID: (\d+)” where “(\d+)” is the captured substring.
The HTTP method of Active Discovery applies the regular expression against the response to capture all matches and returns them as instances.
Follow Redirect(Optional) By default, HTTP Active Discovery processes the response only when the response status code is 2xx. Otherwise, it reports an error.
If you set followRedirect to ‘true’, HTTP Active Discovery follows HTTP redirects to the new location to fetch the final response, and processes it.
Use SSL(Optional) By default, HTTP Active Discovery sends request to the target host in plain text. You can set ssl to true to communicate with the web server using SSL on port 443.
Match Case-sensitivity(Optional) Select this option to make the match case-sensitive.
Port # List
  • If the port list is empty, HTTP discovery runs in Extracting mode.
  • If the port list is specified, HTTP discovery runs in Port mode.
Active Discovery sends requests to the specified port numbers. You can define port numbers in the following ways:
  • A single port number.
    For example, 80
  • Multiple port numbers separated by a comma.
    For example, 80,8080,8888
  • A port range.
    For example, 8080–8100
  • Multiple port numbers and ranges separated by commas.
    For example, 8080–8100,80,8000

Extracting Mode

In Extracting mode, you must specify an HTTP URL and a regular expression that returns a substring using a capture group, but leaves the port list empty.

The HTTP Active Discovery method sends an HTTP request to the target server to get the specified URI, and applies the regex against the response (including headers and payload) to extract instances that match the substring. Each returned substring that matches the backreference is discovered as an instance.

Finding All HAProxy Sessions

Consider a web page “/haproxy?stats” that contains the HAProxy sessions. To find all HAProxy sessions in the HTTP Active Discovery method, specify the following parameters:

HAProxy session Active Discovery

Active Discovery sends an HTTP request “/haproxy?stats” to the host and applies the regex “th colspan=2 class=.pxname.>(.*?)</th>” to the response. This regex captures HAProxy sessions in the page and returns them as instances to be monitored.

Port Mode

In Port mode, you must specify a port list, a URI, and a regex.

Note: The regex does not have to capture a substring.

Active Discovery sends an HTTP request to each port in the port list and applies the regex to the response (including headers and payload). The port is returned as an instance if a substring in the HTTP response from that port matches the regex.

Finding All Apache Instances

The Port mode enables you to detect if a company runs Apache on different ports on different servers, and possibly with multiple Apache processes on the same server.

An Apache server supports a status page “/server-status” that reports statistics about server usage. The Apache DataSource Active Discovery can be defined as follows:

Apache DataSource Active Discovery

Active Discovery sends “/server-status” to each port in the range 80–83, and checks if the response contains a substring matching the regular expression “>Apache Status<“. If so, it returns that port as one of the instances.

14-day access to the full LogicMonitor platform