wtf
wtf copied to clipboard
Add a ping module
This adds a very basic Ping module, for when you need to see if a service is online but you can't / don't want to use a third-party API like updown.io. Sends an ICMP (or UDP) echo request and displays whether a response was received.
Note: sending ICMP is a privileged operation on some versions of Linux, so you either need to grant the wtf binary CAP_NET_RAW capability or allow unprivileged users to send UDP pings https://github.com/prometheus-community/pro-bing#linux
I haven't tested on Windows or anything other than Linux.
This is my first wtf module so there's probably a bunch of stuff that could be better / cleaner. Happy to make changes / improvements based on suggestions.