Using custom sensors you can create virtually any type of sensor for IPCheck Server Monitor. Scripts, EXEs and DLLs are supported out of the box. But for CMD and BAT files a little tweaking is necessary.
If you have a script that produces values you want to use for a custom sensor, but cannot compile the script to an 'EXE' file there is still the possibility to use it as a custom sensor.
You can fool IPCheck Server Monitor to use a script file by using a command line interpreter as the EXE file.
You have to copy the script interpreter/command line interpreter (i.e. 'CMD.EXE') into the 'Custom' folder of your IPCheck installation. As parameters for the sensor in IPCheck you have to supply what is necessary to invoke the script file. I.e in case of the windows command line interpreter this would be something like this:
/q /d /c c:\batchfiles\test.bat
Your script has to do the following things:
- Return an exit code (0=OK, 1=Warning, 2=Error)
- Write the [Resultvalue] and [Resulttext] to the standard output in the format (without the quotes)
'[Resultvalue]:[Resulttext]'
A sample batch file would look like this:
echo 100:Everything OK
exit 0
You have to take care that only the output of your script (in the format given above) appears on the standard output! So the command line interpreter itself has to be muted.
Last Edited: 2005/07/26