The general structure of the python scripts are as follows:
- Import Libraries
- Initialize/set variables
- Parse passed parameters from the engine
- Run point check
- Set return parameters
- Pass return parameters to engine
The Custom script/check must accept the following parameters by from the GeoMonitor Engine.
- enginePID Engine Process ID – unique for each point check
- engineHost Engine IP Address – used to send message back to Engine
- enginePort Engine Port number - used to send message back to Engine
- debug (optional) Set to True to record script debug information to log files
- server (optional) Parameter for server name
The Custom script/check must return the following parameters to the GeoMonitor Engine.
- enginePID Engine Process ID – unique for engine to keep track of point check
- status Status of the point check, either ‘good’ / ‘up’ or error
- serviceTime Actual time to perform point check
- Msg (optional) Message passed back to engine – display in User Interface
The Custom script can also pass other parameters it needs.
To be accessible the custom scripts or executables must be saved to the ‘scripts’ folder (YourProgramFiles/…/scripts) on the GeoSystems Monitor server.
The User Interface for establishing the parameters and naming the script is accessible through Settings - Custom Monitor.