Ping

Supported OS Linux Mac OS Windows

Integrationv1.0.2

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. 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, so you need to install it.

Installation

For Agent v7.21+ / v6.21+, follow the instructions below to install the ping check on your host. See Use Community Integrations to install with the Docker Agent or earlier versions of the Agent.

  1. Run the one following commands to install the Agent integration:

    # Linux
    datadog-agent integration install -t datadog-ping==<INTEGRATION_VERSION>
    
    # Windows
    agent.exe integration install -t datadog-ping==<INTEGRATION_VERSION>
    
  2. Configure your integration similar to core integrations.

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.ping.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

Events

The Ping check does not include any events.

Service Checks

network.ping.can_connect
Returns CRITICAL if the Agent cannot communicate with the target host. Returns OK if the ping is successful.
Statuses: ok, critical

Troubleshooting

Need help? Contact Datadog support.