This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.
TrueSight Middleware Monitor
BMC Middleware and Transaction Management
BMC TrueSight Middleware and Transaction Monitor BMC Middleware and Transaction Management BMC Middleware Management - Performance and Availability BMC Middleware Management - Transaction Monitoring BMC Application Transaction Tracing
How to migrate / copy event templates from one server environment to a different server environment, how to accomplish this?
Background information: An event template or event rule contains the following.
- Event Trigger
- Event Action Pipeline
- Can also contain a Event Action Clear Pipeline
- Association with monitored object
While the Rule/Template and the associations are stored in the database, the Actions and Trigger are stored as xml files in the Media repository, if triggers or actions are not expected with the rule or template , it might lead into inconsistencies if you import a event template or rule, if the trigger or action do not exist in the environment where you run the import.
This example will mqsexport all rules, actions and triggers staring with PRD prefix and exports it to the event-rules.zip in the installation directory.
The parameter <user>, has to be replaced with an existing Management Console administrator user, at example the user SA , the command prompts for a password after run.
Export command example
mqsexport --event-rule "PRD.*" --event-trigger "PRD.*" --event-action-pipeline "PRD.*" event-rules.zip <user>
This command is doing the same for event templates
mqsexport --event-template "PRD.*"--event-trigger "PRD.*" --event-action-pipeline "PRD.*" event-rules.zip <user>
On Unix and Linux system, depending the shell which is used, the double quotes in the command example above must be replaced with single quotes.
Please note that the mqsexport will export all associations, if the association with the same object names does not exist in the environment where you want to mqsimport the zip file. The import of an event rule will fail, while the templates are imported but without any associations.
The mqsimport command is used to import the zip file exported with the command example above, this command will export everything which is in the zip file, but does not overwrite any existing objects in the target environment.
Import command example
mqsimport event-rules.zip <user>
You can import this package for a rule or template and create the associations with a translation file, by using the -t switch, this could be used to translate the non existing association to objects that exist in the new environment.
If you want to overwrite existing objects with -f parameter, be cautious with that since it overwrites everything from the zip file in the target environment.
For more details on the mqsexport and mqsimport utilities, how to use translation files and detailed information about all parameters please consult the product Services Reference documentation, chapter: Management Console Environment Export and Import.