gping
gping copied to clipboard
Add --name option to display custom names for hosts
This PR adds a new --name feature that allows users to specify custom display names for hosts being pinged. This makes it easier to identify targets in the graph, especially when monitoring multiple similar IPs or when the hostname isn't descriptive enough.
Feature Details
- Added a new --name command line option that can be used multiple times
- Each --name corresponds to a host in the same order they're specified on the command line
- Custom names are displayed in the format: Custom Name (IP Address)
- Falls back to the original hostname display if no custom name is provided
- Works seamlessly with existing features like cloud shorthands and IPv4/IPv6 options
Example Usage
Specify custom names for hosts
gping --name "Google DNS" 8.8.8.8 --name "Cloudflare DNS" 1.1.1.1
Mix named and unnamed hosts
gping --name "Production DB" 10.0.0.5 10.0.0.6 10.0.0.7