Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: NSCA passive cheks from a distant receiver

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    6

    NSCA passive cheks from a distant receiver

    Hi,

    I have the following setup:
    - one Shinken master
    - one Shinken poller installed in a different network which communicates with the Shinken master
    - on the same machine with the Shinken poller I have set up a receiver configured with module CommandFile, this way the passive checks received by the NSCA server are written into a fifo file, and the receiver access it through the CommandFile module. After that it will communicate the results to the Shinken master(scheduler daemon I think).
    Receiver config from the Shinken poller machine:
    define receiver{
    receiver_name receiver-1
    address localhost
    port 7773
    spare 0
    modules CommandFile
    timeout 3 ; 'ping' timeout
    data_timeout 120 ; 'data send' timeout
    max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
    check_interval 60 ; ping it every minute
    realm All
    }
    define module{
    module_name CommandFile
    module_type named_pipe
    command_file rw/nagios.cmd
    }
    Receiver config from the Shinken master machine:
    define receiver{
    receiver_name receiver-2
    address "IP of the distant receiver"
    port 7773
    }
    Now, the problem is that when I am starting the shinken-receiver from the distant machine I sow that it doesn't open any fifo file. I am starting only the shinken poller and receiver daemons, not all the daemons, I mean something like /etc/init.d/shinken-poller start; /etc/init.d/shinken-receiver start.
    Which might be the problem with the receiver, why it's not opening the fifo file ? Is it a correct setup up what I'm trying to do ?

  2. #2
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: NSCA passive cheks from a distant receiver

    So receiver2 is the receiver that don't open the nagios.cmd file? Is the module linked with this object? If ok, can you launch it as debug (/etc/init.d/shinken-receiver -d start).
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3
    Junior Member
    Join Date
    Mar 2012
    Posts
    6

    Re: NSCA passive cheks from a distant receiver

    Yes, receiver2(distant receiver) doesn't open the nagios.cmd file. Yes. Here's the log file(/var/log/shinken/receiver-debug.log) after starting in debug mode(no clue to the nagios.cmd file even it's defined as in first post):
    Shinken 1.0
    Copyright (c) 2009-2011 :
    Gabes Jean (naparuba@gmail.com)
    Gerhard Lausser, Gerhard.Lausser@consol.de
    Gregory Starck, g.starck@gmail.com
    Hartmut Goebel, h.goebel@goebel-consult.de
    License: AGPL
    [Receiver] Using working directory : /var/lib/shinken
    Info : Successfully changed to workdir: /var/lib/shinken
    Info : opening pid file: /var/run/shinken/receiverd.pid /var/run/shinken/receiverd.pid
    Warning : stale pidfile exists (pid=2312 not exists). Reusing it.
    Info : Initializing Pyro connection with host:0.0.0.0 port:7773 ssl:False
    Using the local log file '/var/log/shinken/receiverd.log'
    Info : Redirecting stdout and stderr as necessary..
    Info : We are now fully daemonized pid=2520
    modulemanager file /usr/local/lib/python2.7/dist-packages/shinken/modulesmanager.pyc
    modulemanager absolute file /usr/local/lib/python2.7/dist-packages/shinken/modulesmanager.pyc
    Using modules path : /usr/local/lib/python2.7/dist-packages/shinken/modules
    The Arbiter uri it at PYRO://0.0.0.0:7773/7f00010109d61f04dbecd64fca4f8abf4f
    Waiting for initial configuration

    In /var/log/shinken/receiverd.log I have:
    2012-03-20 16:55:41,234 [1332255341] Using the local log file '/var/log/shinken/receiverd.log'

    2012-03-20 16:55:41,336 [1332255341] Waiting for initial configuration

  4. #4
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: NSCA passive cheks from a distant receiver

    So this receiver object need to have it's own "modules" line to load them.

    But in the log we see that it is not going forward Waiting for initial configuration, and it's not good. It means that the arbiter is not sending it the conf.

    Can you look in the arbiterd.log what it is saying about this receiver object?
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5
    Junior Member
    Join Date
    Mar 2012
    Posts
    6

    Re: NSCA passive cheks from a distant receiver

    > So this receiver object need to have it's own "modules" line to load them.
    The distant receiver is configured like this, Is it good or bad ?
    define receiver{
    receiver_name receiver-1
    address localhost
    port 7773
    spare 0
    modules CommandFile
    timeout 3 ; 'ping' timeout
    data_timeout 120 ; 'data send' timeout
    max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
    check_interval 60 ; ping it every minute
    realm All
    }
    define module{
    module_name CommandFile
    module_type named_pipe
    command_file rw/nagios.cmd
    }

    After I start the arbiter on the Shinken master server it logs:
    2012-03-22 10:44:46,148 [1332413086] [All] Trying to send configuration to receiver receiver-2
    2012-03-22 10:44:46,149 [1332413086] [All] Dispatch OK of configuration to receiver receiver-2


    Also at that moment in the distant receiver log I see:
    2012-03-22 10:44:44,786 [1332413084] [receiver-2] [receiver-2] We received modules []
    2012-03-22 10:44:44,788 [1332413084] [receiver-2] Warning in importing module : No module named pymongo.connection
    2012-03-22 10:44:44,791 [1332413084] [receiver-2] Warning in importing module : No module named android
    2012-03-22 10:44:44,815 [1332413084] [receiver-2] Warning in importing module : No module named memcache
    2012-03-22 10:44:44,816 [1332413084] [receiver-2] Warning in importing module : No module named pymongo.connection
    2012-03-22 10:44:44,817 [1332413084] [receiver-2] Warning in importing module : No module named org.shinken_monitoring.tsca
    2012-03-22 10:44:44,818 [1332413084] [receiver-2] Warning in importing module : No module named ldap
    2012-03-22 10:44:44,826 [1332413084] [receiver-2] Warning in importing module : No module named pymongo
    2012-03-22 10:44:44,826 [1332413084] [receiver-2] Warning in importing module : No module named redis
    2012-03-22 10:44:44,847 [1332413084] [receiver-2] Warning in importing module : cannot import name out_map
    2012-03-22 10:44:44,849 [1332413084] [receiver-2] I correctly loaded the modules : []

    So the communication between the arbiter and the distant receiver works. The problem that I see is the distant receiver that doesn't open the nagios.cmd file to read from it.

  6. #6
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: NSCA passive cheks from a distant receiver

    I do'nt understand. This configuration is for receiver-1, not -2 ?
    No direct support by personal message. Please open a thread so everyone can see the solution

  7. #7
    Junior Member
    Join Date
    Mar 2012
    Posts
    6

    Re: NSCA passive cheks from a distant receiver

    I have draw an image

  8. #8
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: NSCA passive cheks from a distant receiver

    You mean you got 2 shinken-specific.cfg files? You should have only one version, and paste it near your arbiters (and only the arbiters).

    You receiver2 definition also need modules. without it it will be useless and won't open a file. So copy/paste the receiver1 objects, rename it 2 with the good IP, all in the same specific.cfg file. Then copy this file near all your arbiters (start with only one arbiter, and when all is ok, add a spare, will be easier to test/setup). Should be ok with this
    No direct support by personal message. Please open a thread so everyone can see the solution

  9. #9
    Junior Member
    Join Date
    Mar 2012
    Posts
    6

    Re: NSCA passive cheks from a distant receiver

    On the distant receiver host I have a poller which works as a poller_tag for the Shinken master host. By following the hints from your last post, there will be all the modules(arbiter,scheduler, poller, reactioner, broker, receiver) started on both Shinken master and distant receiver machines (also having the same config file shinken-specific.cfg)? Isn't this a problem for the the poller_tag ?

  10. #10
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: NSCA passive cheks from a distant receiver

    Not at all. Poller_tag is distinct from others daemon architecture
    No direct support by personal message. Please open a thread so everyone can see the solution

Posting Permissions

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