Setting Up HTTP Checks with the Datadog Agent

Setting Up HTTP Checks with the Datadog Agent
Photo by Brad Neathery / Unsplash

HTTP checks are a simple way to monitor the availability and response times of your services. This guide walks you through installing the Datadog Agent and configuring it to perform HTTP checks.

1. Install the Datadog Agent

First, install the Datadog Agent on a host that will run the HTTP checks.

  • If you want a centralized runner, you can spin up a standalone VM (virtual machine) dedicated to HTTP checks.
  • Use your Datadog API key during the installation. You can find the Agent install command in the Datadog Agent installation page.

2. Locate the HTTP Check Configuration Directory

Once the Agent is installed, log into the host (e.g., your VM) and navigate to the configuration directory (agent configuration location):

cd /etc/datadog-agent/conf.d/http_check.d/

Inside, you’ll find a sample configuration file:

conf.yaml.example

Copy it to conf.yaml to begin customizing:

cp conf.yaml.example conf.yaml

3. Configure HTTP Checks

Edit conf.yaml to define the endpoints you want to monitor. Each entry is an instance in the configuration:

instances:
  - name: my_service
    url: https://my-service.example.com/health
    method: GET
    timeout: 5
    tls_verify: true

You can configure multiple endpoints under instances. Options include:

  • method: GET, POST, etc.
  • timeout: How long to wait before failing.
  • tls_verify: Whether to enforce TLS certificate validation.
  • headers: Add custom request headers.

See the Datadog HTTP check documentation for the full list of options.

4. Restart the Agent

Once you’ve updated conf.yaml, restart the Agent to apply changes:

sudo systemctl restart datadog-agent

The Agent will now start running the HTTP checks.

5. Scale with Runners

By default, the Agent runs a limited number of checks in parallel (runners/threads).

  • If you’re monitoring many endpoints, you may want to increase the number of runners.
  • Update the check_runners (default to 4) setting in the Agent configuration (/etc/datadog-agent/datadog.yaml) (example of config file).

Example:

check_runners: 10

This allows more checks to execute concurrently, which is useful since most of the time is spent waiting for server responses.

6. Monitor from Multiple Regions

The HTTP check measures response time from the Agent’s location.

  • If you want latency metrics from different geographies (e.g., Japan, South America, Australia), you should deploy an Agent in each region.
  • Use the same configuration so checks are consistent across locations.

7. Metrics and Costs

  • The HTTP check reports standard metrics (http.response_time, http.can_connect, etc.).
  • These do not incur additional Datadog custom metric costs.
  • You can use them in dashboards, monitors, and alerts as with any other metric.

✅ At this point, your Datadog Agent is set up to run HTTP checks against your services, and you can scale/extend the setup as needed.

Read more