shukriadams / arewedown

Simple, customizable HTTP uptime and status checking service.
GNU General Public License v3.0
205 stars 21 forks source link

ping from docker doesn't seem to work. #19

Closed Capusjon closed 1 year ago

Capusjon commented 2 years ago

I configured a few simple ping tests. Docker log and log inside config folder all give me this error:

{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)","level":"error","timestamp":"2022-05-01T16:27:29.917Z"}
{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)\n    at runNextTicks (internal/process/task_queues.js:66:3)\n    at processTimers (internal/timers.js:494:9)","level":"error","timestamp":"2022-05-01T16:28:00.011Z"}
{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)\n    at runNextTicks (internal/process/task_queues.js:66:3)\n    at processTimers (internal/timers.js:494:9)","level":"error","timestamp":"2022-05-01T16:29:00.009Z"}
{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)","level":"error","timestamp":"2022-05-01T17:26:36.354Z"}
{"message":"Unhandled exception running \"net.ping\"","stack":"Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...\n    at ChildProcess.<anonymous> (/etc/arewedown/node_modules/ping/lib/ping-promise.js:61:19)\n    at Object.onceWrapper (events.js:421:26)\n    at ChildProcess.emit (events.js:314:20)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)\n    at runNextTicks (internal/process/task_queues.js:66:3)\n    at processTimers (internal/timers.js:494:9)","level":"error","timestamp":"2022-05-01T17:27:00.029Z"}

This is the config:

watchers:
      Pihole-raspberryPi:
          test: net.ping
          host: 10.100.10.251

          # optional
          timeout: 10

Am I missing something? What could be the problem?

Kind regards

Capusjon commented 2 years ago

I don't know what went wrong but I fixed it by installing iputils-ping inside the docker..

now ping seems to work

Capusjon commented 2 years ago

I do have an other question though;

Now it checks every minute if the IP is up or not, can I edit this value to let's say every 10 minutes?

Capusjon commented 2 years ago

I do have an other question though;

Now it checks every minute if the IP is up or not, can I edit this value to let's say every 10 minutes?

Sorry found that as well. All acording to Cron Syntax

interval: "/10 *"

Thanks for the container though. Does exactly what I need it to do 👍

Issue for the ping remains though, I assume this should be working without me installing annything inside the container. Kind regards, Colin

shukriadams commented 2 years ago

Thanks for reporting, I'll look into the ping issue ASAP. And yes, ping should work out-of-the-box. Which container architecture are you running on, x64 or ARM?

Capusjon commented 2 years ago

@shukriadams i'm running both. 2 machines one is x64 other is a rasspberry pi. Both have the same issues and are fixable by installing iputils-ping

shukriadams commented 2 years ago

Yep, adding iputils-ping fixed it. 92792e will be in the next release.