Menu

Passive check w/ RUNSCRIPT Error

Help
ely
2007-03-12
2013-04-25
  • ely

    ely - 2007-03-12

    Hello,

    active check w/ check_nt works fine, on the other hand passive check with script result of no output:

    passive.cfg is configured with this:

       101 ScriptVBS_Passive    -l     vb1.bat

    result in the passive.log:

       Error Check_output is NULL: 101    ScriptVBS_Passive    -l    vb1.bat

    my question pls:

    1/  101 ScriptVBS_Passive    -d    ;   -l     vb1.bat
       the delimiter -d is ; -> not working

       What format should be sent to Nagios as service, as delimiter <tab> is still    
       NOK, same line FORMAT(hostname TAB servicename TAB returncode TAB output)

       The vb1.bat sent info output in 1 line separated by either TAB or ; (FORMAT)

    Thanks

    Thanks

     
    • tony

      tony - 2007-03-12

      Just to clearify,

      1) you are able to get other (nonscript) passive checks working with nagios.
      if not, then first get that running.

      2) if I remember correct the passive.cfg only allows TAB delimiter.
      the output it expecting from your script is a) return code, B) raw output.

      The passive check in NC_NEt takes care of the Send_NSCA, all you need to do, is have a script that works as an active check from check_nt/check_nc_Net.  the script should provide Standard Output and A return Code.  the Startup.cfg needs to have the Passive check Configuration setup in it.  this includes the Name of the Host and the IP of the NSCA server.
      you can use the check_nc_net/check_nt to configure the Passive.cfg file.  see the check_nt --Help for these directions but I think it is the -S parameter.  This is the easiest way to get a Passive check entered provided the passive checks are already working on the host.

      Also somtimes the firewalls need to be set on the Windows host to allow the Passive check Port.

      Please follow up, by emailing nc_net@montitech.com if problems persist, or if you resolve the issue follow up here with the resolution, 

      THank you
      Tony

       
    • ely

      ely - 2007-03-13

      [ROOT@Ely:/nagios/libexec] (74) # ./check_nt -H SRV -v RUNSCRIPT -l test1.bat
      1 data packet(s) sent to host successfully.
      [ROOT@Ely:/nagios/libexec] (75) # ./check_nt -H SRV -v RUNSCRIPT -l test1.bat -S Services
      ADDPASSIVE Failed: Testing passive check did not complete
      [ROOT@Ely:/nagios/libexec] (76) #

       
      • tony

        tony - 2007-03-13

        Thank you for the update,

        This issue looks like it is due to the RUNSCRIPTS not being HArdCoded into the Passive check section of the source code.
        THe Passive checks as a security measure did not allow for a catch all case.  however this also prohibited this command from running. and it may prohibit others as well.
        THis issue will be addressed in the next version of NC_net.  I am thinking on compromising the security consern for Functuality by adding a Catch All to the passive checks that just redirects the command to the active check version and then returns the result as a passive check.  This should not pose any seriouse conserns, if anyone has an opinion on this please either email NC_Net@montitech.com or reply to this post. 

        Thank you,
        tony

         
    • ely

      ely - 2007-03-14

      I've check the NC_Net.cs code and seems that -S works from 1 to 14 and 21 and 22 , number of passive check.

      Any thing i can help ?

       
      • tony

        tony - 2007-03-14

        I started modifying the source code with the updates for this issue as well as other issues.

        I should be done with the code modification today/tomorrow, but the documentation will need a few more days on top of that at least.  this is mostly due to new commands entered.
        This does not include the testing, but the testing will be brief since the Majority of the code was testing in a different project.

        Updates include:
        moving the event log reporting to a seperate thread
        modificaiton of the Socket communication
        overhaul check_eventlog
        ability to run scripts as asyncronis or syncronized
        (asyncronis allows for scripttimout  syncronized does not)
        added NC_NEt command timout that will kill the command if completion too long
        added sample timmer to the performance counter check, (default about 10 ms ) some counters report drastically different values based ont he time between samples.
        modified the password functionallity, no longer listed in Start Event and stored in a file.
        updateable from an active check.
        Added BATCH command processing. this allows for issuing several NC_NEt commands from a file.
        fixed the passive checks to have a catchall to allow for running any commadn via passive check.
        added inproved WMI querry
        added an echo command
        updated verison number to 4.x

        and I sure there are more improvements that I am forgetting

        Tony

         
    • ely

      ely - 2007-03-15

      Great ! waiting for these nice updates :) Thank you very much for .
      Ely.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.