ICMP
The ICMP check sends ping requests and measures packet loss, duration, and response.
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 pingsudo sysctl -w net.ipv4.ping_group_range="0 2147483647"
The command allows all groups to create ICMP sockets without elevated privileges.
icmp.yamlapiVersion: 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
| Field | Description | Scheme |
|---|---|---|
endpoint* | Hostname or IPv4 host to ping. Do not include a URL scheme or path. |
|
name* | Name of the check, must be unique within the canary |
|
thresholdMillis* | Maximum response time in milliseconds. Set a non-zero value. | int64 |
packetCount | Total number of packets to send per check. Defaults to |
|
packetLossThreshold | Percent of total packets that are allowed to be lost | int64 |
dependsOn | Checks that must complete before this check runs |
|
description | Description for the check |
|
display | Expression to change the formatting of the display | |
icon | Icon for overwriting default icon on the dashboard | |
labels | Labels for check |
|
markFailOnEmpty | If a transformation or datasource returns empty results, the check should fail |
|
metrics | Metrics to export from | |
namespace | Namespace to insert the check result into when it differs from the canary namespace |
|
relationships | Relationships that link check results to components or configs | Relationship |
test | Evaluate whether a check is healthy | |
transform | Transform data from a check into multiple individual checks | |
transformDeleteStrategy | Status to apply to transformed checks when the source check no longer returns them |
|
Metrics
| Metric | Type | Description |
|---|---|---|
canary_check_icmp_packetloss{endpoint="",ip=""} | Gauge | Packet loss percentage in ICMP check |