The Action Manager is a standalone Java™ application that allows us to monitor multiple TDI Servers and AssemblyLine execution using user-defined rules, triggering conditions and actions defined in AMC. The Administration and Monitoring Console (AMC) has an Action Manager window that allows users to configure various Action Manager rules.
A rule is a combination of a trigger type and a set of associated actions. A rule specifies that when a triggering condition is detected, then the associated set of actions must be executed. The various trigger types available in AMC are described below:
When a rule gets triggered, the Actions associated with the rule are executed by the Action Manager sequentially. The following are the various types of Actions that are available in AMC:
Action | Action Details | User Input for action |
---|---|---|
Start AssemblyLine | This action starts the specified AssemblyLine of the specified config file on the specified TDI server. The Config field should mention the complete path of the configuration on the remote server. The Config Password field is optional and is required only if the remote config is password protected. | "AssemblyLine", "Of Configuration", "On Server", "Config Password". |
Stop AssemblyLine | This action stops the specified AssemblyLine of the specified configuration on the specified TDI Server. The Config field should mention the complete path of the configuration on the remote server. | "AssemblyLine", "Of Configuration", "On Server". |
Enable/Disable Rule | This action Enable or Disable the chosen rule. | "RuleName" "State" |
Execute Rule | This action cause the execution of the specified rule, which in-turn imply execution of all the actions specified in that particular rule. | "RuleName" |
Notify Event | This action cause the Action Manager to emit an event with the specified details to the Server associated with the current Solution View. See the Session.sendCustomNotification() API for details. | "Event type", "Source", "Data". |
Modify Property | This action cause the Action Manager to modify the selected property based on the specified operation. | "Property", "Operation", "Value". |
Copy Property Value | This action cause the Action Manager to copy the value of the Source property to the Destination property. | "From Property", "To Property". |
Write to Log | This action causes a log of the specified Severity/Message/Description to be logged into the Action Manager logs and the AMC database. The same log is shown when the user goes to the Monitor Status -> Solution View Details -> Action Manager Results table. It is advised to always have at least one Log action (containing descriptive text) in every rule. | "Severity", "Message", "Description". |
Send Email | This action causes an email to be sent to the recipient you specify. You supply the content of the email. Along with the content, the Action Manager provides other details before sending the mail. In the content input area as well as in the subject line, we can specify the variable %EVENT_DATA% value. Specifying %EventData% inserts the actual value of the Eventdata variable when the mail is sent. %Action_Error% can also similarly be substituted here. If Attach Action Manager Log is enabled, the Action Manager logs (as specified in the am_logging.properties file) are sent as an email attachment. | "To", "From", "Subject", "Attach Action Manager Log" (Selected/Not Selected), "Content". |
Modify local variables | This action causes the action manager to increment, decrement or set the value of the specified variable to the specified value. | "Variable", "Operation", Value". |
Execute command | This action causes the specified command to execute on the target computer. The command can be any generic command or a TDI specific command. | "Target Machine", "Port", "Username", "Password", "Keystore", "Keystore Password", "Protocol", and "Command". |
Rules that are configured for Solution Views in AMC, are stored in AMC's Derby Database. When the Action Manager is run, it connects to the AMC database in network mode, reads the Action Manager-related tables, and creates threads in memory for every rule specified. Each of these threads listens/polls for its respective triggering conditions. The moment any thread detects the occurrence of its respective triggering condition, it queries the database for the set of actions associated with the rule, and executes them sequentially.
The Action Manager runs the following threads in addition to the rule threads that are listening for trigger conditions:
The Action Manager also updates the AMC database with its run details. Whenever an Action Manager rule is triggered, Action Manager logs an entry into the AMC database, registering the rule name that got triggered, and the triggering time. Also, if any Log action is configured for the rule, then that also gets logged into the AMC database. These database entries are used to show the appropriate status in Monitor windows of AMC.
The Action Manager is installed in the TDI_install_dir/bin/amc/Action Manager folder. It contains the following files:
This is a sample truststore and keystore file; for added security, we should generate our own.
The Action Manager connects to AMC's Derby database using the Network Mode driver.
The following properties (in am_config.properties) must point to the Administration and Monitoring Console's database:
com.ibm.di.amc.am.jdbc.database=jdbc:derby://localhost:1528/C:/Program Files/IBM/AppSrv/profiles/amcprofile/tdiamcdb;create=false com.ibm.di.amc.am.jdbc.driver=org.apache.derby.jdbc.ClientDriver com.ibm.di.amc.am.jdbc.urlprefix=jdbc:derby: com.ibm.di.amc.am.jdbc.user=APP {protect}-com.ibm.di.amc.am.jdbc.password=APP com.ibm.di.amc.am.jdbc.start.mode=automatic com.ibm.di.amc.am.jdbc.sysibm=true com.ibm.di.amc.am.jdbc.networkserver.host=localhost com.ibm.di.amc.am.jdbc.networkserver.port=1528
Both AMC and AM support alternative databases, like MS SQL, Oracle and so forth. In order for AMC and AM to connecto to one of those alternative databases, the configuration statements in amc.properties and am_config.properties will look very different.
When the Action Manager is started, it attempts to connect to AMC's database. If it fails in performing any initial setup tasks, it exit with an exception message. Check the am_config.properties file to ensure it points to the correct database. If the database settings appear to be correct, then ensure that the database that Action Manager is attempting to connect to is running in network mode and that AMC can connect to the same database. You may use the startNetworkServer.bat(sh) to start the Derby DB in network mode.
SSL settings and encryption properties for AM are configured in the following set of properties:
# Action Manager SSL properties javax.net.ssl.trustStore=TDI_Install_dir/serverapi/testadmin.jks {protect}-javax.net.ssl.trustStorePassword=administrator javax.net.ssl.trustStoreType=jks javax.net.ssl.keyStore=TDI_Install_dir/serverapi/testadmin.jks {protect}-javax.net.ssl.keyStorePassword=administrator javax.net.ssl.keyStoreType=jks # Action Manager encryption properties com.ibm.di.amc.am.encryption.keystore = TDI_Install_dir/testserver.jks com.ibm.di.amc.am.encryption.key.alias = server com.ibm.di.amc.am.encryption.keystoretype = jks com.ibm.di.amc.am.encryption.transformation = RSA com.ibm.di.amc.am.stash.file = TDI_Install_dir/idisrv.sth
These properties are similar to the encryption properties used by the server. For convenience the location of the stash file has been added as a property: com.ibm.di.amc.am.stash.file. By default the AM will reuse the server's keystore and stash file for encryption/decryption of AM protected properties.
Further configuration of run-time rules, triggers and actions is described under Action Manager.
When you login to AMC, a one line Action Manager status displays in the Welcome to AMC panel. The Welcome to AMC panel displays the Action Manager status in a link, for example, "Action Manager is running" or "Action Manager is not running." To launch the Action Manager Status window, click the hyperlink. The Action Manager Status window displays Action Manager Status in real time, as well as thread details and trigger details. This window displays status information in real time. This window shows:
The AMC directly queries the Action Manager using the APIs exposed by Action Manager. If AMC cannot establish a session with the Action Manager, the AMC concludes that the Action Manager is not available because the Action Manager has stopped. In addition to Action Manager status, AMC displays details of thread information and trigger details.
Action Manager creates a number of threads. Some Action Manager threads monitor the essential functionality of the Action Manager such as the Database Modification Listener and the ServerStatusListenerThread. Moreover, from these threads the Action Manager creates threads for each of the trigger rules that is configured in AMC. With the Remote Method Invocation (RMI) Layer, AMC can query the status of the various trigger-related threads. Using the RMI based query, AMC knows the state of these threads, thread priority, and so on. AMC can also query the triggers that have been executed over a period of time.
Two new properties belong to the Display real time Action Manager Status requirement. The properties that allow AMC to display the Action Manager status in real time are am.api.host and am.api.port. Action Manager status used an RMI layer around the Action Manager that exposes an API to be used by AMC for querying the Action Manager for its status.
AMC allows users to force a trigger for a specific rule. Forcing a trigger gives the user an idea of what the Action Manager does when the rule is triggered. When we select Disable Rule, the selected rule is disabled. When we select Force Trigger, actions configured for the selected rule are executed.
Action Manager can execute a set of actions configured for a particular trigger (rule) explicitly. The AMC user does not have to wait for the triggering condition of a rule to be satisfied before the configured actions are carried out. Users can define actions that are to be executed so that they can test those actions. Users can execute all of the supported actions using Force Trigger. However, the Revert action is effective for only some (a subset of) the supported actions.