Hi nomolos,
NSC.ini does not recognize test.bat. There is one step missing: NSC.ini must recognize the command
which you pass when you execute the check_nrpe command (what comes after -c, see below).
Please make sure first that the communication between check_nrpe (nagios server) and nsclient++ (windows server) works.
Open a shell on the nagios server and execute a command, something similar to this:
Code:
/usr/local/nagios/libexec/check_nrpe -H [IP windows server] -p [port nsclient++] -c restartxyz
This command executed on the nagios machine would trigger nsclient++ on the windows machine to execute the external script restartxyz.
It works only if NSC.ini is configured to recognize restartxyz. It must contain a line like this:
Code:
[External Scripts]
...
restartxyz=java restartservice xyz
Wether it is java, VB, power shell,... does not matter. You need an external script which does the operation you need.
In this case it is a java class called restartservice which needs one parameter.
(Of course you must make sure that the windows service for nslient++
is actually running and that it has enough permissions to execute the desired operation.)
If you can't get this running I would recommend to work through this page:
http://www.nsclient.org/nscp/wiki/gu...ios/check_proc
As soon as you can restart the service from the nagios server with the check_nrpe command from the shell you can
integrate it into the nagios web interface. Write a cgi which executes the check_nrpe command and use the url
in the action_url directive.