MySQL plugin for Oracle Enterprise Manager 13c Cloud Control

Posted in: MySQL, Oracle, Technical Track

This is the same plugin that Alex Gorvachev created back in the day. I’ve simply modified it to be compatible with both 12c and 13c versions.

I created this in response to a comment on the blog about issues deploying the plugin in OEM 13c. There is also a note in MOS “EM 13c: Adding a MySQL Instance in Enterprise Manager 13c Fails with Error: oracle.sysman.emSDK.agent.client.exception.NoSuchMetricException: the Load metric does not exist (Doc ID 2160785.1)“.

This version has been tested with OEM 13cR2 and OEM 12cR3, so it should be working in all the versions in between except for bugs.

Caveats

During the development of this new version, I’ve found that MySQL 8 has changed the default authentication plugin, being now caching_sha2_password as explained in this blog post.

What does this mean for the plugin? Well, the Perl DB module version 5.10 used to connect to the MySQL instance. It does not support this new authentication mode and the console returns the following error message:

“Client does not support authentication protocol requested by server; consider upgrading MySQL client …”

In order to work around this issue without compromising the enhanced security of the latest MySQL version, I suggest the monitoring user be created as follows:

create user [email protected] identified with mysql_native_password by '*********************';
grant process, replication client on *.* to [email protected];

Also, this version of the plugin requires Perl 5.10+, which is the base version distributed with OEM 12cR3.

Finally, due to the nature of the changes in the plugin required for it to be compatible with OEM 13c, if you have a previous version of the plugin deployed in your system it has to be removed, and with it all the MySQL monitored targets. This should not be the case unless you are upgrading to 13c which, most probably, will render the plugin unusable.

 

Download

Below is the new zipped OPAR file to be uploaded and deployed to the management server and the management agents as required.

Download Plugin

 

Installation guide

First of all, if you have an older version of the plugin deployed, just keep it unless you have a very good reason to deploy this new version, such as upgrading to 13c. There are no changes in functionality, just the compatibility.

The steps below have been obtained from the Oracle OEM 12cR5 CC documentation.

Upload the plugin file to OMS

The first step is to upload the OPAR file to the OMS Software Library repository. You will need a working EMCLI setup and we recommend to set it up in the OMS server itself. When EMCLI is working, create a session to the OMS, sync the repository and upload the OPAR file.

$ emcli login -username=sysman
Enter password :

Login successful

$ emcli sync
Synchronized successfully

$ emcli import_update -file=/home/oracle/12.1.0.3.0_pythian.mysql_.prod_2000_0.opar -omslocal
Processing update: Plug-in - MySQL plug-in by Alex Gorbachev, The Pythian Group                  
Successfully uploaded the update to Enterprise Manager. Use the Self Update Console to manage this update.

Deploy the plugin

Once the OPAR file has been uploaded to the OMS repository, you can start deploying it. First to the OMS Management Servers and then to the Management Agents.
There are two ways to accomplish this task: Using the OEM Console and using EMCLI.

Deploying the plugin using the OEM Console

To use the OEM Console go to Setup -> Extensibility -> Plug-ins page. Once there, expand the Databases section and select the Pythian MySQL Plugin entry. Now either right click and select Deploy on option or use the top menu Deploy on option to initiate the deployment wizard.

See the screenshots below showing the process to deploy the plugin (version 12.1.0.1) on a management server.

Main plugin page

Main plugin page

Deploy wizard step 1

Deploy wizard step 1

Deploy wizard step 2

Deploy wizard step 2

Deploy wizard step 3

Deploy wizard step 3

Deploy wizard step 4

Deploy wizard step 4

Deploy wizard step 5

Deploy wizard step 5

Deployment final result

Deployment final result

Deploying the plugin using EMCLI

If you, like me, are not a fan of GUIs and graphical consoles or simply don’t have access to it, you can use EMCLI to deploy the plugin both to the management servers and the agents.

Initiate the process for the management server.

$ time emcli deploy_plugin_on_server -plugin=pythian.mysql.prod
Enter repository DB sys password:                              

Performing pre-requisites check... This will take a while.
Prerequisites check succeeded                             
Deployment of plug-in on the management servers is in progress
Use "emcli get_plugin_deployment_status -plugin=pythian.mysql.prod" to track the plug-in deployment status.

real    0m56.396s
user    0m1.822s 
sys     0m0.212s 

Monitor until completion:

$ emcli get_plugin_deployment_status -plugin=pythian.mysql.prod
Plug-in Deployment/Undeployment Status                         

Destination          : Management Server - emcc.example.com:4889_Management_Service
Plug-in Name         : Pythian MySQL Plugin                                        
Version              : 12.1.0.3.0                                                  
ID                   : pythian.mysql.prod           
Content              : Plug-in                                                     
Action               : Deployment                                                  
Status               : Deploying                                                   
Steps Info:                                                                        
---------------------------------------- ------------------------- ------------------------- ---------- 
Step                                     Start Time                End Time                  Status     
---------------------------------------- ------------------------- ------------------------- ---------- 
Submit job for deployment                8/6/18 7:02:41 AM EDT     8/6/18 7:02:41 AM EDT     Success    

Initialize                               8/6/18 7:02:44 AM EDT     N/A                       Running    

---------------------------------------- ------------------------- ------------------------- ---------- 

$ emcli get_plugin_deployment_status -plugin=pythian.mysql.prod                                         
Plug-in Deployment/Undeployment Status                                                                  

Destination          : Management Server - emcc.example.com:4889_Management_Service
Plug-in Name         : Pythian MySQL Plugin                                        
Version              : 12.1.0.3.0                                                  
ID                   : pythian.mysql.prod           
Content              : Plug-in                                                     
Action               : Deployment                                                  
Status               : Deploying                                                   
Steps Info:                                                                        
---------------------------------------- ------------------------- ------------------------- ---------- 
Step                                     Start Time                End Time                  Status     
---------------------------------------- ------------------------- ------------------------- ---------- 
Submit job for deployment                8/6/18 7:02:41 AM EDT     8/6/18 7:02:41 AM EDT     Success    

Initialize                               8/6/18 7:02:44 AM EDT     8/6/18 7:03:00 AM EDT     Success    

Install software                         8/6/18 7:03:00 AM EDT     8/6/18 7:03:02 AM EDT     Success    

Validate plug-in home                    8/6/18 7:03:04 AM EDT     8/6/18 7:03:04 AM EDT     Success    

Perform custom preconfiguration          8/6/18 7:03:04 AM EDT     8/6/18 7:03:05 AM EDT     Success    

Check mandatory patches                  8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success    

Generate metadata SQL                    8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success    

Preconfigure Management Repository       8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success    

Preregister DLF                          8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success    

OPSS jazn policy migration               8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success

Configure Management Repository          8/6/18 7:03:05 AM EDT     N/A                       Running

Register DLF                             8/6/18 7:03:05 AM EDT     N/A                       Running

---------------------------------------- ------------------------- ------------------------- ----------

$ emcli get_plugin_deployment_status -plugin=pythian.mysql.prod
Plug-in Deployment/Undeployment Status

Destination          : Management Server - emcc.example.com:4889_Management_Service
Plug-in Name         : Pythian MySQL Plugin
Version              : 12.1.0.3.0                                                  
ID                   : pythian.mysql.prod           
Content              : Plug-in
Action               : Deployment
Status               : Success
Steps Info:
---------------------------------------- ------------------------- ------------------------- ----------
Step                                     Start Time                End Time                  Status
---------------------------------------- ------------------------- ------------------------- ----------
Submit job for deployment                8/6/18 7:02:41 AM EDT     8/6/18 7:02:41 AM EDT     Success

Initialize                               8/6/18 7:02:44 AM EDT     8/6/18 7:03:00 AM EDT     Success

Install software                         8/6/18 7:03:00 AM EDT     8/6/18 7:03:02 AM EDT     Success

Validate plug-in home                    8/6/18 7:03:04 AM EDT     8/6/18 7:03:04 AM EDT     Success

Perform custom preconfiguration          8/6/18 7:03:04 AM EDT     8/6/18 7:03:05 AM EDT     Success

Check mandatory patches                  8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success

Generate metadata SQL                    8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success

Preconfigure Management Repository       8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success

Preregister DLF                          8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success

OPSS jazn policy migration               8/6/18 7:03:05 AM EDT     8/6/18 7:03:05 AM EDT     Success

Configure Management Repository          8/6/18 7:03:05 AM EDT     8/6/18 7:04:58 AM EDT     Success

Register DLF                             8/6/18 7:03:05 AM EDT     8/6/18 7:05:01 AM EDT     Success

Register metadata                        8/6/18 7:05:01 AM EDT     8/6/18 7:05:09 AM EDT     Success

Perform custom postconfiguration         8/6/18 7:05:09 AM EDT     8/6/18 7:05:09 AM EDT     Success

Update inventory                         8/6/18 7:05:09 AM EDT     8/6/18 7:05:11 AM EDT     Success

---------------------------------------- ------------------------- ------------------------- ----------

Once the plugin has been deployed to the server, it is time to deploy it to the agents. We start by listing the existing management agents.

$ emcli get_targets -target="oracle_emd"
Status  Status           Target Type           Target Name
 ID
1       Up               oracle_emd            emcc.example.com:3872

Then we deploy the plugin to the agents we want, only one in this case.

$ time emcli deploy_plugin_on_agent -agent_names=emcc.example.com:3872 -plugin=pythian.mysql.prod
Agent side plug-in deployment is in progress
Use "emcli get_plugin_deployment_status -plugin=pythian.mysql.prod" to track the plug-in deployment status.

real    0m1.637s
user    0m1.271s
sys     0m0.089s

Now we monitor the deployment status until it completes. Note: I am using the watch command to automatically execute the query every 15 seconds but it may not be available in your OS distribution so simply execute the emcli command manually after a few minutes to review the status.

$ watch -n 15 emcli get_plugin_deployment_status -plugin=pythian.mysql.prod

Plug-in Deployment/Undeployment Status

Destination          : Management Agent - emcc.example.com:3872
Plug-in Name         : Pythian MySQL Plugin
Version              : 12.1.0.3.0                                                  
ID                   : pythian.mysql.prod           
Content              : Plug-in
Action               : Deployment
Status               : Deploying
Steps Info:
---------------------------------------- ------------------------- ------------------------- ----------
Step                                     Start Time                End Time                  Status
---------------------------------------- ------------------------- ------------------------- ----------
Submit job for deployment                8/8/18 10:09:34 AM EDT    8/8/18 10:09:34 AM EDT    Success

Initialize                               8/8/18 10:09:38 AM EDT    8/8/18 10:09:46 AM EDT    Success

Validate Environment                     8/8/18 10:09:47 AM EDT    8/8/18 10:09:47 AM EDT    Success

Install software                         8/8/18 10:09:47 AM EDT    8/8/18 10:09:48 AM EDT    Success

Attach Oracle Home to Inventory          8/8/18 10:09:49 AM EDT    8/8/18 10:10:03 AM EDT    Success

Configure plug-in on Management Agent    8/8/18 10:10:03 AM EDT    N/A                       Running

Update inventory                         8/8/18 10:10:23 AM EDT    N/A                       Running

---------------------------------------- ------------------------- ------------------------- ----------


Plug-in Deployment/Undeployment Status

Destination          : Management Agent - emcc.example.com:3872
Plug-in Name         : Pythian MySQL Plugin
Version              : 12.1.0.3.0                                                  
ID                   : pythian.mysql.prod           
Content              : Plug-in
Action               : Deployment
Status               : Success
Steps Info:
---------------------------------------- ------------------------- ------------------------- ----------
Step                                     Start Time                End Time                  Status
---------------------------------------- ------------------------- ------------------------- ----------
Submit job for deployment                8/8/18 10:09:34 AM EDT    8/8/18 10:09:34 AM EDT    Success

Initialize                               8/8/18 10:09:38 AM EDT    8/8/18 10:09:46 AM EDT    Success

Validate Environment                     8/8/18 10:09:47 AM EDT    8/8/18 10:09:47 AM EDT    Success

Install software                         8/8/18 10:09:47 AM EDT    8/8/18 10:09:48 AM EDT    Success

Attach Oracle Home to Inventory          8/8/18 10:09:49 AM EDT    8/8/18 10:10:03 AM EDT    Success

Configure plug-in on Management Agent    8/8/18 10:10:03 AM EDT    8/8/18 10:10:29 AM EDT    Success

Update inventory                         8/8/18 10:10:23 AM EDT    8/8/18 10:10:29 AM EDT    Success

---------------------------------------- ------------------------- ------------------------- ----------

Adding MySQL targets

Once you are done with the deployment on both the management servers and the management agents you can add the MySQL targets. The current version of the plugin does not include the discovery scripts, so you have to add the targets manually using the OEM console.

In the console, got to Setup -> Add Target -> Add targets manually. Click on Add target Declaratively and fill in the details. Pay special attention to the username, server, port and socket if these are not the default.

See the screenshots below for a basic setup:

Add Targets Manually page

Add Targets Manually page

Select the monitored Host where the MySQL instance exists and the target type "MySQL Instance"

Select host where the MySQL instance exists and the target type “MySQL Instance”

Enter the MySQL instance details.

Enter the MySQL instance details.

Confirmation notice

Confirmation notice

Now you should be able to list the MySQL targets in the All Targets page.

MySQL targets in the All Targets page

MySQL targets in the All Targets page

If the target appears down, and you know for sure that it is up, review the Monitoring Configuration of the target for correct user, host, password, socket, etc.

After a few minutes, the agent has collected data and OEM will be able to populate the MySQL monitoring target charts as below:

MySQL target charts

MySQL target charts

email
Want to talk with an expert? Schedule a call with our team to get the conversation started.

About the Author

Data Project Engineer
First of all father, then husband and finally Oracle database consultant. I love technology in general and managing data in particular. Trying to learn one new thing every day.

30 Comments. Leave new

Hello – I heard that this only supports MySQL Enterprise Edition Targets. Is this true or can I also add MySQL Community Edition Targets?

Reply
Jose Rodriguez
October 23, 2018 8:35 am

Hi Jeremy,
this is not the official Oracle plugin, it is a community one and, as such, is has no restrictions as to the MySQL edition target. It uses simple connectivity and basic queries to obtain the data.
If you try it and find any issues, please do let us know so we can take a look and fix them.
Thanks.

Reply

Excellent! Thank you! I want to give this a try for sure.

Reply

If you are running Oracle Agent and MySQL Agent on the same server, can they use the same 3872 port? Or do they need separate ports?

Reply
Jose Rodriguez
January 7, 2019 9:47 am

Not sure what do you mean by Oracle Agent and MySQL Agent but given that you mention port 3872 I’ll assume that you are talking about the OEM Agent. The answer to your question is: there should be only one OEM Agent running on a given host and it should detect both Oracle and MySQL targets, or you can add them manually once it is deployed, so there is no port conflict here.
If my assumption is incorrect for some the reason, then the answers is no, two different agents cannot listen on the same port, unless they are listening on different IP addresses.
I hope this helps.

Reply

What is the network port requirement to enable this monitoring if OEM and Mysql DB is running between a firewall

Reply

Hi, Is this Plugin for Free. Can we use it to monitor the targets.

Reply

Is this plugin for Free. Can we use it to monitor the Mysql targets.

Reply
Jose Rodriguez
April 23, 2019 8:11 am

Hi kalyan, you can read the EULA terms here: https://pythian.com/uncategorized/the-mysql-plug-in-for-oracle-grid-control-download/
And yes, it is intended for MySQL targets.
Should you have any other questions, let me know.

Reply

hi,

Thanks for your efforts with this plugin. This is definitely a great option for the community version installs. Is this plugin certified for OEM 13.3 ?

Reply
Jose Rodriguez
May 14, 2019 8:55 am

It hasn’t been tested/certified against 13.3 but I suggest you try it and let us know if there is any problem with, which I don’t expect to be.

Reply

Hello
I tried to use it with cloud control 13.1 and i have a problem with a dependancy
emcli import_update -file=/home/oracle/mariadb/12.1.0.3.0_pythian.mysql_.prod_2000_0.opar -omslocal -force
Update could not be imported because of following reasons:
Dependency not met – This plug-in is not certified on the Enterprise Manager Platform on which it is being imported..

Do you have the same problem ?
Thank you

Reply

Trying to deploy Pythian_Mysql plugin on the agent but it is not crossing the below step . Did we need to follow any another steps to follow this

[email protected]*******:/s01/app/oracle/Middleware13cR2/bin> ./emcli get_plugin_deployment_status -plugin=pythian.mysql.prod
Plug-in Deployment/Undeployment Status

Destination : Management Agent – c*****r.int.*********s.com:3872
Plug-in Name : Pythian MySQL Plugin
Version : 12.1.0.3.0
ID : pythian.mysql.prod
Content : Plug-in
Action : Deployment
Status : Deploying
Steps Info:
—————————————- ————————- ————————- ———-
Step Start Time End Time Status
—————————————- ————————- ————————- ———-
Submit job for deployment 11/29/19 3:07:45 AM CST 11/29/19 3:07:46 AM CST Success

—————————————- ————————- ————————- ———-
[email protected]*******v:/s01/app/oracle/Middleware13cR2/bin>

I had deployed the plugin using the below command.

[email protected]***v:/s01/app/oracle/Middleware13cR2/bin> ./emcli deploy_plugin_on_agent -agent_names=c****r.int.t*******s.com:3872 -plugin=pythian.mysql.prod
Agent side plug-in deployment is in progress
Use “emcli get_plugin_deployment_status -plugin=pythian.mysql.prod” to track the plug-in deployment status.
[email protected]*****v:/s01/app/oracle/Middleware13cR2/bin>

Reply

Does anyone know if I need to pay for Oracle Cloud Control license on a host with open source mySQL db targets?

Reply

Hi,
Thanks for this plugin.
I installed it on 13.3 OMS and had the metrics collected but the home page is not shown (no graphs just a blank page).
Thanks.

Reply
Jose Rodriguez
April 30, 2020 2:55 am

So your deployment got stuck in the agent deployment step? Take a look at the agent side logs, there may be some clue as to what is going on there.

Reply

Hello, friends!
I have a problem..can’t find pythian.mysql.prod.oms.plugin_12.1.0.1.2 (need exactly this version).
I’m doing the OEM 13.2.0.0. migration to another host and have to deploy exactly this plug-in..
Log:
ERROR pluginca.PluginCADriver – EM-04031: Server-side plug-in deployment failed. A file or directory /u01/app/oracle/mw_13201/oms/plugins/pythian.mysql.prod.oms.plugin_12.1.0.1.2 on the host … is not accessible
If you have it, please, send me or give me a link..

Best regards.

Reply
Jose Rodriguez
November 30, 2020 3:52 am

Hi Sergey,
unfortunately we don’t have that file anymore. I can provide you with version 12.1.0.1.0 and 12.1.0.2.0, although if you don’t have too many targets it may be a good idea to use the latest version of the plugin.

Reply

Hi,
I installed it on 13.4 and I got this erro “Error retrieving integration details” on the home page.

Thanks,

Reply

Hi,
I installed it on 13.4 version, and I got this error ” Error retrieving integration details” on the home page.

Thanks

Reply
Jose Rodriguez
December 8, 2020 1:12 pm

Hi ella,
unfortunately this plugin hasn’t been tested on 13.4 so I cannot help you at the moment.
I’ll make sure to update this post once the validation for 13.4 is complete, although it won’t be soon.
Sorry.

Reply

Hi
i got the same error with ella . that mean when i install this plugin into the 13.4 OEM, the page result
” Error retrieving integration details” , and beside that there are some error inside the agemt_inst/sysman/log/gcagent.log this this:

2020-12-14 12:33:14,658 [238:BCEAC55C] WARN – Property [password] is defined as ‘credential’ but was missing an ENCRYPTED attribute in target mysql.xx.41 defintion
2020-12-14 12:33:14,674 [458:C2618DFB:GC.DPExecutor.6 (CDynamic:mysql.xx.41)] INFO – Loading target: [mysql.xx41$6] dynamic info
2020-12-14 12:33:14,687 [238:BCEAC55C] INFO – >>> Reporting response: AddTargetsResponse (request id 1) <<<
2020-12-14 12:33:14,714 [361:231D773D:GC.Executor.102 (mysql:xxx.41:Response)] INFO – Target [mysql.QA_MYSQL_71.41] is marked as in DOWN state
2020-12-14 12:33:14,714 [361:231D773D] INFO – Target [mysql.xx.41] is marked as in DOWN state
2020-12-14 12:33:31,608 [106:905DEBE9] INFO – attempting another heartbeat
2020-12-14 12:34:31,800 [128:B6D626C4:GC.SysExecutor.6 (Ping OMS)] INFO – attempting another heartbeat
2020-12-14 12:35:31,985 [131:CDEB16E1:GC.SysExecutor.9 (Ping OMS)] INFO – attempting another heartbeat

could you pls tell me what should i do now

Reply
Jose Rodriguez
December 14, 2020 9:36 am

I am sorry I cannot help at this moment. The plugin has not been validated with OEM v13.4 but it looks like a problem with the target credentials is hitting you, although I can’t say if this is due to the plugin or something else.

Reply

Thanks Jose
i got your advise and find out that the time out parameter make this happen
then after change the time out from 10 to 100 its ok
plugins/pythian.mysql.prod.agent.plugin_12.1.0.3.0/scripts/emx/mysql/mysql_oem.pm>
unixsocket => ($ENV{‘MYSQL_OEM_SOCKET’}),
port => ($ENV{‘MYSQL_OEM_PORT’}),
user => ($ENV{‘MYSQL_OEM_USER’}),
password => ($ENV{‘MYSQL_OEM_PASSWORD’}),
timeout => 100
);

but beside that the OEM 13.4c still stuck in Error retrieving integration details”” and cannot load the data information
https://imgur.com/xlYJCpV
i’m waiting for your new upgrade asas
thank alot Jose ! have a good day

we tested on 13.4 , same error

Reply

Hi,

We are using this plugin – 12.1.0.2.0 with OEM 13.2 which is working fine as expected.
We have planned to upgrade OEM to 13.4 this weekend and only 12.1.0.3 plugin is available for download.
Can we please get the plugin with version 12.1.0.2 as that’s working for us.

Will plan to upgrade the plugin later once 13.4 OEM upgrade is completed.
Thanks in advance.

Reply

Great article, helped me a lot! But I’m having the same issue as all others on 13.4… “Error retrieving integration details” :-(
I tried using 12.1.0.2 and 12.1.0.3 versions of the plug-in, but no difference.
Really hope this gets fixed soon…

Reply

@Jose Rodriguez
thanks for maintaining this Plugin which has been setup by Alex Gorvachev in the past. This and his early presentation on EM plugin development have been a good and valuable learning resource for me too, besides the official OEM Extensibility Developers Guide documentation.
Maybe you want to explicitly state that this is not only useful for MySQL Database users but also the users of MariaDB.
Keep up the good work and thanks for providing this plugin for the past ten+ years!

@Ron
Regarding licensing you should verify the details for the
Oracle Enterprise Manager Cloud Control 13.4
Licensing Information User Manual
Chaper 9 Enterprise Manager Base Functionality
https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.4/oemli/enterprise-manager-base-functionality.html

@Sergey,
you may be able to uninstall the plugin on both OEM agent(s!) and OMS using some emcli/emctl commands. That way you can install it after the upgrade / migration if loosing the historical monitoring data is acceptable to you.

@duc,
regarding the password target property you probably need to update it to be ENCRYPTED=TRUE in the metadata/target.xml. I assume this should be enforced by the explicit warning in your first post above.

Kind regards,
Stefan

Reply

Error retrieving integration details in 13.4

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *