3.1.2 Matrix Server Administration Guide
Chapter 17: Advanced Topics 213
Copyright © 1999-2006 PolyServe, Inc. All rights reserved.
exit non-zero. The service could then become active on another server,
causing the Stop script to run on the original server even though the Start
script had not completed successfully.
When you add Start and Stop scripts to a service or device monitor, you
can set a timeout period for each script.
Script Environment Variables
When you specify a script for a service or device monitor, Matrix
Server sets the following environment variables for that script.
MX_METHOD=(START|STOP|RECOVER|PROBE)
The type of script (Start, Stop, Recovery, or probe).
MX_ACTIVE_STATE=(ACTIVE|INACTIVE)
Whether the script is being run on an active instance of the object. For
example, if a service-monitor script is being run on the server that
currently has the active virtual host, its state will be
ACTIVE. For
device-monitor scripts, the state is
ACTIVE if the monitored device is
active on the server running the script.
MX_SERVER=IP address
The primary address of the server that calls the script. The address is
specified in dotted decimal format.
MX_TYPE=(SERVICE|DEVICE)
Whether the script is for a service or device monitor.
MX_VHOST=IP address
The IP address of the virtual host. The address is specified in dotted
decimal format. (Applies only to service monitors.)
MX_PORT=Port or name
The port or name of the service monitor. (Applies only to service
monitors.)