Results 1 to 2 of 2

Thread: Services remain in "pending" state after a fresh and simple installation

  1. #1
    Junior Member
    Join Date
    Jun 2015
    Posts
    2

    Services remain in "pending" state after a fresh and simple installation

    Greetings to all,
    I'm currently testing Shinken on a Docker environment to get used to it before deploying it into production, but I'm facing an issue: every checks remain in "Pending" state.
    ShinkenWebUI.jpg

    My test environment is very basic and simple, composed of:
    - the shinken server (version 2.4)
    - a test server to be monitored (thru SNMP)

    Here is my Shinken's Docker container

    Code:
    FROM debian:jessie
    
    RUN adduser --system shinken && addgroup --system shinken && adduser shinken shinken
    # dependencies
    RUN apt-get install -y python-cherrypy3 python-pip python-pycurl python-crypto
    RUN apt-get install -y gawk
    RUN wget https://bootstrap.pypa.io/ez_setup.py -O - | python
    
    # installing Shinken
    RUN pip install shinken
    RUN apt-get install -y nagios-plugins
    # Shinken modules
    RUN shinken --init
    RUN shinken install webui
    RUN shinken install auth-cfg-password
    RUN shinken install sqlitedb
    RUN shinken install linux-snmp
    # configuration
    COPY shinken.cfg /etc/shinken/
    COPY broker-master.cfg /etc/shinken/brokers/
    COPY modules/webui.cfg /etc/shinken/modules/
    COPY resources/snmp.cfg /etc/shinken/resource.d/
    # host
    RUN rm /etc/shinken/hosts/localhost.cfg /etc/shinken/services/services.cfg
    COPY hosts/test.cfg /etc/shinken/hosts/
    # rights
    RUN chmod -R 755 /var/lib/shinken/libexec/
    RUN chown -R shinken:shinken /etc/shinken/
    RUN chown -R shinken:shinken /var/lib/shinken/
    My test server container embed a single service: SNMPd

    My configuration files are very basic (I don't recall having changed the /etc/shinken/shinken.cfg file):

    Code:
    root@shinken:/home# cat /etc/shinken/hosts/test.cfg 
    define host{
            use linux-snmp
            contact_groups admins
            host_name test
            address test
            business_impact 1
    }
    
    root@shinken:/home# cat /etc/shinken/resource.d/snmp.cfg 
    # default snmp community
    $SNMPCOMMUNITYREAD$=public
    I was able to test that SNMP is running fine on the test server:

    Code:
    root@shinken:/home# /usr/lib/nagios/plugins/check_snmp -H test -o .1.3.6.1.2.1.1.3.0  -C public
    SNMP OK - Timeticks: (6935) 0:01:09.35 |
    Also when I force the check thru the WebUI interface, I do see the command passing in the log but that's all, nothing more was found in the logs.

    Code:
    shinken_1 | [1434100788] EXTERNAL COMMAND: [1434100779] SCHEDULE_FORCED_HOST_CHECK;test;1434100779
    shinken_1 | [1434100788] DEBUG: [Shinken] mode= dispatcher, global= False
    shinken_1 | [1434100788] DEBUG: [Shinken] Searching for a new arg: test (1)
    shinken_1 | [1434100788] DEBUG: [Shinken] For command arg: test
    shinken_1 | [1434100788] DEBUG: [Shinken] Calling search_host_and_dispatch for test
    shinken_1 | [1434100788] DEBUG: [Shinken] Host test found in a configuration
    shinken_1 | [1434100788] DEBUG: [Shinken] Sending command to the scheduler scheduler-master
    shinken_1 | [1434100788] DEBUG: [Shinken] Sending 3 commands to scheduler scheduler-master
    shinken_1 | [1434100788] DEBUG: [Shinken] [SchedulerLink] Sending 3 commands
    shinken_1 | [1434100788] DEBUG: [Shinken] Posting to http://localhost:7768/run_external_commands: 87B
    shinken_1 | [1434100789] DEBUG: [Shinken] Posting to http://localhost:7772/push_broks: 269B
    shinken_1 | [1434100790] DEBUG: [Shinken] Posting to http://localhost:7772/push_broks: 14B
    shinken_1 | [1434100791] DEBUG: [Shinken] Posting to http://localhost:7772/push_broks: 14B
    shinken_1 | [1434100792] DEBUG: [Shinken] Posting to http://localhost:7772/push_broks: 14B
    Some help would be appreciated
    Thanks a lot !

  2. #2
    Junior Member
    Join Date
    Jun 2015
    Posts
    2

    Post Adding docker environment

    Hello everybody,

    I still wasn't able to find the source of this issue, I check the config and everything looks good to me.
    I created a zip containing everything to create my environment (Dockerfiles and config) if you guys want to give a try:
    Download: shinken.zip

    Here is a little how to:
    - unzip the folder
    - launch
    Code:
    ./create_images.sh
    to trigger docker images creation
    - run
    Code:
    docker-compose up -d
    to launch the two images (shinken server and a test server)
    - To enter the shinken server
    Code:
    docker exec -t -i shink_shinken_1 /bin/bash
    The shinken webui/docker is configured to listen on port 80 so you can access the webui at http://localhost

    Thanks for your help
    Last edited by Kanshi; 06-25-2015 at 10:27 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •