Share This:

Backing up critical data is an important aspect of any production level IT environment.   However, backing up the data is only half the picture; you must be able to restore it as well.    Being able to restore your agents after hardware failures or other mishaps is equally important.    Enhancements made to BMC TrueSight Middleware and Transaction Monitor 8.0.00 services and agents have made this easier.

 

Background Information

 

When backing up the agent and extension information we mainly refer to the current set of objects registered for monitoring, agent and extension preferences, and extension configuration files.

 

In addition to the agent’s local repository of objects (maintained in eaa.xml), the services maintains an object repository and records what objects were previously registered for monitoring.   The service repository allows you to forego backing up the agent’s local repository as we can restore up to date information from the service repository for BMC TrueSight Middleware and Transaction Monitor 8.0.00 and later agents.

 

The WebSphere MQ extension may be configured to discover queue managers and their objects.  When using discovery with policies to register objects for monitoring , the objects and monitoring from a reinstalled agent will be restored with no intervention.   When using other extensions, or when discovery is disabled, you can use the restore feature from the Management Console or repomgr command line tool.

 

The agent and extension preferences (also maintained in eaa.xml) are not duplicated in a service repository.  However, if you use policies to set the agent and extension preferences you can simply apply the policy after restoring your agent installation.    If you are not using policies to set the preferences you should use agentpref to export the preference settings to an xml file.   It is recommend that you export the preference settings after initial configuration and whenever preferences are changed.

 

The agentpref utility is available in the services installation and as an agent package.  If the agent was configured to communicate with the services using a tunnel (i.e. using TLS), and a tunnel is required to communicate with the agent (i.e. only TLS traffic is permitted to or from the agent), then you will need to export and restore the preferences using agentpref locally, on the agent machine.

 

As you can see, using policies as a recovery mechanism is an easier way to recover an agent with up to date information.   However, you should export your policies using the mqsexport command and backup the output zip file.   If necessary use mqsimport to restore the policies.

 

The WebSphere MQ extension is controlled entirely from preferences but other extensions may have files that you configure during installation.   You should back up those files after the initial configuration and whenever they are changed.    In addition, if you aren’t using the standard port or are overriding some connection parameters, remember to back up the eaapi.ini file(s).   Much of this information is specific to your environment and may be readily available from other sources.   However, it is still recommended that this information is backed up to make restoration easier and faster.

 

Restoring an agent

 

Follow these first steps for a simple agent install on a distributed platform like Linux or Windows …
* Get an agent package from the “Download Agents” link on the TMTM launch page.
* Extract the agent package on the agent machine.
* Make sure the permissions are good.
* Start the Extensible Agent (qpea) but don’t start the Configuration Agent (agent) yet.

 

The above steps are for a basic agent install. The TMTM Agent and Extensions guide covers all of the options available.

 

If you are using policies to set preferences, you can apply the policies to the agent using the Management Console (in the Policies tab, find the agent, right-click the agent and “Apply Polices”).   Otherwise, use the agentpref import option to restore the agent and extension preferences.

 

Now that preferences have been restored, start the Configuration Agent (agent).

 

If extension packages have previously been distributed to the agent, and the directories and files in the directory specified by the MQS_HOME environment variable remain, you may install extensions from the packages as was done before.    Otherwise, the packages will be deployed again and once those deployments have completed you may install them.   Check the “Package Distributions” tab of the MC for their status.

 

Finally, after installing the extension packages, restore the configuration files previously backed up or re-configure them from your own preserved information.   You may now start the extensions.

 

If you are using discovery and policies to register objects for monitoring and you are only using the WebSphere MQ extension than nothing more is required.   Otherwise, use the restore option to re-register the objects for monitoring so the agent is in sync with the services.   You may select the agent in the tree on the Object Repository tab of the MC.  Right click and select “Restore”.    You may also use the repomgr tool to perform the restore.    Either will re-register any objects currently registered for monitoring. 


Notes
If you restore an agent that was not newly installed, keep in mind this is not a full sync.   For example, if for some reason the agent thinks that an object is not registered for monitoring but the service’s object repository does, then that object will become registered for monitoring.   Similarly, if the agent thinks that an object is registered for monitoring and the service’s object repository does not, then that object will remain out of sync.    The reconfirm feature from the MC or repomgr command line tool can be used in this case.    The agent’s perception of what is registered for monitoring is used.    Under normal circumstances a reconfirm is not needed and should rarely be used but may be recommended by BMC Technical support.