New announcements for Serverless, Network, RUM, and more from Dash! New announcements from Dash!

Ping

Agent Check Agent Check

Supported OS: Linux Mac OS Windows

Overview

This check uses the system ping command to test the reachability of a host. It also optionally measures the round-trip time for messages sent from the check to the destination host.

Ping operates by sending Internet Control Message Protocol (ICMP) echo request packets to the target host and waiting for an ICMP echo reply.

This check uses the system ping command, rather than generating the ICMP echo request itself, as creating an ICMP packet requires a raw socket, and creating raw sockets requires root privileges, which the Agent does not have. The ping command uses the setuid access flag to run with elevated privileges, avoiding this issue.

Setup

The Ping check is NOT included in the Datadog Agent package.

Installation

If you are using Agent v6.8+ follow the instructions below to install the Ping check on your host. See our dedicated Agent guide for installing community integrations to install checks with the Agent prior to version 6.8 or the Docker Agent:

  1. Install the developer toolkit.
  2. Clone the integrations-extras repository:

    git clone https://github.com/DataDog/integrations-extras.git.
    
  3. Update your ddev config with the integrations-extras/ path:

    ddev config set extras ./integrations-extras
    
  4. To build the ping package, run:

    ddev -e release build ping
    
  5. Download and launch the Datadog Agent.

  6. Run the following command to install the integrations wheel with the Agent:

    sudo -u dd-agent datadog-agent integration install -w <PATH_OF_PING_ARTIFACT_>/<PING_ARTIFACT_NAME>.whl
    
  7. Configure your integration like any other packaged integration.

Configuration

  1. Edit the ping.d/conf.yaml file, in the conf.d/ folder at the root of your Agent’s configuration directory to start collecting your ping performance data. See the sample ping.d/conf.yaml for all available configuration options.

  2. Restart the Agent.

Validation

Run the Agent’s status subcommand and look for ping under the Checks section.

Data Collected

Metrics

network.tcp.response_time
(gauge)
The response time of a given host and ping port, tagged with url, e.g. 'host:192.168.1.100'.
Shown as millisecond
network.ping.can_connect
(gauge)
Value of 1 if the agent can successfully communicate with the target host, 0 otherwise

Service Checks

network.ping.can_connect:

Returns CRITICAL if the Agent cannot communicate with the target host. Returns OK if the ping is successful.

Events

The Ping check does not include any events.

Troubleshooting

Need help? Contact Datadog support.


Mistake in the docs? Feel free to contribute!