DEV Community

Cover image for OEM : migrate monitoring templates
Prasenjit Mahato
Prasenjit Mahato

Posted on

OEM : migrate monitoring templates

Query to find the monitoring templates currently used on old server

SELECT TEMPLATE_NAME,TARGET_TYPE FROM SYSMAN.MGMT_TEMPLATES;

Enter fullscreen mode Exit fullscreen mode

Old Server : OEM 13.5.0.24

[oracle@oldserver1 ~]$ $OMS_HOME/bin/emcli login -username=sysman
Enter password

Login successful
[oracle@oldserver1 ~]$
[oracle@oldserver1 ~]$ $OMS_HOME/bin/emcli export_template -name="att_oracle_instance" -target_type=oracle_database -output_file=/home/oracle/att_oracle_instance.template.xml
File(s) exported successfully.
[oracle@oldserver1 ~]$ $OMS_HOME/bin/emcli export_template -name="att_rac_database" -target_type=rac_database -output_file=/home/oracle/att_rac_database.template.xml
File(s) exported successfully.
[oracle@oldserver1 ~]$

Enter fullscreen mode Exit fullscreen mode

Copy the xml file /home/oracle/att_oracle_instance.template.xml to the new server.

On new server, remove the entries for the metric extension.

New Server : 24.1.0.5

[oracle@newserver1 ~]$ $OMS_HOME/bin/emcli login -username=sysman
Enter password

Login successful
[oracle@newserver1 ~]$ $OMS_HOME/bin/emcli import_template -files=att_oracle_instance.template.xml
File(s) imported successfully.
[oracle@newserver1 ~]$ $OMS_HOME/bin/emcli import_template -files=att_rac_database.template.xml
File(s) imported successfully.

Enter fullscreen mode Exit fullscreen mode

Removing the entries of the metric extension allows to create the monitoring template without importing ME

[oracle@newserver1  ~]$ $OMS_HOME/bin/emcli import_template -files=att_oracle_instance.template.xml
This Monitoring Template Export file att_oracle_instance.template.xml contains information related to the following Metric Extension(s) : ME$ForceLoggingNoRac(Version1), ME$check_database_backup(Version4) , ME$fra_space_norac(Version2) , ME$manager_max_job_norac(Version1) , ME$memory_resize_errors(Version1) , ME$streams_apply_errors(Version1) , ME$stuck_autotask_windows(Version2) , which do not exist in the repository or are not in Published status. Proceed with this operation only after these Metric Extension(s) are already imported into EM and Published.

Enter fullscreen mode Exit fullscreen mode

Top comments (0)