NSClient++ Help (#1) - check nrp for windows (#933) - Message List

check nrp for windows

Hi,

I would like to know, if a windows client exist to interrogate nsclient++ ? in another terme a check_nrpe for windows (standalone) without nagios

Thank you

  • Message #2461

    NSClient++ can act as both client and server so yes you can use NSClient++ for that as well...

    Michael Medin

    • Message #2468

      Hi Michael,

      I download the lastest version 0.4.0.148. But to do what i want, I dont know how I can do that

      Whow can I launch nscp.exe and ask at a host (which a nscp service sarted) a check cpu, for example checkCPU time=1s. In the documentation I can't read anything on this subject. I don't have parameter to set the target hostname, so can you help me with the right command to do that.

      More over, with the previous version when I ask to nscp the following command: checkCPU time=1s, it's working very well, but with the new version, I have:

      WARNING:ERROR: Could not get data for 1s perhaps we don't collect data this far back?

      Thanks you very much for you help.

      • Message #2469

        There is some basic info in the 0.4.0 guides...

        Anyways there are a few ways to do this:

        nscp client --module CheckHelpers --query CheckOK --raw-argument "Hello World"
        

        Will run the command CheckOK from CheckHelpers Module. The "problem" with CheckCPU is that it requires a polling over time which means you can "start nsclient++ and get the value".

        What you can do is set it up normally to respond to NRPE queries and poll the service via nrpe like so:

        nscp nrpe --host 127.0.0.1 --exec query --command checkOK --raw-argument "Hello World"
        

        Michael Medin

        • Message #2471

          Hi Michael,

          I begin to know nscp ! But I have two problem yet!

          with the following command nscp nrpe --host 127.0.0.1 --exec query --command checkOK --raw-argument "Hello World"

          I have the following error: \trunk\modules\NRPEClient\NRPEClient.cpp:317 Socket error: handshake: short read

          and in the nsclient.ini I have the following directive settings/NRPE/server allowed hosts = 127.0.0.1,166.99.224.129 what happens

          more over I setted the debug to true in settings/eventlog but nothing appears !

          and which command to call a external script (for example: check_battery in scripts/scripts)

          Thank you Michael

          • Message #2472

            Clean config (ie. backup/remove nsclient.ini, boot.ini and nsc.ini) and stopped nsclient++:

            nscp settings --path /modules --key NRPEServer --set 1
            nscp settings --path /modules --key CheckHelpers --set 1
            nscp settings --path /settings/NRPE/server --key "allowed hosts" --set 127.0.0.1
            nscp settings --path /settings/NRPE/server --key "allow arguments" --set true
            nscp service --name nscp --install
            nscp service --name nscp --start
            nscp nrpe --host 127.0.0.1 --exec query --command checkOK "Hello World"
            Hello World
            nscp service --name nscp --stop
            

            Adding the battery script script (This can be made simpler using wrapped script, but this includes no magic):

            nscp settings --path /modules --key CheckExternalScripts --set 1
            nscp settings --path "/settings/external scripts" --key "allow arguments" --set true
            nscp settings --path "/settings/external scripts/scripts" --key "check_battery" --set "cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs check_battery.vbs %ARGS%"
            nscp nrpe --host 127.0.0.1 --exec query --command check_battery
            OK: Battery OK - Charge Remaining = 95%|'charge'=95
            
            • Message #2474

              Hi Michael,

              Thanks you for your help. it's works very well (I still have problems, when I launch the following command: nscp settings --path /modules --key CheckHelpers --set 1 => Missing phyton27.dll on your computer !) Do you know when do you have time to update the documentation to be up to date with the 4 version ?

              Thanks you.

              Best regards.

              • Message #2477

                Interesting, you can always disable PythonScript modules, but maybe I need to handle that scenario better...

                Michael Medin

Subscriptions