Monitor Type: Custom monitors

Monitor Parameters: Monitor Type

<Prev Databases Index Virtual Machines Next>


Monitor Type: Custom monitors

Monitor Type Properties
Custom monitors
Script or Program

This monitor type allows to run an external program, batch file or Windows Scripting Host script such as Visual Basic script and to interpret the script output as a performance value. Use it to monitor anything that is not covered by the standard monitor types.

Program type Mode – is a radiobutton with two options. Select Run program to run a binary .exe file or batch script; select Run script to start Windows Scripting Host script.

Nagios Plugin – mode is a checkbox that allows plugging in monitors that conform to the Nagios Plugin API. In this mode the plugin can also calculate a monitor performance state; plugin response code 1 (Nagios WARNING) is mapped to IPHost Network Monitor’s Warning. You can take Nagios plugins, for example, here, compile them with Cygwin or another C compiler and use them via the the IPHost Network Monitor’s polling engine to perform specific monitoring tasks not covered by the other monitors.

Divide returned value by – has the same meaning as for the SNMP monitor; the number allows scaling performance numbers to make them valid signed 32-bit integers. In particular, specify a value of 0.001 to convert milliseconds to seconds (divide them by 1/1000, that is, multiply by 1000).

Program Path – is a full path to a script or program that you can enter manually or select using the File Open dialog. The default location to look for script and program monitors is the scripts/ subdirectory of the program installation directory which contains some useful monitors described here intended to monitor directory size, file content, and HTTP response content.

Program Arguments – are arguments that are passed to the program; make sure to quote parts of this string that should be considered as a single argument and may contain spaces.

Authentication section – specifies what Windows account to use. By default, the Monitoring Service Account is used (this is normally LocalSystem), another option is to use the Windows account defined in the Credentials section below.

SSH (Remote Script or Program)

This monitor type allows to connect to a remote host over SSH and to run any command there. Execution results are interpreted as a performance value. Use it to monitor remotely anything that is not covered by the standard monitor types. In particular, you can integrate any already deployed monitoring capabilities for UNIX-based hosts with the IPHost Network Monitor alerting and reporting engine, be it custom scripts, Nagios plugins or interfaces provided by other systems. You can also just measure SSH connecting time using this monitor.

Script execution Mode – is a radiobutton with three options. You can run scripts or commands using either Run Script or Run Nagios Script mode as explained here. In these two cases, the next setting, How to run a script, specifies which script to run as explained below. The last option, Measure Time, disables script execution on the server. Instead, an SSH monitor in this mode just measures the SSH connection time in milliseconds.

How to run a script – a drop down list with three options:

  • Run shell command(s): when you select this option, a single line entry field called Shell command(s) appears. Specify the shell command there; joining multiple commands with pipes (“|” syntax) is supported.
  • Take a script from file: a File name field where you select a local script file to be executed remotely and a Parameters field containing script arguments appear. You should use so called shebang strings to specify command line interpreters. Known supported interpreters are: bash, dash, csh, zsh, perl, python, ruby, nodejs, php.
  • Take a script from the text box below: similar to the previous option, but you write the script directly in a multiline text entry field called Script body. This fits better if the script is short and is not likely to be reused.

Divide returned value by – has the same meaning as for the SNMP monitor; the number allows scaling performance numbers to make them valid signed 32-bit integers. In particular, specify value 0.001 to convert milliseconds to seconds (divide them by 1/1000, that is, multiply by 1000).

Port (integer, by default 22), is a port to connect to.

Host Key Fingerprint – if this checkbox is checked, the Host Key Fingerprint is compared with the actual fingerprint used by the destination host. When they don’t match, the credentials are not sent to that host and the monitor is considered Down. You can get a current host fingerprint from the error message in the Logs Pane and paste it to the Host Key Fingerprint parameter to make this check succeed.

Authentication – this parameter defines an authentication method to use. Authentication By password uses the credentials selected in the Credentials section below. Authentication By public key uses the values of Path to Public Key File and Path to Private Key File (these should be obtained using the ssh-keygen utility as explained here and registered on your SSH server) as well as Passphrase for a private key. The last authentication method, By public key or password, attempts to authenticate both ways, first by the public key, next by the password.

<Prev Databases Index Virtual Machines Next>