Skip to content

http datasource

The http datasource makes an HTTP request to specified URL(s) and returns information about the site’s uptime and availability.

If you want to configure the Site Availability Monitor (SAM) collector to monitor both external and internal sites and endpoints, then you need to enable the http datasource. The SAM collector monitors the availability of internal sites, such as servers, network devices, and applications, from within your firewall.

To use the SAM collector, install the Linux agent and configure the http datasource.

Configuration

If you specify the http datasource during installation, its configuration file is placed in the following location:

/etc/zendatamon-configs/configs/http.config.yaml

You can use this single configuration file to monitor multiple URLs and their accompanying credentials. Optionally, you can set redirection and content parameters to fine-tune site availability monitoring when your sites are redirected.

If you don't specify the http datasource during installation of the agent, you must manually create the configuration file. Use the following example file to get started, then refer to the SAM configuration options. Be sure to supply a header for your file.

apiVersion: v1
kind: datasource
name: http
spec:
  type: http
  datasource:


    # Note: The rest of this configuration file is in the same format as
    # is used in the Zenoss Site Availability Monitor.
    #
    # Additional configuration options are available for authentication and
    # controlling the handling of redirections.
    #
    # These options are described in the Site Availability Monitor section
    # of https://docs.zenoss.io/


    # URLs to "ping". Each url can contain several subpages with parameters.
    urls:


      # Url alias name
      ZenossPublicSite:
        address: https://zenoss.com
        send_metrics: true


        # An interval for how often this url will be pinged.
        # The interval can be specified in seconds, minutes, or hours (e.g., "60s", "10m", "1h").
        # 60 seconds by default.
        interval: 60s


        subpages:
          # subpage alias name (do not use spaces in alias names)
          homepage:


            # Subpage path, to be concatenated with url address (http://zenoss.com/)
            path: /


            # HTTP method (such as GET or POST)
            method: get


            # By default, a 2xx response code is considered success.   Additional configuration
            # options are available for checking the response for specific content.

The Zenoss Cloud agent service monitors the /etc/zendatamon-configs/configs directory and loads any new or changed configuration files immediately.

Properties

To view all the properties in the SAM configuration file, see SAM connector configuration options.