Sun GlassFish Enterprise Manager Monitoring Scripting Client 3.0 Installation and Quick Start Guide

Running a Script for Monitoring Enterprise Server

Monitoring Scripting Client provides an asadmin subcommand to run scripts for monitoring Enterprise Server. To ensure that scripts can receive and process events correctly, you must use the subcommand that is provided to run these scripts.

ProcedureTo Run a Script for Monitoring Enterprise Server

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Ensure that monitoring is enabled for Enterprise Server.

    If monitoring for Enterprise Server is disabled, no events that your script is listening for are sent.

    For information about how to enable monitoring for Enterprise Server, see To Enable Monitoring in Sun GlassFish Enterprise Server v3 Administration Guide.

  3. Run the run-script subcommand.


Example 1–1 Running a Script for Monitoring Enterprise Server

This example runs the script /tools/mon/modulestarted.js.


asadmin> run-script /tools/mon/modulestarted.js

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help run-script at the command line.