forked from Appdynamics/SQLMonitor
-
Notifications
You must be signed in to change notification settings - Fork 0
svenhoff/SQLMonitor
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
SQL-monitoring-extension ============================== The purpose of this monitor is to use arbitrary queries against a SQL database as metrics for AppDynamics. The connection to the database is via JDBC. One instance of the SQLMonitor will connect to one JDBC Datasource, if multiple Datasources are required run multiple instances of SQLMonitor.! Installation ============================== 1. Download and unzip SQLMonitor.zip from AppSphere. 2. Copy the SQLMonitor directory to `<MACHINE_AGENT_HOME>/monitors`. You will need to provide your own JDBC driver for the database you want to connect to. Put the driver JAR file in the same directory and add it to the classpath element in the monitor.xml file.! Configuration ============================== ###Note 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/ 1. Configure the SQL server instances by editing the config.yaml file in `<MACHINE_AGENT_HOME>/monitors/SQLMonitor/`. Below is the format • server - The SQL server name • driver - The class name of the JDBC driver to use e.g. com.mysql.jdbc.Driver! • connectionString - The connection URL for the driver e.g. jdbc:mysql://localhost:3306/demo! • user - The user name to connect as! • password - The password for the user! metricPrefix: "Custom Metrics|SQL|" 2. Configure the path to the config.yaml file by editing the <task-arguments> in the monitor.xml file. Below is the sample <task-arguments> <!-- config file--> <argument name="config-file" is-required="true" default-value="monitors/SQLMonitor/config.yml" /> .... </task-arguments> Metric Queries! ============================== Only queries that start with SELECT are allowed.! The queries to get the metric values from the database should only return one row and one column, additional rows and columns will be ignored. The name of the metric will be the first column name return by the query.! Example- select value as count from statistics where uuid = 472 displayPrefix helps to give better visualization on schema name or table name for particular sql metric. commands: - command: "select foo as foobar from bar where id = 10" displayPrefix: "Expedia" - command: "select foo as foobar from bar where id = 5" displayPrefix: "DerbySoft" ## Contributing ## Always feel free to fork and contribute any changes directly via [GitHub][]. ## Community ## Find out more in the [Community][]. ## Support ## For any questions or feature request, please contact [AppDynamics Center of Excellence][]. **Version:** 1.0 **Controller Compatibility:** 3.7 or later **SQL Version Tested On:** Ver 14.14 Distrib 5.6.15 [GitHub]: https://github.com/Appdynamics/SQL-monitoring-extension [Community]: http://community.appdynamics.com/ [AppDynamics Center of Excellence]: mailto:ace-request@appdynamics.com
About
SQL-monitoring-extension is a monitor which puts arbitrary queries against a SQL database as metrics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published