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

Thread: NSCA check

  1. #1

    NSCA check

    hello ;

    I've tried to enable nsca passive check.

    Server Side :
    NSCA is set with encryption_method 0
    I've "modules NSCA" on "arbiter" ; shinken-specific.cfg
    i've put on nagios.cfg :
    Code:
    accept_passive_service_checks=1
    accept_passive_host_checks=1
    template for passive-service :
    Code:
    #This one is a real one
    define service{
        name              passive-service         
        use               generic-service     
        passive_checks_enabled     1            
        active_checks_enabled      0           
        max_check_attempts       4            
        normal_check_interval      10          
        retry_check_interval      1            
        register            0            ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        }
    config file of the passive service :
    Code:
    define service {
     service_description  Disk_Space
     use  passive-service
     check_command  check_null
     host_name dom0
    }

    Client side:
    using send_nsca with commands like :
    Code:
    printf "host1\tDisk_Space\t0\ttest shinken\n" | /usr/sbin/send_nsca -H shinken -c /etc/send_nsca.cfg
    in send_nsca.conf ; encryption_method=0

    output of the send_nsca command :
    Code:
    1 data packet(s) sent to host successfully.
    and I almost forgot to say that in the nagios.log ; I've got
    Code:
    nagios.log:[1308211513] Starting external process for instance NSCA
    nagios.log:[1308211513] NSCA is now started ; pid=18847
    nagios.log:[1308211562] Error : the external module NSCA goes down unexpectly!
    nagios.log:[1308211562] Setting the module NSCA to restart
    nagios.log:[1308211562] Starting external process for instance NSCA
    nagios.log:[1308211562] NSCA is now started ; pid=18858
    nagios.log:[1308211569] Error : the external module NSCA goes down unexpectly!
    thanks in advance

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

    Re: NSCA check

    Hi,

    Can you launch the arbiter in debug mode? (/etc/init.d/shinken-arbiter -d stop/start)

    From now not all external modules are reporting the error when dying. It will be solved in a near future ;D


    Nap
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3

    Re: NSCA check

    I've put the arbiter-debug.log as attached item.

    after a quick look; it seems that the error is coming from python multiprocessing.

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

    Re: NSCA check

    Ok, got it. It's a known bug for 0.6 version for the nsca module. You can update to the 0.6.4 (should be ok with this one) or just edit the /usr/local/lib/python2.6/dist-packages/shinken/modules/nsca.py file and change "partition" by "split" calls.


    Jean
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5

    Re: NSCA check

    Yes thanks, I was already using shinken 0.6.4 ; so I've modify the file, and it's ok :-) thanks for the help

  6. #6

    Re: NSCA check

    hum ; after the split / partition change, if I restart shinken-arbiter ; i get
    Code:
    FAILED: shinken.pyro_wrapper.PortNotFree: Sorry, the port 7770 is not free: Couldn't start Pyro daemon: [Errno 98] Address already in use (full output is in /tmp/bad_start_for_arbiter) ... failed!
     failed!

  7. #7
    Administrator
    Join Date
    Jun 2011
    Posts
    216

    Re: NSCA check

    Hi!

    Sometimes Shinken's process are "duplicated". Try to stop Shinken and kill all process relative to Shinken manually if there are still some

    A simple (with sudo if needed) :

    Code:
    /etc/init.d/shinken stop
    ps aux | grep shinken*
    kill <pidofarbiter>
    will fix it .

  8. #8

    Re: NSCA check

    Yes , thanks , I know .
    But the problem occur since I've edit the /usr/local/lib/python2.6/dist-packages/shinken/modules/nsca.py file and change "partition" by "split" calls; and that's the only way for now to get passive-check working.


    EDIT : need to modify only service = service_dirty.partition("\0", 1)[0] by service = service_dirty.split("\0", 1)[0]
    and everything goes well

  9. #9
    Administrator
    Join Date
    Jun 2011
    Posts
    216

    Re: NSCA check

    Hum.

    It's strange, my path to nsca.py (/usr/lib/python2.5/site-packages/shinken/modules/nsca.py) is not the same as yours.
    And in my nsca file, all call are already done with "split" . I've the 0.6.4 too ???


    EDIT : Ok, it's solved (Those differences are still strange)

  10. #10

    Re: NSCA check

    Maybe the script of nicolargo isn't working that well.
    I've change back to all "split" and it works. but only at the begining, I guest it's when NSCA isn't started yet.

    see the attached file.

Posting Permissions

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