Take Action commands can be run from the desktop or included in a situation or a policy.
When included in a situation, the command runs when the situation becomes true.
A Take Action command in a situation is also referred to as reflex automation.
When you enable a Take Action command in a situation, you automate a response to system conditions. For example, you can use a Take Action command to send a command to restart a process on the managed system or to send a text message to a cell phone.
Advanced automation uses policies to perform actions, schedule work, and automate manual tasks. A policy comprises a series of automated steps called activities that are connected to create a workflow. After an activity is completed, Tivoli Enterprise Portal receives return code feedback, and advanced automation logic responds with subsequent activities prescribed by the feedback.
For more information about working with Take Action commands, see the IBM Tivoli Monitoring User's Guide.
Predefined Take Action commands
This monitoring agent contains the following Take Action commands:
v AMS Recycle Agent Instance
v AMS Reset Agent Daily Restart Count v AMS Start Agent
v AMS Start Agent Instance v AMS Stop Agent
v AMS Start Management v AMS Stop Management v Sample_kill_Process
The remaining section of this chapter contains a description of the Take Action command. The following information is provided about Take Action commands:
Description
Which actions the command performs on the system to which it is sent Arguments
List of arguments, if any, for the Take Action with a short description and default value for each one
Destination systems
Where the command is to be run: on the Managed System (monitoring agent) where the agent resides or on the Managing System (Tivoli Enterprise Monitoring Server) to which it is connected
Usage notes
Additional relevant notes for using the Take Actions
AMS Recycle Agent Instance
Description
Use this action to stop and start any agent with a single request. This recycle does not increase the restart count of an agent.
Arguments
Agent Name
The name of the agent as it is displayed in the Agents' Runtime Status View's Agent Name column.
Process Name
The name of the agent's process as it is displayed in the Agents' Runtime Status View's Process Name column.
Instance Name
If it exists, the name of an agent instance as it is displayed in the Agents' Runtime Status View's Instance Name column.
Process ID
The process ID of the agent process as it appears in the Agents' Runtime Status View's Process ID column.
Destination systems
Managed system
Usage notes
Not available to previous versions of the OS agents. To use this action against the OS agent, the Agent Management Services watchdog must be running.
AMS Reset Agent Daily Restart Count
Description
Use this action to reset the daily restart count of an agent to 0.
Arguments
Agent Name
The name of the agent as it is displayed in the Agents' Runtime Status View's Agent Name column.
Process Name
The name of the agent's process as it is displayed in the Agents' Runtime Status View's Process Name column.
Instance Name
If it exists, the name of an agent instance as it is displayed in the Agents' Runtime Status View's Instance Name column.
Destination systems
Managed system
Usage notes
Not available to previous versions of the OS agents. To use this action against the OS agent, the Agent Management Services watchdog must be running.
AMS Start Agent action
Description
Use this action to start an agent that is under the management of Agent
Management Services. The action includes an optional input field for resetting the Daily Restart Count back to 0. This action is helpful when an agent has exceeded its maxRestartCount for the day.
Arguments
Agent Name
The name of the agent as it is displayed in the Agents' Runtime Status View's Agent Name column.
Daily Restart Count
Value indicating whether to reset the daily restart count. The value 1 indicates True, and the value 0 (default) indicates False.
Process Name
The name of the process representing the agent instance as it is displayed in the Agents' Runtime Status View's Process Name column.
Destination systems
Managed system
Usage notes
You cannot target the Monitoring Agent for UNIX OS with this action. Only the other agents being managed by Agent Management Services running on the Monitoring Agent for UNIX OS can be targeted with this action.
AMS Start Agent Instance action
Description
Use this action to start a monitoring agent instance of type ITM Windows or ITM UNIX that is under the management of Agent Management Services. The action includes an optional input field for resetting the Daily Restart Count back to 0.
This action is helpful when an agent instance has exceeded its maxRestartCount for the day.
Arguments
Agent Name
The name of the agent as it is displayed in the Agents' Runtime Status View's Agent Name column.
Daily Restart Count
Value indicating whether to reset the daily restart count. The value 1 indicates True, and the value 0 (default) indicates False.
Process Name
The name of the process representing the agent instance as it is displayed in the Agents' Runtime Status View's Process Name column.
Instance Name
The name of the monitoring agent instance as it is displayed in the Agents' Runtime Status View's Instance Name column.
Destination systems
Managed system
Usage notes
You cannot target the Monitoring Agent for UNIX OS with this action. Only the other agents being managed by Agent Management Services running on the Monitoring Agent for UNIX OS can be targeted with this action.
AMS Stop Agent action
Description
Use this action to stop an agent that is under the management of Agent
Management Services. The action will put a running instance of an agent into the 'Manually Stopped' state, meaning that Agent Management Services will not perform any auto-restarts. To prompt Agent Management Services to commence auto-restarting, use the AMS Start Agent command or the AMS Start Agent Instance command to manually put the agent back into a Running state.
Arguments
Process ID
By default, this argument is populated with the Process ID of the particular agent instance selected from the Tivoli Enterprise Portal. To stop all
instances of an agent, such as by using the tacmd executeaction AMS Stop Agent command, leave this argument blank.
Destination systems
Managed system
Usage notes
You cannot target the Monitoring Agent for UNIX OS with this action. Only the other agents being managed by Agent Management Services running on the Monitoring Agent for UNIX OS can be targeted with this action.
AMS Start Management action
Description
Use this action to put an agent under the management of Agent Management Services. This management provides the auto-restart capability.
Destination systems
Managed system
Usage notes
You now can target the Monitoring Agent for UNIX OS with this command.
Starting management of the OS Agent restarts the physical watchdog and rearms Agent Management Services. Watch of managed agents resumes. There is no change to non-OS agent management operations.
AMS Stop Management action
Description
Use this action to remove an agent from management by Agent Management Services. The action will cause the Agent Management Services watchdog to stop performing health checks and auto restarts.
Destination systems
Managed system
Usage notes
You now can target the Monitoring Agent for UNIX OS with this command.
However, stopping management stops the physical watchdog and disarms Agent Management Services, which also stops watching and restarting of any managed agents. While the OS Agent is unmanaged, the AMS Start Management action will not be allowed against any other non-OS agent. The UNIX_AMS_Alert_Critical situation is activated if this take action is run on the OS agent.
Sample_kill_Process action
Description
Kills the process named in the parameter supplied and enables you to issue ad-hoc commands from the Tivoli Enterprise Portal that the Monitoring Agent for UNIX OS will run on your behalf.
Arguments
Process ID
The Process ID (PID) of the process you would like to kill.
Destination systems
Managed system
Usage notes
The kill command is run directly by the remote Monitoring Agent for UNIX OS.
Because it is easy to kill processes unintentionally, you need to exercise caution if the monitoring agent is run as superuser (root).