Giter VIP home page Giter VIP logo

docker_shinken's People

Contributors

jangeador avatar lynchc avatar orabig avatar rohit01 avatar romuaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker_shinken's Issues

pip install fails

Running docker-compose up in shinken_thruk_graphite returns the following error:

Step 4/35 : 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
 ---> Running in fe2e3ade3cf4
ERROR: Service 'shinken' failed to build: The command '/bin/sh -c 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' returned a non-zero code: 1

There appears to be some issue with pip:

  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement shinken

The only way I could get this to build was by adding --index-url=https://pypi.python.org/simple/ to the pip install commands and removing the pip arrow package install.
Dockerfile looks like this:

# Shinken Docker installation using pip (latest)
FROM        debian:wheezy
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
RUN         pip install --index-url=https://pypi.python.org/simple/ shinken pymongo>=3.0.3 requests bottle==0.12.8
RUN         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 --index-url=https://pypi.python.org/simple/ Twisted==11.1.0 \
                flup==1.0.2 \
                django==1.5.10 \
                django-tagging==0.3.2 \
                https://github.com/graphite-project/ceres/tarball/master \
                whisper==0.9.12 \
                carbon==0.9.12 \
                graphite-web==0.9.12 \
                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 wheezy 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/conf.d/shinken_apache.conf
RUN         ln -sf /etc/apache2/mods-available/proxy* /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"]

Enabling ConfigTool

Hey,

have you ever tried to enable the config tool, to allow editing the config from thruk frontend?

Currently trying, but struggling with some issues.

Regards,
Dennis.

Shinken alwasy redirects to port 80

I have installed the docker image in a Synology NAS. I tried manual and automatic port mapping (set in the docker UI interface of the NAS). I can reach the shinken webui using http://ip:port/user/login, but after inputting credentials and clicking on login, i am redirected to an url without the port and therefor can not reach anything beyond the login page. going directly to http://ip:port/ will also redirect to url without port.

can i edit the configs somewhere to make shinken webui run on a specified port or use an env variable?

Monitoring Windows Machines

In order to monitor windows machines there are some packages missing. The following packages need to be installed in order for the windows pack monitor to work:

libconfig-inifiles-perl
libdatetime-perl
libnumber-format-perl
libscalar-list-utils-perl

And to install the monitoring pack in the appropriate section of Dockerfile:

su - shinken -c 'shinken install windows'

Use smaller base image

Hey,

I was just about to try this out (I still will), and I noticed the use of the debian base image. Would it be possible to utilize a smaller image?

I could foresee a number of issues, such as monitoring using standard utilities (curl, wget, ping, openssl), but I hope it would be kind of simple :).

Mike.

CRIT reaped unknown pid

Nothing is reachable on localhost, here are the logs

docker logs 15552a2f76d8
2015-12-27 16:28:56,211 CRIT Supervisor running as root (no user in config file)
2015-12-27 16:28:56,211 WARN Included extra file "/etc/supervisor/conf.d/shinken-scheduler.conf" during parsing
2015-12-27 16:28:56,211 WARN Included extra file "/etc/supervisor/conf.d/watch_shinken_config.conf" during parsing
2015-12-27 16:28:56,211 WARN Included extra file "/etc/supervisor/conf.d/shinken-broker.conf" during parsing
2015-12-27 16:28:56,211 WARN Included extra file "/etc/supervisor/conf.d/ntpd.conf" during parsing
2015-12-27 16:28:56,211 WARN Included extra file "/etc/supervisor/conf.d/shinken-reactionner.conf" during parsing
2015-12-27 16:28:56,212 WARN Included extra file "/etc/supervisor/conf.d/shinken-arbiter.conf" during parsing
2015-12-27 16:28:56,212 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing
2015-12-27 16:28:56,212 WARN Included extra file "/etc/supervisor/conf.d/shinken-receiver.conf" during parsing
2015-12-27 16:28:56,212 WARN Included extra file "/etc/supervisor/conf.d/shinken-poller.conf" during parsing
2015-12-27 16:28:56,236 INFO RPC interface 'supervisor' initialized
2015-12-27 16:28:56,236 WARN cElementTree not installed, using slower XML parser for XML-RPC
2015-12-27 16:28:56,236 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2015-12-27 16:28:56,236 INFO supervisord started with pid 1
2015-12-27 16:28:57,239 INFO spawned: 'ntpd' with pid 6
2015-12-27 16:28:57,240 INFO spawned: 'shinken-receiver' with pid 7
2015-12-27 16:28:57,242 INFO spawned: 'shinken-reactionner' with pid 8
2015-12-27 16:28:57,249 INFO spawned: 'nginx' with pid 9
2015-12-27 16:28:57,259 INFO spawned: 'shinken-poller' with pid 10
2015-12-27 16:28:57,272 INFO spawned: 'shinken-arbiter' with pid 11
2015-12-27 16:28:57,281 INFO spawned: 'watch_shinken_config' with pid 12
2015-12-27 16:28:57,283 INFO spawned: 'shinken-scheduler' with pid 13
2015-12-27 16:28:57,292 INFO spawned: 'shinken-broker' with pid 15
2015-12-27 16:28:58,344 INFO success: ntpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-12-27 16:28:58,344 INFO success: shinken-receiver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-12-27 16:28:58,344 INFO success: shinken-reactionner entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-12-27 16:28:58,344 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-12-27 16:28:58,344 INFO success: shinken-poller entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-12-27 16:28:58,344 INFO success: shinken-arbiter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-12-27 16:28:58,344 INFO success: watch_shinken_config entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-12-27 16:28:58,344 INFO success: shinken-scheduler entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-12-27 16:28:58,344 INFO success: shinken-broker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-12-27 16:29:54,057 CRIT reaped unknown pid 142)

and from shinken (I've exported /var/log/shinken too)
reactionnerd.log

[1451233738] INFO: [Shinken] Shinken 2.4
[1451233738] INFO: [Shinken] Copyright (c) 2009-2014:
[1451233738] INFO: [Shinken] Gabes Jean ([email protected])
[1451233738] INFO: [Shinken] Gerhard Lausser, [email protected]
[1451233738] INFO: [Shinken] Gregory Starck, [email protected]
[1451233738] INFO: [Shinken] Hartmut Goebel, [email protected]
[1451233738] INFO: [Shinken] License: AGPL
[1451233738] INFO: [Shinken] Trying to initialize additional groups for the daemon
[1451233738] WARNING: [Shinken] Cannot call the additional groups setting with initgroups (Operation not permitted)
[1451233738] INFO: [Shinken] Stale pidfile exists at invalid literal for int() with base 10: '' (/var/run/shinken/reactionnerd.pid). Reusing it.
[1451233738] INFO: [Shinken] Opening HTTP socket at http://0.0.0.0:7769
[1451233738] INFO: [Shinken] Initializing a CherryPy backend with 8 threads
[1451233738] INFO: [Shinken] Using the local log file '/var/log/shinken/reactionnerd.log'
[1451233739] INFO: [Shinken] Starting HTTP daemon
[1451233739] INFO: [Shinken] Modules directory: /var/lib/shinken/modules
[1451233739] INFO: [Shinken] Modules directory: /var/lib/shinken/modules
[1451233739] INFO: [Shinken] Waiting for initial configuration
[1451233741] INFO: [Shinken] [reactionner-master] Init connection with scheduler-master at http://localhost:7768/ (3s,120s)
[1451233741] INFO: [Shinken] [reactionner-master] Connection OK with scheduler scheduler-master
[1451233741] INFO: [Shinken] [reactionner-master] Using max workers: 15
[1451233741] INFO: [Shinken] [reactionner-master] Using min workers: 1
[1451233741] INFO: [Shinken] We have our schedulers: {0: {'wait_homerun': {}, 'data_timeout': 120, 'name': u'scheduler-master', 'hard_ssl_name_check': False, 'uri': u'http://localhost:7768/', 'actions': {}, 'instance_id': 0, 'running_id': 1451233737.7663794, 'timeout': 3, 'address': u'localhost', 'active': True, 'use_ssl': False, 'push_flavor': 955504, 'port': 7768, 'con': <shinken.http_client.HTTPClient object at 0x2782990>}}
[1451233741] WARNING: [Shinken] Cannot import pickle-retention-file-scheduler..module : 'module' object has no attribute 'objects'
[1451233741] WARNING: [Shinken] Trying to load '/var/lib/shinken/modules/pickle-retention-file-scheduler' as an (very-)old-style shinken "module" : by adding its path to sys.path. This can be (very) bad in case of name conflicts within the files part of /var/lib/shinken/modules/pickle-retention-file-scheduler and others top-level python modules; I'll try to limit that.
[1451233741] ERROR: [Shinken] Could not import bare 'module.py' from /var/lib/shinken/modules/pickle-retention-file-scheduler : 'module' object has no attribute 'objects'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/shinken/modulesmanager.py", line 114, in try_very_bad_load
    return importlib.import_module('module')
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/var/lib/shinken/modules/pickle-retention-file-scheduler/module.py", line 38, in <module>
    shinken.objects.command.CommandCall = CommandCall
AttributeError: 'module' object has no attribute 'objects'
[1451233741] INFO: [Shinken] Correctly loaded auth-htpasswd as an old-new-style shinken module :|
[1451233741] INFO: [Shinken] Correctly loaded booster-nrpe as an old-new-style shinken module :|
[1451233741] INFO: [Shinken] Correctly loaded webui as an old-new-style shinken module :|
[1451233741] INFO: [Shinken] Correctly loaded sqlitedb as an old-new-style shinken module :|
[1451233741] INFO: [Shinken] Correctly loaded dummy_broker_external as an old-new-style shinken module :|
[1451233741] INFO: [Shinken] Correctly loaded dummy_arbiter as an old-new-style shinken module :|
[1451233741] INFO: [Shinken] Correctly loaded dummy_poller as an old-new-style shinken module :|
[1451233741] INFO: [Shinken] Correctly loaded dummy_broker as an old-new-style shinken module :|
[1451233741] INFO: [Shinken] Correctly loaded dummy_scheduler as an old-new-style shinken module :|
[1451233741] INFO: [Shinken] I correctly loaded the modules: []
[1451233742] INFO: [Shinken] [reactionner-master] Allocating new fork Worker: 0

pollerd.log

[1451233738] INFO: [Shinken] Shinken 2.4
[1451233738] INFO: [Shinken] Copyright (c) 2009-2014:
[1451233738] INFO: [Shinken] Gabes Jean ([email protected])
[1451233738] INFO: [Shinken] Gerhard Lausser, [email protected]
[1451233738] INFO: [Shinken] Gregory Starck, [email protected]
[1451233738] INFO: [Shinken] Hartmut Goebel, [email protected]
[1451233738] INFO: [Shinken] License: AGPL
[1451233738] INFO: [Shinken] Trying to initialize additional groups for the daemon
[1451233738] WARNING: [Shinken] Cannot call the additional groups setting with initgroups (Operation not permitted)
[1451233738] INFO: [Shinken] Stale pidfile exists at invalid literal for int() with base 10: '' (/var/run/shinken/pollerd.pid). Reusing it.
[1451233738] INFO: [Shinken] Opening HTTP socket at http://0.0.0.0:7771
[1451233738] INFO: [Shinken] Initializing a CherryPy backend with 8 threads
[1451233738] INFO: [Shinken] Using the local log file '/var/log/shinken/pollerd.log'
[1451233738] INFO: [Shinken] Starting HTTP daemon
[1451233739] INFO: [Shinken] Modules directory: /var/lib/shinken/modules
[1451233739] INFO: [Shinken] Modules directory: /var/lib/shinken/modules
[1451233739] INFO: [Shinken] Waiting for initial configuration
[1451233742] INFO: [Shinken] [poller-master] Init connection with scheduler-master at http://localhost:7768/ (3s,120s)
[1451233742] INFO: [Shinken] [poller-master] Connection OK with scheduler scheduler-master
[1451233742] INFO: [Shinken] [poller-master] Using max workers: 1
[1451233742] INFO: [Shinken] [poller-master] Using min workers: 1
[1451233742] INFO: [Shinken] We have our schedulers: {0: {'wait_homerun': {}, 'data_timeout': 120, 'name': u'scheduler-master', 'hard_ssl_name_check': False, 'uri': u'http://localhost:7768/', 'actions': {}, 'instance_id': 0, 'running_id': 1451233737.7663794, 'timeout': 3, 'address': u'localhost', 'active': True, 'use_ssl': False, 'push_flavor': 955504, 'port': 7768, 'con': <shinken.http_client.HTTPClient object at 0x109e950>}}
[1451233742] INFO: [Shinken] [poller-master] Got module: nrpe_poller 
[1451233742] INFO: [Shinken] Correctly loaded pickle-retention-file-scheduler as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] Correctly loaded auth-htpasswd as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] Correctly loaded booster-nrpe as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] Correctly loaded webui as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] Correctly loaded sqlitedb as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] Correctly loaded dummy_broker_external as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] Correctly loaded dummy_arbiter as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] Correctly loaded dummy_poller as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] Correctly loaded dummy_broker as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] Correctly loaded dummy_scheduler as an old-new-style shinken module :|
[1451233742] INFO: [Shinken] [NRPEPoller] Get a nrpe poller module for plugin booster-nrpe
[1451233742] INFO: [Shinken] Trying to init module: booster-nrpe
[1451233742] INFO: [Shinken] [NRPEPoller] Initialization of the nrpe poller module
[1451233742] INFO: [Shinken] I correctly loaded the modules: [booster-nrpe]
[1451233743] INFO: [Shinken] [poller-master] Allocating new fork Worker: 0
[1451233743] INFO: [Shinken] [poller-master] Allocating new nrpe_poller Worker: 1
[1451233743] INFO: [Shinken] [NRPEPoller] Module started!
[1451234010] ERROR: [Shinken] Fail launching command: /usr/lib/nagios/plugins/check_memory -w 90 -c 95 [Errno 8] Exec format error False

not able to login as admin/admin

Hi Rohit,

I used the default login seems like not able to login to shinken UI
the htpasswd.user is as below

Apache/Nginx htpasswd file for Basic Authentication

The passwords can be managed in this file using the apache utililty: htpasswd

Installation:

sudo apt-get install apache2-utils

Use:

htpasswd -c htpasswd.users

Default:

Username: admin

Password: admin

admin:$apr1$xvoEHgxj$QZ5pR9Y565MagnqJy3ZJx1
~
Thanks
phulei

Shinken docker SSL handshake issue - Remote host

Hi all,

I have Shinken inside docker container running on a host. Then I have remote hosts where I have NRPE installed. They are not on the same machine. Docker IP address is 172.17.0.27 and then I installed the following packages on the remote host:
apt-get install openssl nagios-nrpe-server nagios-plugins nagios-plugins-basic nagios-plugins-standard
But when I run the check_nrpe command from inside the Shinken docker container, I get the SSL handshake error:

root@containerID:/usr/lib/nagios/plugins# ./check_nrpe -H 10.154.20.52
CHECK_NRPE: Error - Could not complete SSL handshake.

I changed the followings on my remote host is the allowed_hosts:
allowed_hosts=127.0.0.1,172.17.0.27
sudo echo 'dont_blame_nrpe=1' >> /etc/nagios/nrpe_local.cfg
Then rebooted the service: sudo service nagios-nrpe-server restart

Can someone please let me know what I did wrong?

Thanks

How to set up Apache proxy

Hi there!
Everything is working fine except that I'm unable to set up an Apache proxy.
I would like to do so to be able to put a ssl certificate on Shinken webui.
I've tried to change the apache original file or even add virtual host but still having troubles.

Virtualhost looked something like this:

`
ServerName shinken.tld

    ProxyRequests Off
    ProxyPreserveHost On
    ProxyVia On

    <Proxy *>
    Order allow,deny
    Allow from all
    </Proxy>

    ProxyPass / http://shinkenIP:8082/
    ProxyPassReverse / http://shinkenIP:8082/
    RewriteEngine on
    RewriteRule /webui[/]?$ /webui/dashboard/ [R=permanent]

    CustomLog ${APACHE_LOG_DIR}/access_shinken.log combined
    ErrorLog ${APACHE_LOG_DIR}/error_shinken.log

    SSLEngine on
    SSLCertificateFile path/to/certfile
    SSLCertificateKeyFile path/to/keyfile
    ProxyRequests On
    ProxyPreserveHost Off

`

Any idea ?

How to run individual containers for scaling.?

In this repository I could see that all shinken components have been bundled in to one image..., I have a use case where I need to run individual containers and scale them separately.

Is it possible with this repository ...?

FROM debian:jessie

Would it be possible to have this image deriving from debian:jessie and not debian:wheezy ?

default user/password in README do not work

followed exact instructions to run thrunk/graphite image, and default logins don't work for shinken webui or thruk....
tried admin/admin and passwords listed in htpasswd.users, no luck.

Monitoring remote host with nrpe

Hi,

I don't understand how I can monitor some remote host with nrpe. I have tried many things, but nothing seems to work for me. Note that I'm a beginner on Shinken or Nagios, sorry if the question is basic.

I created a file containing my remote host config in custom_configs/miscellaneous/my-remote-host.cfg :

define host {
    host_name            my-remote-host.com
    use                        generic-host
    alias                      my-remote-host.com
    address                 my-remote-host.com
}

But I don't know how I can define my services to be able to work with nrpe.

I tried something like this (with many variants)

define service {
    use             generic-service
    host_name           my-remote-host.com
    service_description     TEST REMOTE
    check_command            check_nrpe!check_load
}

But I have a not found error. check_nrpe is missing, and after search, it seems to be normal, I should use booster-nrpe instead.

Ok, so, I tried somethings like this :

define module{
     module_name       booster-nrpe
     module_type       nrpe_poller
}
define command {
   command_name   check_nrpe
   command_line  $NAGIOSPLUGINSDIR$/check_nrpe -H $HOSTADRESS$ -c $ARG1$ -a $ARG2$
   module_type    nrpe_poller
}

Source

But I have the same error. (Maybe I don't write these lines at the right location ?)

Am I missing something ?

Thanks.

sending mail

Hello,

It seems that out of the box it doesn't send emails. I have been fiddling for a while looking for a solution that works and can't seem to find anything.

Are you able to put together an example of how you get it to send email?

I added this to Dockerfile:

FROM rohit01/shinken_thruk_graphite:latest

# Install mail requirements
RUN apt-get update
RUN apt-get install -y ssmtp mailutils

# Cleanup
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Then added to config:

define command {
    command_name    notify-host-by-gmail
    command_line    echo "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nDate/Time: $LONGDATETIME$" | /usr/bin/mail -s "** Nagios $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **"
}

define command {
    command_name    notify-service-by-gmail
    command_line    echo "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nDate/Time: $LONGDATETIME$\nAdditional Info: $SERVICEOUTPUT$" | /usr/bin/mail -s "** Nagios $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
}

define notificationway {
    notificationway_name            gmail
    service_notification_period     24x7
    host_notification_period        24x7
    service_notification_options    w,u,c,r,f
    host_notification_options       d,u,r,f,s
    service_notification_commands   notify-service-by-gmail
    host_notification_commands      notify-host-by-gmail
    min_business_impact             1
}

define contact {
    use                             generic-contact
    contact_name                    me
    alias                           Me
    email                           [email protected]
    notificationways                gmail
}

I'm not sure how to check what's wrong, but I'm not getting emails.

I get an email if I do this:

docker-compose exec shinken bash
echo "Hello World" | mail -s "Test Email" [email protected]

Dockerfile has issues with check_fping

extra_plugins dir does not contain the check_fping plugin, and fails on this line:

          chmod u+s check_apt restart_service check_ping check_icmp check_fping apt_update

service packs

How would one go about setting up additional services like exchange, dc, windows etc

graphs not available

Hello,

Graphs: http://localhost/service/docker_shinken/http_port_7770#graphs. Available only on shinken_thruk_graphite image.

I can't seem to get this tab. It's just not there.

to reproduce:

  1. goto https://labs.play-with-docker.com/ and start new instance

  2. get shinken_thruk_graphite definition:

curl -Lo docker-compose.yml https://gist.github.com/cornernote/695cc633680df7b5ccfd02ffa6dd5ab0/raw/ab8f36617a636212692cfe4d93b27b5ed873823d/shinken_thruk_graphite.docker-compose.yml
  1. get docker_shinken config:
mkdir configs
curl -Lo configs/docker_shinken.cfg https://gist.github.com/cornernote/695cc633680df7b5ccfd02ffa6dd5ab0/raw/ab8f36617a636212692cfe4d93b27b5ed873823d/docker_shinken.cfg
  1. Start the stack
docker-compose up -d
  1. Now click the port next to the IP address, and you will be taken to the interface, then goto

http://EXAMPLE.play-with-docker.com/service/docker_shinken/http_port_7770#graphs

The tab is not there:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.