Conversation
constructs/icmp-monitor.mdx
Outdated
| | `hostname` | `string` | ✅ | - | The target host (domain name or IP address) | | ||
| | `pingCount` | `number` | ❌ | `10` | Number of ICMP Echo Request packets to send per check run (1-50, default: 10) | | ||
| | `assertions` | `IcmpAssertion[]` | ❌ | `[]` | Response assertions using the `IcmpAssertionBuilder` | | ||
| | `ipFamily` | `string` | ❌ | `IPv4` | IP family selection (Ipv4, Ipv6) | |
There was a problem hiding this comment.
You should use the proper casing for the available values because it matters (IPv4 and IPv6).
There was a problem hiding this comment.
Good catch, thank you!
constructs/icmp-monitor.mdx
Outdated
| ```ts | ||
| IcmpAssertionBuilder.jsonResponse('$.packetLoss').lessThan(10) | ||
| // Equivalent to: | ||
| { source: 'JSON_RESPONSE', property: '$.packetLoss', comparison: 'LESS_THAN', target: '10' } |
There was a problem hiding this comment.
I would use a different field like packetsReceived in the example.
There was a problem hiding this comment.
Also we should have the full schema available somewhere. Don't use the CLI's comments as a reference for that btw - I am not completely sure whether it is accurate. If you find a discrepancy, let me know.
There was a problem hiding this comment.
Updated the example and linked to the JSON response schema (which atm is more of a placeholder, will work on this with engineering)
sorccu
left a comment
There was a problem hiding this comment.
Added a comment but it's optional.
| "rtt": 0.705368, | ||
| "ttl": 57 | ||
| } | ||
| // ... one entry per ping attempt |
There was a problem hiding this comment.
Would be cool to change this example to include a failure as well.
Affected Components