New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mysqlcollector

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysqlcollector

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

MySQLCollector Build Status Gem Version Coverage Status

Ruby GEM to collect MySQL Metrics and send them to InfluxDB. It's a fast and easy implementation.

Requirements

Client

Where it's run MySQLCollector.

  • Ruby 1.9.3
  • MySQL 5.x

Server

  • InfluxDB
  • Grafana

Install

MySQLCollector installation is pretty standard:

$ [sudo] gem install mysqlcollector

Create a user and database on MySQL:

mysql> GRANT REPLICATION CLIENT, PROCESS ON *.*
       TO 'mysqlcollector'@'%' IDENTIFIED BY 'mysqlcollector';
mysql> GRANT SELECT ON performance_schema.* TO 'mysqlcollector'@'%';

Create a user and database on InfluxDB:

> CREATE USER mysqlcollector WITH PASSWORD 'mysqlcollector';
> CREATE DATABASE mysqlcollector;

To generate a JSON template for Grafana:

$ mysqlcollector --template > grafana_mysql.json

For more help as import template, please see the doc of grafana.

Basic Usage

For this case, InfluxDB and Grafana running in your local docker, try:

$ mysqlcollector --mysql-host 192.168.99.100 \
                 --influx-host 192.168.99.100
Daemonize

You can daemonize this tool, and send new metric every 30 seconds:

$ mysqlcollector --mysql-host 192.168.99.100 \
                 --influx-host 192.168.99.100 \
                 --daemonize
Debuging
$ mysqlcollector --mysql-host 192.168.99.100 \
                 --influx-host 192.168.99.100 \
                 --debug

Warning

  1. Do not use this tool in production before testing it.
  2. Please, use when do you need.
  3. The author is NOT responsible for misuse use of this tool.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 05 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc