Minimalistic AMQP pinger written in OCaml
3.7K
A minimalistic AMQP server ping tool. It tries to ping the AMQP server, then exits with zero status. If the server isn't responding it exits with nonzero status after making a configured number of attempts.
This may be used as a stage image to get the statically linked binary from.
FROM argentoff/ocamqping as ocamqping
FROM other_base_image
RUN something important
WORKDIR /app
COPY --from=ocamqping /ocamqping /sbin/
COPY . .
RUN something also important
$ git clone https://github.com/argent-smith/ocamqping.git
$ cd ocamqping
$ opam install -y .
ocamqping [OPTION]...
-P, --log-process (absent LOG_PROCESS env)
Whether to add process info (name & pid) to log messages.
-T, --log-times (absent LOG_TIMES env) Whether to timestamp log messages.
--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto,
pager, groff or plain. With auto, the format is pager or
plain whenever the TERM env var is dumb or undefined.
-i VAL, --retry-interval=VAL (absent=1 or OCAMQPING_RETRY_INTERVAL env)
Ping retry interval in seconds
-q, --quiet
Be quiet. Takes over --verbosity.
-r VAL, --retry-count=VAL (absent=255 or OCAMQPING_RETRY_COUNT env)
Ping retry count
-u VAL, --amqp-uri=VAL (absent=amqp://localhost/ or AMQP_URI env)
AMQP server URI
--verbosity=LEVEL (absent=info or LOG_VERBOSITY env)
Be more or less verbose. LEVEL must be one of quiet, error,
warning, info or debug.
--version
Show version information.
These environment variables affect the execution of ocamqping:
OCAMQPING_RETRY_COUNT See option --retry-count.
OCAMQPING_RETRY_INTERVAL — See option --retry-interval.
AMQP_URI — See option --amqp-uri.
LOG_PROCESS — See option --log-process.
LOG_TIMES — See option --log-times.
LOG_VERBOSITY - See option -- --verbosity
Feel free to clone and contribute to this program.
MIT
Content type
Image
Digest
Size
2.7 MB
Last updated
almost 5 years ago
docker pull argentoff/ocamqping