
/001_linux-which-command-4062680-5be4c1cfc9e77c0051b0761a.png)

RUN chmod g =u /etc/passwd /etc/group # The monit server listens on 2812. RUN sed -i '/^monit/d' /etc/passwd RUN sed -i '/^monit/d' /etc/group # Work around OpenShift's arbitrary UID/GIDs. RUN curl -Lso /tmp/monit.tgz RUN cd /tmp & tar xf monit.tgz RUN mv /tmp/monit-*/bin/monit /usr/local/bin/monit RUN rm -rf /tmp/monit* # Remove monit user/group. RUN dnf -y upgrade RUN dnf -y install coreutils httpie jq libnsl libxcrypt-compat RUN dnf clean all # Install monit. I’ve added those,Īlong with some requirements for the monit binary, to my container build file:įROM fedora:latest # Upgrade packages and install monit.

In my case, some of the scripts I want to run require curl, httpie (forĬomplex HTTP/JSON requests), and jq (for parsing json).
MONIT LINUX EXAMPLES HOW TO
However, this post is all about how to deploy it inside OpenShift. Most Linux distributions have a package for monit and the package usuallyĬontains some basic configuration along with a systemd unit file to run the There’s only oneīinary daemon to run and it reads monitoring configuration from files in a Monit is a tried-and-true method for monitoring all kinds of systems,
