ICMP Ping

ICMP Ping

Certified

Check if hosts answer to ICMP ping

Probes each host sequentially with InetAddress.isReachable from the worker and returns a typed result per host: packets sent and received, loss, and min/avg/max round-trip time.

A host is reachable when at least one probe is answered. Use expect to fail the task when the outcome is not the one you want; for an "address must be free" check, set expect: UNREACHABLE. With the default ANY the task never fails because of reachability. All hosts are probed before the expectation is applied, and a single error lists every host that broke it.

ICMP privileges. The JDK does not run the ping binary. On Linux it needs a raw ICMP socket, which requires root or the CAP_NET_RAW capability (in a container, add it with --cap-add=NET_RAW). Setting net.ipv4.ping_group_range was not enough to enable ICMP in testing. Without that privilege, the JDK silently falls back to a TCP connection to port 7 (echo), which most hosts refuse or filter; the host may then be reported unreachable even though it is up. Make sure the worker has root or CAP_NET_RAW before relying on the result.

yaml
type: io.kestra.plugin.fs.icmp.Ping

Ping a list of hosts and log the result.

yaml
id: icmp_ping
namespace: company.team

tasks:
  - id: ping
    type: io.kestra.plugin.fs.icmp.Ping
    hosts:
      - 192.168.1.1
      - example.com
    count: 4
    probeTimeout: PT1S

  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "All reachable: {{ outputs.ping.allReachable }}"

Fail if an IP address is already in use.

yaml
id: icmp_ip_must_be_free
namespace: company.team

tasks:
  - id: ip_is_free
    type: io.kestra.plugin.fs.icmp.Ping
    hosts:
      - 10.0.0.12
    expect: UNREACHABLE

Wait until a device is back online.

yaml
id: icmp_wait_for_device
namespace: company.team

tasks:
  - id: wait_for_device
    type: io.kestra.plugin.core.flow.LoopUntil
    condition: "{{ outputs.ping.results[0].reachable }}"
    checkFrequency:
      interval: PT10S
      maxDuration: PT10M
    failOnMaxReached: true
    tasks:
      - id: ping
        type: io.kestra.plugin.fs.icmp.Ping
        hosts:
          - 192.168.1.50
        count: 1
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-fs --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

Properties
SubTypestring

Hosts to ping

Host names or IPv4/IPv6 addresses, probed one after the other. At most 256 hosts per task; use ForEach for larger lists.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Default4

Number of probes per host

Between 1 and 100.

DefaultANY
Possible Values
REACHABLEUNREACHABLEANY

Expected outcome

REACHABLE fails the task if a host does not answer, UNREACHABLE fails it if a host answers or cannot be probed (DNS failure, network error), ANY never fails on reachability.

DefaultPT1S

Delay between two probes of the same host

Between 0 and 1 minute.

DefaultPT1S

Timeout per probe

Between 1 millisecond and 1 minute. Applies to each probe only; the inherited task-level timeout is the overall limit and is not set by default.

Defaultfalse

Whether every host is reachable

One result per host, in input order

Definitions
errorstring

Error message, for example a DNS failure

hoststring

The probed host

packetLossnumber
Default0

Packet loss in percent

packetsReceivedinteger
Default0

Number of probes answered

packetsSentinteger
Default0

Number of probes sent

reachableboolean
Defaultfalse

Whether at least one probe was answered

rttAvgstring
Formatduration

Average round-trip time

Empty when no probe was answered.

rttMaxstring
Formatduration

Maximum round-trip time

Empty when no probe was answered.

rttMinstring
Formatduration

Minimum round-trip time

Empty when no probe was answered.