GithubHelp home page GithubHelp logo

kr79 / hubot-mysql-chatops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samlambert/hubot-mysql-chatops

0.0 1.0 0.0 128 KB

ChatOps for MySQL.

License: MIT License

JavaScript 11.61% CoffeeScript 83.01% Shell 5.38%

hubot-mysql-chatops's Introduction

Hubot: hubot-mysql-chatops

A small collection of MySQL ChatOps scripts.

See each script in src/ for full documentation.

Installation

Add hubot-mysql-chatops to your package.json file:

"dependencies": {
  "hubot-mysql-chatops": ">= 1.0.0",
}

Add hubot-mysql-chatops to your external-scripts.json:

["hubot-mysql-chatops"]

Run npm install

Warnings

Some of these scripts execute queries. It is very strongly recommended that a read only user is used and queries are executed on a MySQL slave.

I can't be responsible for you deleting all your data ;)

An example GRANT would be: GRANT SELECT ON some_db.* TO 'hubot_mysql'@'hubot_host' IDENTIFIED BY 'some_pass';

Sample Interaction

user1>> mysql explain SELECT * FROM users
hubot>> user1:
		┌───────────────┬─────────┬──────────┬────────┬────────┬──────────┬────────┬──────────┬────┐
		│Select Type    │Table    │Type      │Possibl…│Key     │Key Len   │Ref     │Rows      │Ext…│
		├───────────────┼─────────┼──────────┼────────┼────────┼──────────┼────────┼──────────┼────┤
		│SIMPLE         │users    │ALL       │null    │null    │null      │null    │0         │    │
		└───────────────┴─────────┴──────────┴────────┴────────┴──────────┴────────┴──────────┴────┘
user1>> mysql profile SELECT * FROM users
hubot>> user1:
    ┌──────────────────────────────────────┬────────────────┐
    │Status                                │Duration (secs) │
    ├──────────────────────────────────────┼────────────────┤
    │starting                              │0.000036        │
    ├──────────────────────────────────────┼────────────────┤
    │Waiting for query cache lock          │0.000004        │
    ├──────────────────────────────────────┼────────────────┤
    │checking query cache for query        │0.000042        │
    ├──────────────────────────────────────┼────────────────┤
    │checking permissions                  │0.000009        │
    ├──────────────────────────────────────┼────────────────┤
    │Opening tables                        │0.000031        │
    ├──────────────────────────────────────┼────────────────┤
    │System lock                           │0.000011        │
    ├──────────────────────────────────────┼────────────────┤
    │Waiting for query cache lock          │0.000027        │
    ├──────────────────────────────────────┼────────────────┤
    │init                                  │0.000029        │
    ├──────────────────────────────────────┼────────────────┤
    │optimizing                            │0.000006        │
    ├──────────────────────────────────────┼────────────────┤
    │statistics                            │0.000013        │
    ├──────────────────────────────────────┼────────────────┤
    │preparing                             │0.000010        │
    ├──────────────────────────────────────┼────────────────┤
    │executing                             │0.000003        │
    ├──────────────────────────────────────┼────────────────┤
    │Sending data                          │0.000089        │
    ├──────────────────────────────────────┼────────────────┤
    │end                                   │0.000006        │
    ├──────────────────────────────────────┼────────────────┤
    │query end                             │0.000006        │
    ├──────────────────────────────────────┼────────────────┤
    │closing tables                        │0.000008        │
    ├──────────────────────────────────────┼────────────────┤
    │freeing items                         │0.000007        │
    ├──────────────────────────────────────┼────────────────┤
    │Waiting for query cache lock          │0.000003        │
    ├──────────────────────────────────────┼────────────────┤
    │freeing items                         │0.000064        │
    ├──────────────────────────────────────┼────────────────┤
    │Waiting for query cache lock          │0.000008        │
    ├──────────────────────────────────────┼────────────────┤
    │freeing items                         │0.000003        │
    ├──────────────────────────────────────┼────────────────┤
    │storing result in query cache         │0.000004        │
    ├──────────────────────────────────────┼────────────────┤
    │logging slow query                    │0.000002        │
    ├──────────────────────────────────────┼────────────────┤
    │cleaning up                           │0.000003        │
    └──────────────────────────────────────┴────────────────┘

Thanks

Thanks to everyone who has contributed to Hubot and this packages dependencies.

A special thank you to @technicalpickles for being awesome.

hubot-mysql-chatops's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.