feat: add ICMP ping check support to item#2180
Conversation
fd3768e to
03b713a
Compare
lissy93
left a comment
There was a problem hiding this comment.
This looks awesome!!
My only thought, is that I don't think this would work in Docker. Since the container doesn't run as root, and opening an ICMP socket requires root. And the ping binary isn't present (that could be fixed, by installing it in the Dockerfile).
Few really small things:
- Revert the
conf.yml - Small lint warning in Item.vue (variable imported not used)
- Vaidate host within the server endpoint too
689bbae to
4af65d0
Compare
Hello Lissy, I was wondering. Do you want me to update the Dockerfile to add the ping binary and maybe giving rights to the node user to call it or do you want to make it yourself to insure the security of the container ? Regards Benjamin |
The Dockerfile must not be changed to root-only. Changing UID will break all existing installs. Running as root will drastically reduce security of all installs. Seems that the Busybox ping output differs from the iputils (which pingman's parser expects), so it's going to need the I've not tested yet, but it should be: RUN apk add --no-cache tzdata tini iputils-ping \
&& apk add --no-cache --virtual .setcap libcap-setcap \
&& setcap cap_net_raw+ep "$(readlink -f "$(command -v ping)")" \
&& apk del .setcap |
… CI NodeJS version (20). Fixed a behavior bug in status indicator component which didn't changed icon to yellow when checking. Made otherStatusText a computed field to make it reflecting dynamically a new check request. Added more examples to default conf.yml
Corrected tests using localhost which is not a valid host for pingman. Added a Validator.js file in src/utils with function to check validity of hosts. Reverted conf.yml file to the original version.
… of IPV6 addresses.
e6bd9fa to
35e08f7
Compare
…sts` to the existing one
|
No. I'm not ready. Sorry. I still have to remove Validator redudant functions and I need to test the modifications of the Dockerfile to make sure the ping works in the container. Maybe I'm not doing it the right way in GitHub. I make a commit for each fix and mark the related conversation as resolved. This way, I ensure the CI is still OK after each modification. |
…o the pingman module can work in Docker container
…dation of hostname instead to avoid command injection.
|
Now, I think it ready to be merged if you validate it. |
Category
Feature
Overview
Items only had a host status check using a HTTP(S) endpoint and checking the returned HTTP code.
Now, it is also possible to make a real ICMP PING to the same host defined by the item's url or using a different IPV4 or hostname. The number of ICMP packets sent as well as the timeout and the period between new pings can be customized globally or per item. See the documentation for details.