VMware Smart Assurance provides a number of sample tool scripts that, with minor modifications, work on most systems. The main purpose of these scripts, however, is to provide examples that you can examine when developing your own tools.
The ping and Telnet tools are sample scripts. You need to customize them to meet the needs of your environment. For example, the sample scripts do not take firewalls into account.
Sample server tool scripts lists the sample server and automated tools, the display name for the tool as seen by users in the Global Console, and provides a brief description. Server and automated tools are located in the BASEDIR/smarts/actions/server directory.
To modify one of the sample tool scripts, open it with the sm_edit utility to create a local copy of the script.
Server tool script |
Display name for tool |
Description |
---|---|---|
ics-closetkt |
Sample - Close Trouble Ticket |
This tool inserts a static value into the field of a notification. The context and Status Criteria specify that this tool is only active for notifications with the text OPEN in the TroubleTicketID field. |
ics-opentkt |
Sample - Open Trouble Ticket |
This tool inserts a static value into the field of a notification. The context and Status Criteria specify that this tool is only active for notifications without the text OPEN in the TroubleTicketID field. |
ics-ping-interface |
Sample - Ping-Interface |
This tool pings an IP interface. The Context Criteria specify that this tool is active for notifications with a value of “Interface” for the ClassName attribute. |
ics-ping-IP |
Sample - Ping-IP |
This tool pings an IP interface. The Context Criteria specify that this tool is active for notifications with a value of “IP” for the ClassName attribute. |
ics-ping-all |
Sample - Ping-all |
This tool pings all the IP interfaces associated with a device. The Context Criteria specify that this tool is active when the target is a UnitaryComputerSystem. As such, valid targets include both notifications and instances. When invoked, this tool retrieves all of the IP addresses associated with the target instance from one or more underlying domains. Two variables that control the behavior of the tool:
|
ics-ping-device |
Sample - Ping-device |
This tool pings the IP address of the SNMP agent for the affected element. The Context Criteria specify that this tool is active when the target is a UnitaryComputerSystem. As such, valid targets include both notifications and instances. When invoked, this tool retrieves the IP address of the SNMP agent associated with the target instance from one or more underlying domains. The tools script includes one variable that controls the behavior of the tool:
|
ics-telnet |
Sample - Telnet |
This tool opens a Telnet session with the affected device. The .sh version of this script pings an IP address of the affected device before attempting to connect. If the ping fails, the script pings another IP address on the device, and so on until a ping succeeds or all the pings fail. When a ping succeeds, the script connects to the IP address where the ping succeeded. If this tool is invoked from a console that is running over X Windows, the script opens a separate window on the user’s display to invoke the Telnet session. |
Sample client tools scripts lists the sample client tools and provides a brief description of each. Client tools are located in the BASEDIR/smarts/actions/client directory.
Client tool |
Description |
---|---|
SmGetEnv |
This tool parses the environment variables passed by the Global Manager to the tool script. It also prints all environment variables to the Tool Output window. A version of this tool script is also provided in Perl. |
SmLaunchPerlScript |
This tool launches the SmGetEnv.pl tool script to illustrate how you can launch Perl scripts from a tool. You must edit this script to specify the location where Service Assurance is installed. |
browser |
This tool opens a web browser. You must edit this script to specify the location where your browser is installed. |
ciscoworks |
This tool opens a web browser that loads the administration page for CiscoWorks. You must edit this script to specify the location of your browser and the host where CiscoWorks is running. |
pinger |
This tool pings the name of the specified element. |
Reporting |
This action accesses reports available through the Service Assurance Report Manager. It opens a web browser with the URL set to the location of the Crystal Enterprise EportFolio application. You must edit this script to specify both the web browser and the URL. |
Remember that tool scripts are system-specific. You can also write a tool script in a language such as Perl, which runs on different platforms with little or no modification.