wtfutil / wtf

The personal information dashboard for your terminal
http://wtfutil.com
Mozilla Public License 2.0
15.69k stars 800 forks source link

Add a ping module #1623

Open tabell opened 7 months ago

tabell commented 7 months ago

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.

stale[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.