Wait4X alternatives and similar packages
Based on the "DevOps Tools" category.
Alternatively, view Wait4X alternatives based on common mentions on social networks and blogs.
-
Moby
Moby Project - a collaborative project for the container ecosystem to assemble container-based systems -
Packer
Packer is a tool for creating identical machine images for multiple platforms from a single source configuration. -
Flynn
[UNMAINTAINED] A next generation open source platform as a service (PaaS) -
webhook
webhook is a lightweight incoming webhook server to run shell commands -
Ddosify
High-performance load testing tool, written in Golang. For distributed and Geo-targeted load testing: Ddosify Cloud - https://ddosify.com 🚀 -
Mizu
The API traffic viewer for Kubernetes providing deep visibility into all API traffic and payloads going in, out and across containers and pods inside a Kubernetes cluster. Think TCPDump and Wireshark re-invented for Kubernetes [Moved to: https://github.com/kubeshark/kubeshark] -
dasel
Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package. -
StatusOK
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected. -
goxc
a build tool for Go, with a focus on cross-compiling, packaging and deployment -
s3gof3r
Fast, concurrent, streaming access to Amazon S3, including gof3r, a CLI. http://godoc.org/github.com/rlmcpherson/s3gof3r -
Fleet device management
Fleet is the lightweight, programmable telemetry platform for servers and workstations. Get comprehensive, customizable data from all your devices and operating systems — without the downtime risk. -
uTask
µTask is an automation engine that models and executes business processes declared in yaml. ✏️📋 -
kwatch
:eyes: monitor & detect crashes in your Kubernetes(K8s) cluster instantly -
cassowary
:rocket: Modern cross-platform HTTP load-testing tool written in Go -
jcli
Jenkins CLI allows you to manage your Jenkins in an easy way. Jenkins 命令行客户端 -
Pewpew
Flexible HTTP command line stress tester for websites and web services -
easyssh-proxy
easyssh-proxy provides a simple implementation of some SSH protocol features in Go -
metric
Minimal metrics for Go (counter/gauge/histogram). No dependencies. Compatible with expvar. Web UI included.
Access the most powerful time series database as a service
Do you think we are missing an alternative of Wait4X or a related project?
Popular Comparisons
README
Wait4X
Wait4X allows you to wait for a port or a service to enter the requested state, with a customizable timeout and interval time.
Table of Contents
Features
- Supports various protocols:
- TCP
- HTTP
- Supports various services:
- Redis
- MySQL
- PostgreSQL
- InfluxDB
- MongoDB
- RabbitMQ
- Reverse Checking: Invert the sense of checking to find a free port or non-ready services
- Parallel Checking: You can define multiple inputs to be checked
- CI/CD Friendly: Well-suited to be part of a CI/CD pipeline step
- Cross Platform: One single pre-built binary for Linux, Mac OSX, and Windows
- Importable: Beside the CLI tool, Wait4X can be imported as a pkg in your Go app
- Command execution: Execute your desired command after a successful wait
Installation
There are many ways to install Wait4X
with Docker
Wait4X provides automatically updated Docker images within Docker Hub. It is possible to always use the latest stable tag.
Pull the image from the docker index.
docker pull atkrad/wait4x:latest
then you can launch the wait4x
container.
docker run --rm --name='wait4x' \
atkrad/wait4x:latest --help
From binary
Choose the file matching the destination platform from the release page, copy the URL and replace the URL within the commands below:
Linux
curl -#LO https://github.com/atkrad/wait4x/releases/latest/download/wait4x-linux-amd64.tar.gz
tar --one-top-level -xvf wait4x-linux-amd64.tar.gz
cp ./wait4x-linux-amd64/wait4x /usr/local/bin/wait4x
Mac OSX
curl -#LO https://github.com/atkrad/wait4x/releases/latest/download/wait4x-darwin-amd64.tar.gz
tar --one-top-level -xvf wait4x-darwin-amd64.tar.gz
cp ./wait4x-darwin-amd64/wait4x /usr/local/bin/wait4x
Windows
curl -#LO https://github.com/atkrad/wait4x/releases/latest/download/wait4x-windows-amd64.tar.gz
tar --one-top-level -xvf wait4x-windows-amd64.tar.gz
Verify SHA256 Checksum
Wait4X generates checksum for all binaries with sha256sum to prevent against unwanted modification of binaries.
To validate the archive files, download the checksum file which ends in .sha256sum
for the archive file that you downloaded and use
the sha256sum
command line tool.
curl -#LO https://github.com/atkrad/wait4x/releases/latest/download/wait4x-linux-amd64.tar.gz.sha256sum
sha256sum --check wait4x-linux-amd64.tar.gz.sha256sum
From package
You can find the Wait4X package in some Linux distributions.
On Alpine Linux
You can install the wait4x package from the official sources:
apk add wait4x
On Arch Linux (AUR)
You can install the wait4x package from the Arch User Repository:
yay -S wait4x
Examples
TCP
# If you want checking just tcp connection
wait4x tcp 127.0.0.1:9090
HTTP
# If you want checking just http connection
wait4x http https://ifconfig.co
# If you want checking http connection and expect specify http status code
wait4x http https://ifconfig.co --expect-status-code 200
# If you want checking http connection, status code and match the response body.
# Note: You can write any regex that compatible with Golang syntax (https://pkg.go.dev/regexp/syntax#hdr-Syntax)
wait4x http https://ifconfig.co/json --expect-status-code 200 --expect-body='"country":\s"Netherlands"'
# If you want to check a http response header
# NOTE: the value in the expected header is regex.
# Sample response header: Authorization Token 1234ABCD
# You can match it by these ways:
# Full key value:
wait4x http https://ifconfig.co --expect-header "Authorization=Token 1234ABCD"
# Value starts with:
wait4x http https://ifconfig.co --expect-header "Authorization=Token"
# Regex value:
wait4x http https://ifconfig.co --expect-header "Authorization=Token\s.+"
# Body JSON value:
# Note: the value in the expected JSON will be processed by gjson.
# Note: the complete response MUST be in JSON format to be processed. If one part of the response is JSON
# and the rest is something else like HTML, please use --expect-body instead.
# To know more about JSON syntax https://github.com/tidwall/gjson/blob/master/SYNTAX.md
wait4x http https://ifconfig.co/json --expect-body-json "user_agent.product"
# Body XPath
wait4x http https://www.kernel.org/ --expect-body-xpath "//*[@id="tux-gear"]"
# Request headers:
wait4x http https://ifconfig.co --request-header "Content-Type: application/json" --request-header "Authorization: Token 123"
Redis
# Checking Redis connection
wait4x redis redis://127.0.0.1:6379
# Specify username, password and db
wait4x redis redis://user:[email protected]:6379/1
# Checking Redis connection over unix socket
wait4x redis unix://user:[email protected]/path/to/redis.sock?db=1
# Checking a key existence
wait4x redis redis://127.0.0.1:6379 --expect-key FOO
# Checking a key existence and matching the value
# Note: You can write any regex that compatible with Golang syntax (https://pkg.go.dev/regexp/syntax#hdr-Syntax)
wait4x redis redis://127.0.0.1:6379 --expect-key "FOO=^b[A-Z]r$"
MySQL
# Checking MySQL TCP connection
wait4x mysql user:[email protected](localhost:5555)/dbname
# Checking MySQL UNIX Socket connection
wait4x mysql username:[email protected](/tmp/mysql.sock)/myDatabase
Syntax for the database connection string: https://github.com/go-sql-driver/mysql#dsn-data-source-name
PostgreSQL
# Checking PostgreSQL TCP connection
wait4x postgresql 'postgres://bob:[email protected]:5432/mydb?sslmode=disable'
# Checking PostgreSQL Unix socket connection
wait4x postgresql 'postgres://bob:[email protected]/mydb?host=/var/run/postgresql'
Syntax for the database URL: https://pkg.go.dev/github.com/lib/pq
InfluxDB
# Checking InfluxDB connection
wait4x influxdb http://localhost:8086
MongoDB
# Checking MongoDB connection
wait4x mongodb 'mongodb://127.0.0.1:27017'
# Checking MongoDB connection with credentials and options
wait4x mongodb 'mongodb://user:[email protected]:27017/?maxPoolSize=20&w=majority'
RabbitMQ
# Checking RabbitMQ connection
wait4x rabbitmq 'amqp://127.0.0.1:5672'
# Checking RabbitMQ connection with credentials and vhost
wait4x rabbitmq 'amqp://guest:[email protected]:5672/vhost'
Command Execution
We need to wait for something in order to execute something else. This feature is also supported by using --
after a feature parameter.
Let's have some scenarios:
- As soon as the MySQL server becomes ready, run a Django migration:
wait4x mysql username:[email protected](/tmp/mysql.sock)/myDatabase -- django migrate
- As soon as the new version of the website becomes ready, send an email to the support team:
wait4x http https://www.kernel.org/ --expect-body-xpath "//*[@id="website-logo"]" -- mail -s "The new version of the website has just been released" [email protected] < /dev/null
- Chain type: when PostgreSQL becomes ready, then wait for RabbitMQ, when it becomes ready, then run the integration tests:
wait4x postgresql 'postgres://bob:[email protected]/mydb?host=/var/run/postgresql' -t 1m -- wait4x rabbitmq 'amqp://guest:[email protected]:5672/vhost' -t 30s -- ./integration-tests.sh
- Using an environment variable in the command:
EMAIL="[email protected]" wait4x http https://www.kernel.org/ --expect-body-xpath "//*[@id="website-logo"]" -- mail -s "New version of the website has just released" $EMAIL < /dev/null
# Or
export EMAIL="[email protected]"
wait4x http https://www.kernel.org/ --expect-body-xpath "//*[@id="website-logo"]" -- mail -s "New version of the website has just released" $EMAIL < /dev/null