NSClient++ Help (#1) - NSCA Agent, No handler for command 'check_ok' (#174) - Message List

NSCA Agent, No handler for command 'check_ok'

I'm using the NSCA Agent and have defined a few commands like in the docu on this site. They run all nicely. But the host_check=check_ok brings an error on the client:

message:..\..\include\NSCHelper.cpp:223: No handler for command 'check_ok'

A few lines of my MSC.ini:

cpu_check=checkCPU warn=80 crit=90 time=20m time=10s time=4
host_check=check_ok
mem_check=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=physical

only check_ok doesn't work, neither

Any Ideas? Thanks, Chris

  • Message #480

    there is no check_ok in NSClient++ (maybe I should add one?)

    There is a CheckAlwaysOK but that is not what you are looking for (it merely wraps another check inside an "ok" result).

    You could add a script that always returns ok but I guess I should add a command to NSClient++ instead (since the overhead of forking for such would be pretty stupid)...

    MickeM

    • Message #481

      How would you implement a host_check (usually a ping on aktive checks)? Isn't CheckAlwaysOK fine for that, since nagios just needs some ok when the client sends the data for the services. Or did I missunderstood something?

      I thought the check_ok mentioned in http://www.nsclient.com/nscp/wiki/NSCAAgentis some sort of built in.

      chris-

      • Message #482

        I just tried scripts\ok.bat

        but got:

        d \NSClient++.cpp(516) Injecting: scripts\ok.bat: l \NSClient++.cpp(551) No handler for command: 'scripts\ok.bat' BAD_CODE:

        Is there a doc to describe how to inject a script?

        Thanks, Chris

        • Message #484

          you need to "tie" the script to a command using the ExternalScripts? module. lkike so:

          [modules]
          CheckExternalScripts.dll
          ...
          [External Scripts]
          check_es_ok=scripts\ok.bat
          ...
          
          • Message #485

            Ah, that was simple. Thanks for that.

            Chris-

      • Message #483

        I just tried scripts\ok.bat

        but got:

        d \NSClient++.cpp(516) Injecting: scripts\ok.bat: l \NSClient++.cpp(551) No handler for command: 'scripts\ok.bat' BAD_CODE:

        Is there a doc to describe how to inject a script?

        Thanks, Chris

Subscriptions