EXTERNAL

From ServersCheck Wiki

Jump to: navigation, search

Contents

Description

The EXTERNAL check allows you to run custom written checks and to have the output of those verified by ServersCheck and alert when unexpected result is returned. Currently, only batch files and executable files (if they write output to console) are supported.


Definition

In the ServersCheck, beside general settings for each check, which are similar for all checks, there are following Check Specific Settings which also need to be setup. In the Check Specific Settings, there are following fields you need to supply with parameters:

  • Command to execute - The command that ServersCheck needs to execute. It is the same command you would enter in the dos command prompt when being in the external subdirectory).
  • Expected value - This the expected value or response from the external command.


This check will execute the batch file or exe and compare the returned output with a predefined string.

Your custom batch file or exe needs to be installed in the external subdirectory of ServersCheck. If you do not have an external subdirectory then create a subdirectory (under your main ServersCheck directory) with external as its name.

In order to work properly you need to make sure that:

  1. The batch file or exe exists itself in the 'external subdirectory'. Runaway batch files or executable files may impact ServersCheck's performance.
  2. The batch file or exe has to output to the console and not a popup window!
  3. If the batch file contains calls to other apps, then the call includes the full path to the app


Externarule1.png

Externarule2.png

Externarule3.png

Externarule4.png


Returned Results

This check returns one result: OK or DOWN

OK is returned when the string returned by the batch file or exe is the same as the predefined one. In all other circumstances, a DOWN will be returned as status.


How to run VBS scripts?

By default, batch files and executable files are supported for this type of check when the output is sent to the console. VBS scripts by default output data to a popup window and cannot be used for this type of check.

There is however a workaround solution to run VBS scripts. Here is how it can be done:

  1. Create your VBS script and store it in the external subdirectory of ServersCheck
  2. Create a batch file, in the external subdirectory of ServersCheck, that calls your VBS script by using following command:

cscript <yourscript.vbs>

Personal tools