Ping not working in neither docker nor k3s
heathcliff26 opened this issue · comments
Describe the bug
When running gatus from inside k3s or in plain docker, all attempts to monitor nodes via ping fail, despite the being reachable. I have verified that the nodes can be pinged from the gatus host.
What do you see?
When adding endpoint with ping, status check always fails, regardless of node status.
What do you expect to see?
Ping should succeed if the endpoint is reachable.
List the steps that must be taken to reproduce this issue
- Create config.yaml with the following content:
endpoints:
- name: router
group: test
url: "icmp://example.com"
interval: 1m
conditions:
- "[CONNECTED] == true"
- name: router-ipv4
group: test
url: "icmp://192.168.0.1"
interval: 1m
conditions:
- "[CONNECTED] == true"
- Start gatus with:
podman run -p 8080:8080 -v ./config.yaml:/config/config.yaml --name gatus -d docker.io/twinproduction/gatus:v5.10.0
Version
v5.10.0
Additional information
Here is the output from the log:
2024/04/28 16:19:56 [config.LoadConfiguration] Reading configuration from configFile=
2024/04/28 16:19:56 [config.validateAlertingConfig] Alerting is not configured
2024/04/28 16:19:56 [config.validateEndpointsConfig] Validated 2 endpoints
2024/04/28 16:19:56 [config.validateExternalEndpointsConfig] Validated 0 external endpoints
2024/04/28 16:19:56 [store.Initialize] Creating storage provider of type=memory
2024/04/28 16:19:56 [controller.Handle] Listening on 0.0.0.0:8080
┌───────────────────────────────────────────────────┐
│ Fiber v2.52.1 │
│ http://[::]:8080 │
│ │
│ Handlers ............ 27 Processes ........... 1 │
│ Prefork ....... Disabled PID ................. 1 │
└───────────────────────────────────────────────────┘
2024/04/28 16:20:02 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
2024/04/28 16:20:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:21:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:21:07 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
2024/04/28 16:22:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:22:12 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
2024/04/28 16:23:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:23:17 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
2024/04/28 16:24:02 [watchdog.execute] Monitored group=test; endpoint=router-ipv4; success=false; errors=0; duration=0s
2024/04/28 16:24:22 [watchdog.execute] Monitored group=test; endpoint=router; success=false; errors=0; duration=0s
Can you try setting endpoints[].client.network
to ip4
?
endpoints:
- name: router
#...
client:
network: ip4
I did, this does not seem to change anything.
I don't know if you meant ip4
as written or ipv4
, but i tried both:
endpoints:
- name: router
group: test
url: "icmp://example.com"
client:
network: ipv4
interval: 1m
conditions:
- "[CONNECTED] == true"