Skip to main content

ICMP

The ICMP check sends ping requests and measures packet loss, duration, and response.

info

Canary Checker supports both privileged and unprivileged ping modes using the PING_MODE environment variable or pingMode Helm value.

Run the following command to allow unprivileged ICMP sockets:

Enable unprivileged ping
sudo sysctl -w net.ipv4.ping_group_range="0 2147483647"

The command allows all groups to create ICMP sockets without elevated privileges.

icmp.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: icmp
spec:
schedule: "@every 5m"
icmp:
- name: ICMP test
endpoint: api.github.com
thresholdMillis: 600
packetLossThreshold: 10
packetCount: 2
FieldDescriptionScheme
endpoint*

Hostname or IPv4 host to ping. Do not include a URL scheme or path.

string

name*

Name of the check, must be unique within the canary

string

thresholdMillis*

Maximum response time in milliseconds. Set a non-zero value.

int64

packetCount

Total number of packets to send per check. Defaults to 5

integer

packetLossThreshold

Percent of total packets that are allowed to be lost

int64

dependsOn

Checks that must complete before this check runs

[]string

description

Description for the check

string

display

Expression to change the formatting of the display

Expression

icon

Icon for overwriting default icon on the dashboard

Icon

labels

Labels for check

[map[string]string]

markFailOnEmpty

If a transformation or datasource returns empty results, the check should fail

boolean

metrics

Metrics to export from

[]Metrics

namespace

Namespace to insert the check result into when it differs from the canary namespace

string

relationships

Relationships that link check results to components or configs

Relationship

test

Evaluate whether a check is healthy

Expression

transform

Transform data from a check into multiple individual checks

Expression

transformDeleteStrategy

Status to apply to transformed checks when the source check no longer returns them

string

Metrics

MetricTypeDescription
canary_check_icmp_packetloss{endpoint="",ip=""}GaugePacket loss percentage in ICMP check