dish is a lightweight monitoring service designed to test socket connections seamlessly. With its remote configuration capabilities and fast parallel testing, it simplifies the monitoring process. Users can easily deploy and configure DISH to monitor HTTP/S and TCP endpoints with minimal overhead, ensuring optimal performance.
dish is a streamlined monitoring service designed for efficient socket connection checks. This versatile tool can be configured remotely and operates as a one-shot service, making it ideal for rapid monitoring of various HTTP/S and TCP sockets.
-source ${REMOTE_JSON_API_URL} option.The dish tool can be installed using the following command:
go install go.vxn.dev/dish/cmd/dish@latest
To explore the options, invoke:
dish -h
# Specify a local JSON file to load sockets
dish -source /opt/dish/sockets.json
# Use a remote REST API to supply socket information
dish -source http://restapi.example.com/dish/sockets/:instance
When monitoring, timely notifications of any issues are crucial. dish provides multiple alerting methods:
-updateURL option.
(This screenshot illustrates Telegram alerting in action.)
dish can be easily deployed in Docker:
# Build the Docker image
make build
# Run using Docker Compose
make run
# Or use Docker run command
docker run --rm \
dish:1.7.1-go1.23 \
-verbose \
-source https://api.example.com \
-pushgw \
-target https://pushgateway.example.com
To automate the running of dish, a bash script can be created and scheduled:
# Example bash script (tiny-dish-run.sh)
#!/bin/bash
TELEGRAM_TOKEN="123:AAAbcD_ef"
# additional setup omitted for brevity
docker run --rm \
${DISH_TAG} \
# setting flags and options
A cronjob can then be added to run this script periodically:
# Crontab configuration
MAILTO=monitoring@example.com
*/2 * * * * /home/user/tiny-dish-run.sh
For more in-depth information, refer to the dish history article.
In summary, dish serves as an efficient and flexible solution for monitoring socket connections, making it an invaluable tool for developers and system administrators.
No comments yet.
Sign in to be the first to comment.