spotware.blogg.se

Monit linux examples
Monit linux examples








monit linux examples

  • Download monit and install it to /usr/local/bin/monit.
  • Install some basic packages that we need in the container.
  • Let’s break down what’s here in the container build file: ENV HOME =/tmp COPY extras/start.sh /opt/start.sh RUN chmod +x /opt/start.sh CMD VOLUME # Start monit when the container starts. EXPOSE 2812 # Set up a volume for /config.

    monit linux examples

    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.

    monit linux examples

    In my case, some of the scripts I want to run require curl, httpie (forĬomplex HTTP/JSON requests), and jq (for parsing json).

  • any packages needed for running monitoring scripts.
  • a directory to hold lots of additional monitoring configs.
  • Monit in a container #īefore we can put monit into a container, we need to think about what it Might not have a route or a NodePort configured, but you can monitor systems Monit inside OpenShift allows you to monitor services inside OpenShift that

    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,










    Monit linux examples