New Relic Infrastructure Integration for MySQL captures critical performance metrics and inventory reported by MySQL database.
Data is obtained by querying directly the database for its status and configuration variables to build the reported metrics and inventory.
It is required to create a user with replication privilege. Execute the following command, replacing <SET_PASSWORD> with selected password.
$ sudo mysql -e "CREATE USER 'newrelic'@'localhost' IDENTIFIED BY '<SET_PASSWORD>';"
$ sudo mysql -e "GRANT REPLICATION CLIENT ON *.* TO 'newrelic'@'localhost' WITH MAX_USER_CONNECTIONS 5;"
- download an archive file for the MySQL Integration
- extract
mysql-definition.yml
and/bin
directory into/var/db/newrelic-infra/newrelic-integrations
- add execute permissions for the binary file
nr-mysql
(if required) - extract
mysql-config.yml.sample
into/etc/newrelic-infra/integrations.d
This is the description about how to run the MySQL Integration with New Relic Infrastructure agent, so it is required to have the agent installed (see agent installation).
In order to use the MySQL Integration it is required to configure mysql-config.yml.sample
file. Firstly, rename the file to mysql-config.yml
. Then, depending on your needs, specify all instances that you want to monitor with correct credentials. Once this is done, restart the Infrastructure agent.
You can view your data in Insights by creating your own custom NRQL queries. To do so use the MysqlSample event type.
Assuming that you have the source code and Go tool installed you can build and run the MySQL Integration locally.
- Go to the directory of the MySQL Integration and build it
$ make
- The command above will execute the tests for the MySQL Integration and build an executable file called
nr-mysql
underbin
directory. Runnr-mysql
with parameters specifying username and password
$ ./bin/nr-mysql -username <username> -password <password>
- If you want to know more about usage of
./bin/nr-mysql
check
$ ./bin/nr-mysql -help
For managing external dependencies govendor tool is used. It is required to lock all external dependencies to specific version (if possible) into vendor directory.
We welcome code contributions (in the form of pull requests) from our user community. Before submitting a pull request please review these guidelines.
Following these helps us efficiently review and incorporate your contribution and avoid breaking your code with future changes to the agent.
To extend your monitoring solution with custom metrics, we offer the Integrations Golang SDK which can be found on github.
Refer to our docs site to get help on how to build your custom integrations.
You can find more detailed documentation on our website, and specifically in the Infrastructure category.
If you can't find what you're looking for there, reach out to us on our support site or our community forum and we'll be happy to help you.
Find a bug? Contact us via support.newrelic.com, or email [email protected].
New Relic, Inc.