Ping Monitoring Configuration

Component Requirement
Agent atatus-infra-agent
Version 4.2.0+
Ping Support Optional (disabled by default)
OS Support Linux-only raw socket mode

Configuration Location

Use Case Path
Individual SNMP Devices /etc/atatus-infra-agent/conf.d/snmp.d/snmp.yml
Subnet Autodiscovery Same SNMP YAML under instances:

Ping Configuration Options

Ping settings can be defined in two places:

Globally — under init_config: (affects all SNMP devices)

Per device — inside each device under instances:

  1. Global Ping Configuration

Add this under snmp → init_config:

copy
icon/buttons/copy
snmp:
  init_config:
    use_device_id_as_hostname: true

    ping:
      enabled: true           # Enables ping for all SNMP devices
      count: 2                # ICMP packets per check
      interval: 1000          # ms between packets
      timeout: 1000           # ms timeout

      linux:
        use_raw_socket: true  # Required if normal ping fails (Linux only)

When to use raw socket mode?

On Linux, ICMP ping requires elevated privileges. If you see ping failures in logs, enable:

copy
icon/buttons/copy
linux:
  use_raw_socket: true
  1. Per-Device Ping Configuration

To enable Ping for a specific device:

copy
icon/buttons/copy
snmp:
  init_config:
    use_device_id_as_hostname: true

  instances:
    - ip_address: "1.2.3.4"
      community_string: "public"

      ping:
        enabled: true
        count: 2
        timeout: 1000
        linux:
          use_raw_socket: true

      tags:
        - location:dc1
        - role:switch

Use this when you want ping enabled only for selected devices.

  1. Ping for Autodiscovered Devices

Ping is also supported during SNMP subnet autodiscovery:

copy
icon/buttons/copy
instances:
  - name: "subnet-scan"
    network_address: "10.10.0.0/24"

    snmp_version: "2"
    community_string: "public"

    ping:
      enabled: true
      count: 2
      timeout: 1000

    discovery_interval: 3600
    discovery_workers: 100

    tags:
      - env:prod
      - subnet:10.10

Status types

Status Meaning
Unreachable Ping failed (device not reachable)
Unmonitored Ping is not enabled for this device
Ok Device responded successfully
N/A Device does not support ping

Metrics Collected

Metric Name Description
networkdevice.ping.avg_rtt Average round-trip time
networkdevice.ping.reachable Device reachability (1 or 0)
networkdevice.ping.packet_loss Packet loss percentage
networkdevice.ping.unreachable Device unreachable count

These metrics appear along with all other SNMP metrics.

Restart the Agent

copy
icon/buttons/copy
sudo systemctl restart atatus-infra-agent