What is scripts?

Scripts are small programs (often command-line based) that automate a task—like collecting a metric, checking a condition, or performing a quick health test. In monitoring, scripts are useful when you need to measure something very specific, or when the data isn’t available through standard protocols. A good monitoring script is predictable, fast, and returns a clear result so the monitoring system can graph it and alert on it.

Using scripts in IPNetwork Monitor. IPNetwork Monitor includes a powerful Script or Program monitor that can execute an external script or application and interpret its return code and output as monitoring data. This is especially useful when built-in monitor types aren’t enough: you can run a Windows executable, a Windows Scripting Host script, a Nagios plugin, or other command-line tools (GUI apps should only be used if they support unattended/batch mode). For the monitor to work reliably, a successful run should return exit code 0 and print an integer to standard output (used as the performance value); a non-zero exit code means the output is treated as an error message. You can pass command-line arguments (with correct quoting), choose the execution mode (program vs script), optionally apply a divisor to scale the returned value, and supply specific credentials if the script must access protected resources. Since external scripts can consume time and resources, it’s recommended to prefer lighter built-in methods (like WMI or File monitors) when possible, and use dependencies to avoid running heavy scripts when an upstream check (like gateway PING) is already failing.

Content