WatchCat is a tool for monitoring network latency by pinging specified IP addresses and providing a web interface to view the results. It can be run as a standalone application or installed as a systemd service for continuous monitoring. The application is configured via a config.json file
Download the latest release binary for Linux using the following command:
curl -L https://github.com/alirezasn3/watchcat/releases/download/v1.0.1/watchcat-linux-amd64 -o watchcatchmod +x watchcatCreate a config.json file in the same directory as the executable with the following structure:
{
"listenAddress": "0.0.0.0",
"destinations": ["8.8.8.8", "1.1.1.1"],
"monitorAddress": ":8080"
}- listenAddress: • Type: String • Description: This field specifies the IP address that the ICMP (ping) packets will be sent from. In the provided example, "0.0.0.0" means that the application will listen on all available network interfaces.
- destinations: • Type: Array of Strings • Description: This field contains a list of IP addresses that the application will ping. Each IP address in the array represents a destination that the WatchCat tool will monitor for network latency.
- monitorAddress: • Type: String • Description: This field specifies the address and port on which the web server will listen for incoming HTTP requests. In the provided example, ":8080" means that the server will listen on port 8080 on all available network interfaces.
To run WatchCat, simply execute the binary:
watchcatTo install WatchCat as a systemd service:
watchcat --installThis will create a systemd service named "watchcat" that will start automatically on system boot.
To remove the WatchCat systemd service:
watchcat --uninstallOnce WatchCat is running, you can access the web interface by opening a web browser and navigating to http://localhost:8080. Replace localhost with the appropriate IP address if accessing from a different machine.
