Script Writing Guidelines

You can upload, deploy and run your own scripts as both Daily and 24x7 Monitoring Checks that generate Alerts and display in the N-sight RMM Dashboard and relevant Client Reports.

You can also upload, deploy and run your own scripts as Automated Tasks (Windows and Macs) that display results in the N-sight RMM Dashboard and the Automated Tasks Report.

When you submit passwords in your custom automation manager scripts, N-sight RMM validates those passwords to ensure they do not include the following unsupported characters: " ‘ / \ $ `

If there are unsupported characters, the validation field indicates which characters are not supported so you can adjust your passwords.

The following list provides an overview of basic requirements for authoring a script to use in N-sight RMM:

  • The Windows Agent supports the following script types when an interpreter installed: AMP, DOS Batch, JavaScript, Perl, PHP, PowerShell, Python, Ruby, VBS and CMD
  • The Linux Agent and Mac Agent support Shell scripts and interpreted languages such as Perl, PHP, Python, Ruby for which there is a handler installed
  • The status of the script —pass or fail —can be reported to the N-sight RMM Dashboard through exit codes. Zero indicates success, and any other number indicates a failure
  • Exit codes 1 to 999 are reserved for system scripts usage. We recommend you return an exit code greater than 1000 in your scripts to ensure the text output is displayed correctly in the N-sight RMM Dashboard.
  • Rather than create custom scripts for each eventuality, arguments can be passed to the script and applied when the script runs
  • As the Agent service executes the script, user or desktop interaction (including dialogs and messages) is not possible
  • Scripts up to a maximum of 65535 characters in size and a script output size of 10000 characters are supported
To ensure a shell script runs successfully, declare the bash interpreter in the script: #!/bin/bash. For example:

"Hello world"
exit 0

We provide the mechanism to run your own scripts on your servers and workstations; however, we are not responsible for custom scripts made or used in conjunction with this product. We are not liable for loss incurred from system, hardware or data loss. It is the customer/developer's responsibility to verify the integrity, actions and impact of any custom scripts.

What do you want to do?