How to run a groovy script in Foglight using the script console in the Foglight Management Server
原因
Groovy is a scripting language with Java-like syntax for the Java platform. Groovy scripts can be used to undertake numerous tasks in the Foglight script console including viewing and adjusting Foglight settings and querying the Foglight repository. These scripts can be run from directly within the FMS using the Script Console panel or by running the fglcmd utility from either the FMS command line or remotely from another system.
The script used as example in this video can be found in KB article 4295903. This script counts the number of alarms in the alarm_alarm table of the Foglight repository.
Some scripts provided by Quest in the resolution of Support issues may include edits to change in the script content specific to the FMS environment.
Please review any additional notes provided with any script before running it in the FMS system.
対策
In the Foglight Management Server console navigate to Administration | Tooling | Script Console.
Select the Script tab and click the Add button to run the groovy script.
OPTIONAL: Choose an Associated Cartridge
Paste the content of the groovy script and click the Run button
The following video demonstrates how to run a groovy script in the script console.