FusionReactor Enterprise Scripting (available as part of the FusionReactor Enterprise / Ultimate Edition), enhances FusionReactor's Monitoring capability to enable scripts to be automatically triggered when a server's responsiveness status changes.
This feature can be used to perform any task which can be launched from a platform script. Examples might include:
- Interacting with SNMP or enterprise monitoring/reporting systems
- Performing automated restarts of affected instances e.g. restarting Java or ColdFusion
- Sending custom email messages
- Writing custom log messages
Since FusionReactor Enterprise Scripting is able to launch any platform executable (shell script, executable binary etc.), it may be tailored to virtually any environment.
This technical document is targeted at FusionReactor administrators who are responsible for monitoring one or more FusionReactor servers using the FusionReactor Enterprise Dashboard. This document will guide the administrator through the new functionality, illustrating how and when FusionReactor runs scripts, and the best practices and caveats involved with automated scripting.
Enterprise Scripting on server state change¶
If an Enterprise Script has been configured (on the Enterprise Dashboard Settings page) - then it will be run (invoked) whenever the Enterprise Monitor detects that a monitored instance has changed state:
- an instance which was previously available is no longer providing Enterprise data
- an instance which was previously unavailable has begun to provide Enterprise data
Scripts are run only if an instance changes state while it is being observed (monitored)
Notification Alerts and generate email following a server startup or shutdown¶
FusionReactor can also send an email alert or issue a notification alert if a server changes state.
Go to the Server Shutdown/Start Up Alerts tab.(See Screenshot below)
- If you wish to send an email when an instance becomes unavailable, "On Shutdown" must be selected as an option on the Send Alert Email tab.
- If you wish to send an email when an instance becomes available, "On Shutdown and Start Up" must be selected as an option on the Send Alert Email tab.
The "Enable" option must be selected on the Generate Notification tab.(See Screenshot below)
Operational Impacts of Scripting¶
There are a few points which should be borne in mind when configuring scripting.
System Restarts and Self-Monitoring¶
If FusionReactor is configured to monitor itself, i.e. is monitoring the same instance in which it is configured, scripting should not be used for operations which affect this instance. Because the order in which FusionReactor's subsystems start up, FusionReactor may prematurely fire a script while the 'self' instance is still starting up.
In these circumstances, we recommend transitioning your environment to a High Availability monitoring solution. This entails installing a new J2EE server (Tomcat, for instance), and installing FusionReactor into that. This container will be used purely as a FusionReactor host, and will be used to monitor other containers.
It may be necessary to create scripts which perform system reboots. Again, we recommend a careful evaluation of the impacts of this type of script before implementation. A script which restarts a system should not attempt to restart the system on which the monitoring solution runs.
If a script is configured for a given instance, it will be fired when that instance becomes unavailable. FusionReactor does not differentiate between overloaded (or failing) instances, and instances which have been deliberately stopped. Therefore, if you stop an instance manually, through Windows' Services panel for instance, FusionReactor will fire the configured script. As an operational matter, the affected instances should be offlined from FusionReactor before being shut down. This can be done within the Enterprise Dashboard, by clicking the +/- button on the server icon:
... or from within Enterprise > Manage Servers by selecting the Modify icon for the affected server, then changing its Status to Offline.
FusionReactor will not monitor these systems. When maintenance is complete, the servers should be online again by reversing the process.