Action scripts have a structure compatible with CGI scripts. A script is executed on the monitored server and outputs HTML which is displayed on the iPhone.
Action scripts are stored in the “var/settings/IT Monitor/Actions” directory, which is automatically created during installation (see 4.4 “Server actions”). To make a custom script become available in the “Action Scripts” menu of the IT Monitor app, it must be copied to “var/settings/IT Monitor/Actions”. For each action script its own folder must be created. The name of this folder is displayed as the action script name on the iPhone. The start file in this directory must be named “index.pl”. Other suffixes are also permitted, e.g. “html”, “cgi”, “exe”, “sh” or “bin”. “pl” indicates a Perl script. The folder may contain more files, e.g. PNG images.
The benefit of the supported Apache CGI-compatible scripts is that
existing web solutions can be displayed on the iPhone. Development and testing can be done against Apache, and deployed as an IT Monitor CGI action. Actions can be developed in all available languages such as Shell, Perl, PHP, Java, C, Basic.
the script runs with the privileges of the IT Monitor Server user credentials. An action script allows presenting on the iPhone screen any information from the server or available intranet. This is a very versatile functionality. For example, today's orders or the current inventory or financial status can be reported on the iPhone.
Scripts for monitoring services are executed on the host running “monitorsrv” and return an exit code which decides if a service has been successful or if it has failed. These scripts need not be installed on the server running the services that are subject to surveillance. The scripts can be developed in all available languages such as Shell, Perl, PHP, Java, C, Basic.
Service scripts are stored in the “var/settings/IT Monitor/Services” directory, which is automatically created during installation (see 4.3 “IT Monitor observed services”). To make a custom service script become available in the “Services” menu of the IT Monitor app, it must be copied to “var/settings/IT Monitor/Services”.