Extending custom servers
You can create a custom server template for an application to categorize the application and later display it as part of the topology. You can also view details about the application, including the listening port, runtime information, and any configuration files or application descriptors that were collected.
- Run commands on the target system to populate any attribute in
the IBM® model for the component.
You can use this approach to set the productVersion attribute, for example.
- Run commands on the target system and store the result as a configuration
file for the component.
One common use of this approach is to extract information from the Windows Registry.
- Run a Jython script on the server.
You can change any information about a component. The difference between this and the first approach is where the code runs. Additionally, you can use a Jython script to populate extended attributes and to create new model objects or relations.
To define a custom server, complete the following steps:
Table 1 describes the command format for directive files.
Directive | Description |
---|---|
CMD:variable= path/command |
You can define an inline command. For example:
You must always specify absolute paths to commands, and you must enclose with double quotation marks (") commands or arguments that contain spaces. You can use environment variables associated with the process, specified by $VARIABLE$. For example,
|
CMD:NOP= path/command |
You can run the command without assigning results to a variable. For example:
|
CMD:CONFCONTENT. filename= path/command |
You can run a command and store the results in the custom configuration file specified by filename. For example:
For more information, see the section on executing commands to create a custom configuration file. |
SCRIPT: path/script |
You can initiate Jython (.py) scripts. For example:
When the path starts with (/) TADDM assumes an absolute path; otherwise the path is relative from $COLLATION_HOME. For more information, see the section on executing Jython scripts. |
Table 2 describes the environment variables available for use in directive files.
Variable | Description |
---|---|
$COLL_PROGPATH$ |
This variable expands to the name of the directory where the program is located. For example, if the command line is /usr/local/bin/foobar -c /etc/foobar.conf, the $COLL_PROGPATH$ variable expands to /usr/local/bin. You can use this variable to insulate your directive file in cases when a command is located in different directories on multiple computers. |
$COLL_PROGNAME$ |
This variable expands to the fully qualified executable name. For example, if the command line is /usr/local/bin/foobar -c /etc/foobar.conf, the $COLL_PROGNAME$ variable expands to /usr/local/bin/foobar. To run the appropriate command, you can use $COLL_PROGPATH$/$COLL_PROGNAME$. |
$COLL_CMDLINE$ |
This variable expands to the entire command line, including any arguments. For example, if the command line is /usr/local/bin/foobar -c /etc/foobar.conf, the $COLL_CMDLINE$ variable expands to /usr/local/bin/foobar -c /etc/foobar.conf. You can use this variable to find the version of the secure shell daemon (sshd) running on a system without having to know where it is installed, using the following command:
|