deweysasser / docker-xymon Goto Github PK
View Code? Open in Web Editor NEWDockerization of the Xymon monitoring system on an Ubuntu base
License: Artistic License 2.0
Dockerization of the Xymon monitoring system on an Ubuntu base
License: Artistic License 2.0
Proposed changes summarized below:
Install a few additional packages:
Enabled two additional apache modules and added apache check in default config: info status
Added healthcheck using "xymon localhost ping"
I hope I'm not being presumptuous in suggesting these. The changes have been helpful for me.
ntpdate binary is missing from the container. when installed manually, it works ok.
I have setup ZFS monitoring and I am able to run the check manually on the CLI but somehow the "clientlaunch" config doesn't seem to be picking it up correctly. I know this all worked correctly when I had server/client installed locally via APT. Any ideas?
https://www.freesoftwareservers.com/display/FREES/ZFS+Monitor+for+XYMon
Eg: This works correctly, but then status goes purple.
/usr/lib/xymon/client/bin/xymoncmd /usr/lib/xymon/client/ext/zfs.ksh
ClientLaunch:
cat << 'EOL' >/etc/xymon/clientlaunch.d/zfs.cfg
[zfs]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/zfs.ksh
LOGFILE $XYMONCLIENTHOME/logs/zfs.log
INTERVAL 5m
EOL
Only added tzdata and switch to ubuntu:20.04, all is working fine.
Dockerfile:
FROM ubuntu:20.04
MAINTAINER Dewey Sasser <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive TZ=posixrules
ADD AutomaticCleanup /etc/apt/apt.conf.d/99AutomaticCleanup
# Install what we need from Ubuntu
RUN apt-get update
# tcpdump is for debugging client issues, others are required
RUN apt-get install -y curl xymon apache2 tcpdump ssmtp mailutils rrdtool tzdata
# Get the 'dumb init' package for proper 'init' behavior
RUN curl -L https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb > dumb-init.deb && \
dpkg -i dumb-init.deb && \
rm dumb-init.deb
ADD add-files /
# Enable necessary apache components
# make sure the "localhost" is correctly identified
# and ensure the ghost list can be updated
# Then, save the configuration so when this container starts with a
# blank volume, we can initialize it
RUN a2enmod rewrite authz_groupfile cgi; \
perl -i -p -e "s/^127.0.0.1.*/127.0.0.1 xymon-docker # bbd http:\/\/localhost\//" /etc/xymon/hosts.cfg; \
chown xymon:xymon /etc/xymon/ghostlist.cfg /var/lib/xymon/www ; \
tar -C /etc/xymon -czf /root/xymon-config.tgz . ; \
tar -C /var/lib/xymon -czf /root/xymon-data.tgz .
VOLUME /etc/xymon /var/lib/xymon
EXPOSE 80 1984
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/etc/init.d/container-start"]
As a consequence of the updates for Apache 2.4, the protected cgi directory is no longer protected, so anyone can make state changes without login.
I get a 503 error when i click on a probe to show status.
Not append everytime, mostly when then container restart.
Here is the Apache logs:
[cgid:error] [pid 25:tid 140375637358336] (2)No such file or directory: [client 172.19.0.1:41104] AH02833: ScriptSock /var/run/apache2/cgisock.22 does not exist: /usr/lib/xymon/cgi-bin/svcstatus.sh
We need a way for the containerized Xymon to access the mail server
Make a multi-layer Dockerfile so we're not including a compiler in the runtime.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.