NSClient++ Help (#1) - Chekcs from the command line via nsclient++ (#596) - Message List
Hello,
are there any possibilities to run all defined checks (aliases, external commands, ...) from the commandline in a way like this:
nsclient++.exe checkcpu arg1 arg2 arg3...
It should be possible to execute the command on the monitored server and the normal returncode and text (txt + perfdata) should be the output.
Thus, I could use such an execution in a batch programme.
Thank you!
bye bob
-
Message #1832
Could you give some examples of things not working?
mickem06/10/10 21:55:21 (3 years ago) -
Message #1831
Hi Michael,
Thank you for your reply! The execution in "debug mode" (nsclient++ -c Check.... args...) is functioning correct. The execution in NRPE-mode on the local machine brings up a SSL error. But I do not know why? The call from Nagios (check_nrpe) is ok.
Further more complex CheckWMI-commands by "nsclient++ -c CheckWMI ... (query=...)" brings up a syntax error in the select-query. But exactly the same complete command could be run by an alias. Isnthis an error in NSclient++ or do I enter some wrong parameters?
Thanks in advance!
bye bob
bob06/10/10 20:25:27 (3 years ago) -
Message #1826
It should be the same as running it "via NRPE" ie. you should be able to use that to aggregate checks in your scripts and such. SO, in short: Yes it should.
Michael Medin
mickem06/10/10 07:33:59 (3 years ago) -
Message #1823
Hi all,
I have found the answer to my initial question here: http://nsclient.org/nscp/discussion/topic/518
Does this return then normal returncode (errorlevel), too? Or does this only return the text info?
In this context a forther question: I call a programme via a vbs. How can I query the returcode from this programme in my vbs?
Thank you!
bye bob
bob06/09/10 21:51:39 (3 years ago)








