This extension monitors the MySQL server. This extension should be used with standalone Java Machine Agents.
Please make sure to not use tab (\t) while editing yaml files. You may want to validate the yaml file using a yaml validator http://yamllint.com/
Configure the MySQL servers by editing the config.yml file in
mySQL: - name: "Local MySQL" host: "localhost" port: 3388 user: "root" #Provide password or passwordEncrypted and encryptionKey password: "root" passwordEncrypted: encryptionKey: #Slave machines slave: - name: "Local Slave" host: "192.168.0.108" port: 3306 user: "root" #Provide password or passwordEncrypted and encryptionKey password: passwordEncrypted: "IGVtC9eudmgG8RDjmRjGPQ==" encryptionKey: "welcome" #timeout for the metric collector thread threadTimeout: 30 # number of concurrent tasks numberOfThreads: 5 #prefix used to show up metrics in AppDynamics metricPrefix: "Custom Metrics|MySQL|"
Configure the path to the config.yaml 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" /> </task-arguments>
On Windows, please specify the absolute path to the config.yml.
To avoid setting the clear text password in the config.yml, please follow the process below to encrypt the password
java -cp appd-exts-commons-1.1.2.jar com.appdynamics.extensions.crypto.Encryptor encryptionKey myPassword
In metric browser metrics will be displayed in [Custom Metrics|MySQL|
|Bytes between Client-Server/Sent|
|Bytes between Client-Server/Received|
|Operations/InnoDB/Total Rows Queried|
|Operations/InnoDB/Total Rows Deleted|
|Operations/InnoDB/Total Rows Updated|
|Operations/InnoDB/Total Rows Inserted|
|Sort/Spill to Disk|
|Cache/Key Cache/Read Hits|
|Cache/Key Cache/Write Hits|
|InnoDB/Cache/Buffer Pool/% Writes Waited|
|InnoDB/Row Locks/Row Lock Time|
|InnoDB/Row Locks/Avg Time Waited|
|Binary Log/% Transactions too Big|
|Tables/Temp/% Created on Disk|
|% Connections Used|
|Total Active Threads|
|Total Cached Threads|
|Total Connected Threads|
|% Key Cache Used|
|% Query Cache Used|
|% InnoDB Buffer Pool Used|
|Log File % of InnoDB Buffer Pool|
|Max Used Connections|
Replication stats will be available when "slave"'s are configured in the config.yml
|Slave IO Running|
Verify Machine Agent Data: Please start the Machine Agent without the extension and make sure that it reports data. Verify that the machine agent status is UP and it is reporting Hardware Metrics.
config.yml:Validate the file here. http://www.yamllint.com/
The config cannot be null : This usually happens when on a windows machine in monitor.xml you give config.yaml file path with linux file path separator
/. Use Windows file path separator
monitors\MySQLMonitor\config.yaml. On Windows, please specify absolute file path.
Metric Limit: Please start the machine agent with the argument -Dappdynamics.agent.maxMetrics=5000 if there is a metric limit reached error in the logs. If you don't see the expected metrics, this could be the cause.
Debug Logs:Edit the file, /conf/logging/log4j.xml and update the level of the appender com.appdynamics to debug . Let it run for 5-10 minutes and attach the logs to a support ticket
Always feel free to fork and contribute any changes directly via GitHub.
For any questions or feature request, please contact AppDynamics Center of Excellence.
|7 Feb 2017|