Third party software example "cmd.exe"


#1

Dear sir , I have installed nagios on linux machine and i have installed nagios client on remote windows machine . now i am able to moniter the remote windows machine BUT
I want to open cmd.exe on remote windows machne ( i took example cmd.exe) .
If i want to open cmd.exe on remote windows machine what are the settings do i need to do in nagios configuration of linux and what i need to add in nsclient , pls help me out


#2

You need to read the documentation for nsclient. What you want to use is external scripts. NSClient even comes with sample files.

nsclient.org/nscp/wiki/CheckExternalScripts


#3

I have read all the documentation , But still i have one doubt.
I have created a hello.bat file in scripts folder of nsclient

now what are the steps to be taken to run hello.bat in nsclient from nagios server with the help of command.
I just want to know what are the other confiuration how to give command name to the hello.bat and what are the other configurations to be run to run hello.bat from nagios server


#4

you create a line for the external script in nsclient ini, enable external scripts etc.
Then you call it with nrpe from nagios.


#5

Dear Sir
I created a line for nsc.ini in nsclient windows , and the line is “;check_es_hi=scripts\hi.exe” under external scripts

after that i have gone into nagios server and i executed this “#check_es_hi” it says no such file ( i kept hi.exe in scripts folder for nsclient)
what to do


#6

You need to check it with nrpe.

One way is to create a command, another is to use generic nrpe command

A custom command can look like this:

define command { command_name check_nrpe_check_es_hi command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 120 -c check_es_hi }


#7

define command {
command_name check_nrpe_check_es_hi
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 120 -c check_es_hi
}

I KEPT THIS IN NAGIOS SERVER
and i executed check_es_hi
it says command not found , do i need to keep the same executable in the nagios server

PLEASE HELP , I AM NEW TO NAGIOS