Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, 
n'hésitez pas à nous contacter.
Overview
When configured, the SNMP check can also send ICMP pings to your devices. This can be configured for individual as well as Autodiscovered devices.
Prerequistes
Setup
- Edit the - snmp.d/conf.yamlfile in the- conf.d/folder at the root of your Agent’s configuration directory for individual devices, or the- datadog.yamlAgent configuration file for Autodiscovery. See the sample snmp.d/conf.yaml for all available configuration options.
 
- Linux Only: If you’re receiving errors when running ping, you may need to configure the integration to send pings using a raw socket. This requires elevated privileges and is done using the Agent’s system-probe. See the linux.use_raw_socket - system-probeconfiguration below.
 
To apply ping settings to all manually configured devices, add the ping configuration in the init_config section:
init_config:
  loader: core
  use_device_id_as_hostname: true
  ping:
    enabled: true            # (default false) enable the ping check
    linux:                   # (optional) Linux specific configuration
    use_raw_socket: true     # (optional, default false) send pings using a raw socket (see step 3 above)
instances:
  - ip_address: '1.2.3.4'
    community_string: 'sample-string'
    tags:
    - 'key1:val1'
    - 'key2:val2'
Or, apply the ping configuration per instance:
init_config:
  loader: core
  use_device_id_as_hostname: true
instances:
  - ip_address: '1.2.3.4'
    community_string: 'sample-string'
    tags:
      - 'key1:val1'
      - 'key2:val2'
    ping:
      enabled: true            # (default false) enable the ping check
      linux:                   # (optional) Linux specific configuration
        use_raw_socket: true     # (optional, default false) send pings using a raw socket 
Configure ping settings in the network_devices section under the Autodiscovery parameter to apply them to all Autodiscovery subnets.
network_devices:
  autodiscovery:
    workers: 100
    discovery_interval: 3600
    loader: core
    use_device_id_as_hostname: true
    configs:
      - network_address: 10.10.0.0/24
        loader: core
        snmp_version: 2
        port: 161
        community_string: '***'
        tags:
        - "key1:val1"
        - "key2:val2"
        ping:
          enabled: true            # (default false) enable the ping check
          linux:                   # (optional) Linux specific configuration
          use_raw_socket: true   # (optional, default false) send pings using a raw socket (see step 3 above)
Note: For Autodiscovery, Datadog does not ping devices that do not respond to SNMP.
If you’re on Linux and want to use raw sockets for ping, you must also enable ping in the system-probe configuration file in addition to the Agent configuration.
Edit /etc/datadog-agent/system-probe.yaml to set the enable flag to true.
After ping is enabled on your network devices, the Ping State column appears in Network Device Monitoring, displaying the ping status for each device.
The following are the status names in the Ping State column and their descriptions:
| Status name | Description | 
|---|
| Unreachable | Device is unreachable through ping. | 
| Unmonitored | Ping has not been configured for this device. | 
| Ok | Device is reachable through ping. | 
| N/A | The devices do not support ping. | 
Metrics collected
The following metrics are made available after enabling ping:
| Metric name | Description | 
|---|
| networkdevice.ping.avg_rtt | Average round-trip time | 
| networkdevice.ping.reachable | Device reachability status | 
| networkdevice.ping.packet_loss | Packet loss percentage | 
| networkdevice.ping.unreachable | Device unreachable status | 
Further Reading
Documentation, liens et articles supplémentaires utiles: