How to create a custom monitor?
Q: None of monitor types available can handle the task. How can I run a program or script of my choice instead?
A: Right click on an existing host and select “New Monitor”, then select “Custom monitors” category on the left and “Script or Program” monitor.
Select the appropriate host and group settings on a next screen and click on “Finish”. Now select the newly created monitor and proceed to “Monitor Definition” section.
You can use either a script known to Windows Scripting Host, a Nagios Plugin or an external script and/or program to run.
Note that the script/program selected is executed under the Monitoring Service Account Credentials (LocalSystem) by default, so you may need to select specific credentials in the Credentials section for this monitor to get access to required data.
The following settings are self-explanatory: “Path”, “Arguments”, “Mode”.

External program is run by invoking cmd.exe and passing it the full path to program and the parameters.
If the program/script exit code is zero, then the whatever is printed to the standard output is used as the returned value; otherwise, the output is used as an error message.
You can scale the returned (real) value with “Divide returned value by” setting (1.0 by default, i.e., no change).
Related topics
Can I monitor custom port?
Check out our Knowledge Base where we answer questions regarding various topics. Use the Script or Program monitor from the Custom monitors category when built-in monitor types do not cover the check you need. The script or program runs under the Monitoring Service Account Credentials, LocalSystem by default, unless you configure specific credentials for the monitor. If the exit code is zero, standard output is used as the returned value. If the exit code is nonzero, the output is treated as an error message.
Frequently Asked Questions
Which monitor type runs a custom script or program?
Which account runs the selected script by default?
How does the custom monitor interpret script output?