Comments (2)
even strech now actually :)
from docker_shinken.
I got this working using the following Dockerfile:
# Shinken Docker installation using pip (latest)
FROM debian:jessie
MAINTAINER Rohit Gupta
# Install Shinken, Nagios plugins, apache2 and supervisord
RUN apt-get update && apt-get install -y python-pip \
python-pycurl \
python-cherrypy3 \
nagios-plugins \
libsys-statistics-linux-perl \
apache2 \
libapache2-mod-proxy-html \
supervisor \
python-dev \
python-cairo \
python-crypto \
libssl-dev \
inotify-tools \
ntp
RUN useradd --create-home shinken && \
pip install shinken pymongo>=3.0.3 requests arrow bottle==0.12.8 && \
update-rc.d -f apache2 remove && \
update-rc.d -f shinken remove
# Install shinken modules from shinken.io
RUN chown -R shinken:shinken /etc/shinken/ && \
su - shinken -c 'shinken --init' && \
su - shinken -c 'shinken install webui2' && \
su - shinken -c 'shinken install auth-htpasswd' && \
su - shinken -c 'shinken install sqlitedb' && \
su - shinken -c 'shinken install pickle-retention-file-scheduler' && \
su - shinken -c 'shinken install booster-nrpe' && \
su - shinken -c 'shinken install logstore-sqlite' && \
su - shinken -c 'shinken install livestatus' && \
su - shinken -c 'shinken install graphite' && \
su - shinken -c 'shinken install ui-graphite'
# Install Graphite
RUN pip install Twisted==11.1.0 && \
pip install flup==1.0.2 && \
pip install django==1.5.10 && \
pip install django-tagging==0.3.2 && \
pip install https://github.com/graphite-project/ceres/tarball/master && \
pip install whisper==0.9.12 && \
pip install carbon==0.9.12 && \
pip install graphite-web==0.9.12 && \
pip install gunicorn==19.1.1
# Install and configure thruk
RUN gpg --keyserver keys.gnupg.net --recv-keys F8C1CA08A57B9ED7 && \
gpg --armor --export F8C1CA08A57B9ED7 | apt-key add - && \
echo 'deb http://labs.consol.de/repo/stable/debian jessie main' >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y thruk && \
apt-get clean
ADD thruk/thruk_local.conf /etc/thruk/thruk_local.conf
# Install check_nrpe plugin
ADD nrpe-2.15.tar.gz /usr/src/
RUN cd /usr/src/nrpe-2.15/ && \
./configure --with-nagios-user=shinken --with-nagios-group=shinken --with-nrpe-user=shinken --with-nrpe-group=shinken --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu && \
make all && \
make install-plugin && \
mv /usr/local/nagios/libexec/check_nrpe /usr/lib/nagios/plugins/check_nrpe && \
cd / && \
rm -rf /usr/src/nrpe-2.15
# Configure apache
ADD shinken/shinken_apache.conf /etc/apache2/sites-available/shinken_apache.conf
RUN ln -sf /etc/apache2/sites-available/shinken_apache.conf /etc/apache2/sites-enabled/shinken_apache.conf
RUN ln -sf /etc/apache2/mods-available/proxy* /etc/apache2/mods-enabled/
RUN ln -sf /etc/apache2/mods-available/slotmem_shm.load /etc/apache2/mods-enabled/
RUN ln -sf /etc/apache2/mods-available/xml2enc.load /etc/apache2/mods-enabled/
# Configure Shinken modules
ADD shinken/shinken.cfg /etc/shinken/shinken.cfg
ADD shinken/broker-master.cfg /etc/shinken/brokers/broker-master.cfg
ADD shinken/poller-master.cfg /etc/shinken/pollers/poller-master.cfg
ADD shinken/scheduler-master.cfg /etc/shinken/schedulers/scheduler-master.cfg
COPY shinken/webui2.cfg /etc/shinken/modules/webui2.cfg
COPY shinken/webui2_worldmap.cfg /var/lib/shinken/modules/webui2/plugins/worldmap/plugin.cfg
ADD shinken/livestatus.cfg /etc/shinken/modules/livestatus.cfg
ADD shinken/graphite.cfg /etc/shinken/modules/graphite.cfg
ADD shinken/ui-graphite.cfg /etc/shinken/modules/ui-graphite.cfg
RUN mkdir -p /etc/shinken/custom_configs /usr/local/custom_plugins && \
ln -sf /etc/shinken/custom_configs/htpasswd.users /etc/shinken/htpasswd.users && \
rm -f /etc/thruk/htpasswd && \
ln -sf /etc/shinken/htpasswd.users /etc/thruk/htpasswd && \
chown -R shinken:shinken /etc/shinken/
# Configure graphite
ADD graphite/carbon.conf /opt/graphite/conf/
ADD graphite/storage-schemas.conf /opt/graphite/conf/
ADD graphite/storage-aggregation.conf /opt/graphite/conf/
ADD graphite/local_settings.py /opt/graphite/webapp/graphite/local_settings.py
RUN mkdir -p /var/log/graphite && \
cd /opt/graphite/webapp/graphite/ && \
python manage.py syncdb --noinput
# Add shinken config watcher to restart arbiter, when changes happen
ADD shinken/watch_shinken_config.sh /usr/bin/watch_shinken_config.sh
RUN chmod 755 /usr/bin/watch_shinken_config.sh
# Copy extra NRPE plugins and fix permissions
ADD extra_plugins/* /usr/lib/nagios/plugins/
RUN cd /usr/lib/nagios/plugins/ && \
chmod a+x * && \
chmod u+s check_apt restart_service check_ping check_icmp check_fping apt_update
# Define mountable directories
VOLUME ["/etc/shinken/custom_configs", "/usr/local/custom_plugins"]
# configure supervisor
ADD supervisor/conf.d/* /etc/supervisor/conf.d/
# Expost port 80 (apache2)
EXPOSE 80
# Default docker process
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf", "-n"]
from docker_shinken.
Related Issues (20)
- Dockerfile has issues with check_fping
- CRIT reaped unknown pid
- default user/password in README do not work HOT 2
- Instructions for setting up webservice HOT 2
- Monitoring Windows Machines
- Please update webui to webui2 interface HOT 4
- Use smaller base image HOT 3
- Enabling ConfigTool
- service packs HOT 4
- pip install fails
- sending mail HOT 1
- guide for Play with Docker
- graphs not available
- Shinken alwasy redirects to port 80 HOT 3
- How to set up Apache proxy
- How to run individual containers for scaling.? HOT 1
- not able to login as admin/admin HOT 2
- Shinken docker SSL handshake issue - Remote host HOT 9
- /var/log or /var/log/shinken should be a docker volume HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker_shinken.