This extension monitors the MySQL server. This extension should be used with standalone Java Machine Agents.
<your-machine-agent-dir>/monitors
.Please place the extension in the "monitors" directory of your Machine Agent installation directory. Do not place the extension in the "extensions" directory of your Machine Agent installation directory.
Please make sure to not use tab (\t) while editing yaml files. You may want to validate the yaml file using a yaml validator
Please follow section 2.1 of the Document to set up metric prefix.
#Metric prefix used when SIM is enabled for your machine agent
#metricPrefix: "Custom Metrics|MySQL|"
#This will publish metrics to specific tier
#Instructions on how to retrieve the Component ID can be found in the Metric Prefix section of https://community.appdynamics.com/t5/Knowledge-Base/How-do-I-troubleshoot-missing-custom-metrics-or-extensions/ta-p/28695
metricPrefix: "Server|Component:<TIER ID>|Custom Metrics|MySQL|"
Configure the MySQL servers by editing the config.yml file in <MACHINE_AGENT_HOME>/monitors/MySQLMonitor
.
mySQL:
- name: "Local MySQL"
host: "localhost"
port: 3306
user: "root"
password: "root"
#Provide password or passwordEncrypted and encryptionKey
#encryptedPassword:
#Slave machines
slave:
- name: "Local Slave"
host: "192.168.0.108"
port: 3388
user: "root"
#password:
#Provide password or passwordEncrypted and encryptionKey
encryptedPassword: "IGVtC9eudmgG8RDjmRjGPQ=="
encryptionKey: "welcome"
Always include 1 thread per server + 1 to run main task.
Please copy all the contents of the config.yml file and go here. On reaching the website, paste the contents and press the “Validate YAML” button.
Configure the path to the config.yml and metrics.xml file by editing the in the monitor.xml file in the <MACHINE_AGENT_HOME>/monitors/MySQLMonitor/
directory.
Below is the sample
<task-arguments>
<!-- config file-->
<argument name="config-file" is-required="true" default-value="monitors/MySQLMonitor/config.yml" />
<argument name="metric-file" is-required="true" default-value="monitors/MySQLMonitor/metrics.xml" />
</task-arguments>
On Windows, please specify the absolute path to the config.yml.
Provide path to connector jar in classpath
<classpath>mysql-monitoring-extension.jar;/path/to/your/connector.jar</classpath>
You can modify metrics of your choice by modifying the provided metrics.xml file. Please look at how the metrics have been defined and follow the same convention when modifying any metrics. You do have the ability to also select your Rollup types for each metric as well as set an alias name that you would like to display on the metric browser.
Metric Name |
---|
Bytes between Client-Server/Sent |
Bytes between Client-Server/Received |
Connections/Total Attempts |
Connections/Total Failed+Aborted |
InnoDB/Bytes Read |
InnoDB/Bytes Written |
InnoDB/File Synchronization |
Operations/InnoDB/Total Rows Queried |
Operations/InnoDB/Total Rows Deleted |
Operations/InnoDB/Total Rows Updated |
Operations/InnoDB/Total Rows Inserted |
Operations/Total Requests |
Operations/Total Inserts |
Operations/Total Queries |
Operations/Total Deletes |
Operations/Total Updates |
Tables/Opened |
Tables/Temp Created |
Transactions/Total |
Transactions/Rolled Back |
Transactions/Committed |
Sort Total |
Metric Name |
---|
Index/Single Table |
Index/Joins |
Sort/Spill to Disk |
Query/Slow |
Cache/Key Cache/Read Hits |
Cache/Key Cache/Write Hits |
Cache/Query Cache/Hits |
Cache/Threads/Hits |
InnoDB/Cache/Buffer Pool/Hits |
InnoDB/Cache/Buffer Pool/% Writes Waited |
InnoDB/Row Locks/Waiting |
InnoDB/Row Locks/Row Lock Time |
InnoDB/Row Locks/Avg Time Waited |
Table Locks/Waited |
Binary Log/% Transactions too Big |
Tables/Temp/% Created on Disk |
Metric Name |
---|
% Connections Used |
Total Active Threads |
Total Cached Threads |
Total Connected Threads |
Open Tables |
% Key Cache Used |
% Query Cache Used |
% InnoDB Buffer Pool Used |
Log File % of InnoDB Buffer Pool |
Opened Files |
Slow Queries |
Max Used Connections |
Aborted Connections |
Aborted Clients |
Replication stats will be available when "slave"'s are configured in the config.yml
Metric Name |
---|
Slave IO Running |
SQL Delay |
Workbench is an inbuilt feature provided with each extension in order to assist you to fine tune the extension setup before you actually deploy it on the controller. Please review the following document on How to use the Extensions WorkBench.
Please visit Encryption Guidelines to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.
Please follow the steps listed in this troubleshooting-document in order to troubleshoot your issue. These are a set of common issues that customers might have faced during the installation of the extension.
Always feel free to fork and contribute any changes directly via GitHub.
Name | Version |
---|---|
Extension Version | 2.1.0 |
Product Tested On | 8.0.25 |
Last Update | 10/08/2021 |
Change List | ChangeLog |
Note: While extensions are maintained and supported by customers under the open-source licensing model, they interact with agents and Controllers that are subject to AppDynamics’ maintenance and support policy. Some extensions have been tested with AppDynamics 4.5.13+ artifacts, but you are strongly recommended against using versions that are no longer supported.
Owner
Contributors
Categories
Products
AppDynamicsProgramming Languages
JavaLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community