# README
DISCONTINUATION OF PROJECT.
This project will no longer be maintained by Intel.
This project has been identified as having known security escapes.
Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.
Intel no longer accepts patches to this project.
DISCONTINUATION OF PROJECT
This project will no longer be maintained by Intel. Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates. Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.
Snap collector plugin - MySQL
This plugin collects metrics from MySQL database.
It's used in the Snap framework.
Getting Started
System Requirements
- golang 1.6+ - needed only for building
Operating systems
All OSs currently supported by snap:
- Linux/amd64
Installation
Download mysql plugin binary:
You can get the pre-built binaries for your OS and architecture from the plugin's GitHub Releases page.
To build the plugin binary:
Fork https://github.com/intelsdi-x/snap-plugin-collector-mysql
Clone repo into $GOPATH/src/github.com/intelsdi-x/
$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-mysql.git
Build the plugin by running make within the cloned repo:
$ make
This builds the plugin in ./build
Configuration and Usage
- Set up the Snap framework.
- Create Global Config, see description in [Global Config] (https://github.com/intelsdi-x/snap-plugin-collector-mysql/blob/master/README.md#global-config).
- Load the plugin and create a task, see example in Examples.
Documentation
###Global config
Global configuration files are described in snap's documentation. You have to add "mysql"
section with following entries:
"mysql_connection_string"
- it's DSN with format described here. ex."root:r00tme@tcp(localhost:3306)/"
whereroot
is username andr00tme
is password,localhost
is host address and3306
is port where mysql is listening."mysql_use_innodb"
- possible values aretrue
andfalse
. Specifies if InnoDB statistics are collected. If you set this value to true and they are unavailable plugin will fail to start.
See exemplary Global configuration files in [examples/configs/] (https://github.com/intelsdi-x/snap-plugin-collector-mysql/blob/master/examples/configs/).
Collected Metrics
List of collected metrics is described in METRICS.md.
Example
Example running mysql and writing data to a file using snap-plugin-publisher-file.
Create Global Config, see examples in [examples/configs/] (https://github.com/intelsdi-x/snap-plugin-collector-mysql/blob/master/examples/configs/).
Set up the Snap framework,
in one terminal window, run snapteld
(in this case with logging set to 1, trust disabled and global configuration saved in config.json):
$ snapteld -l 1 -t 0 --config config.json
In another terminal window:
Download and load Snap plugins:
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-file/latest/linux/x86_64/snap-plugin-publisher-file
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-collector-mysql/latest/linux/x86_64/snap-plugin-collector-mysql
$ snaptel plugin load snap-plugin-publisher-file
$ snaptel plugin load snap-plugin-collector-mysql
See available metrics for your system
$ snaptel metric list
Create a task manifest file (exemplary files in [examples/tasks/] (https://github.com/intelsdi-x/snap-plugin-collector-mysql/blob/master/examples/tasks/)):
{
"version": 1,
"schedule": {
"type": "simple",
"interval": "1s"
},
"workflow": {
"collect": {
"metrics": {
"/intel/mysql/*": {}
},
"publish": [
{
"plugin_name": "file",
"config": {
"file": "/tmp/published_mysql"
}
}
]
}
}
}
Create a task:
$ snaptel task create -t examples/tasks/task.json
Stop previously created task:
$ snaptel task stop <task_id>
Roadmap
There isn't a current roadmap for this plugin, but it is in active development. As we launch this plugin, we do not have any outstanding requirements for the next release. If you have a feature request, please add it as an issue and/or submit a pull request.
Community Support
This repository is one of many plugins in Snap, a powerful telemetry framework. See the full project at http://github.com/intelsdi-x/snap.
To reach out to other users, head to the main framework.
Contributing
We love contributions!
There's more than one way to give back, from examples to blogs to code updates. See our recommended process in CONTRIBUTING.md.
And thank you! Your contribution, through code and participation, is incredibly important to us.
License
Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.
Acknowledgements
- Author: @Lukasz Mroz