Giter VIP home page Giter VIP logo

raingauge's Introduction

Project Status

Box Rain Gauge

Rain Gauge is a tool to simplify the process of collecting detailed information from mysql database servers when specific conditions are triggered. Collections are packaged and centralised in one place, with a convenient web interface to let you explore the data easily. This tool uses a modified version of the percona toolkit script pt-stalk to handle collecting data from remote servers.

Quickstart

Installation consists of two parts: setting up the web interface, and setting up the collector.

Setting up the web interface

Installation of the web interface is super simple! Just clone the RainGauge project in the document root of your webserver:

git clone git://github.com/box/RainGauge.git

There are a few things to configure in the conf/config.inc.php file if you want, but those aren't necessary

Installing the collection scripts

The collection scripts are a bit more involved. You'll want to create a separate user account in mysql. You'll also need to customise a couple of the scripts to put in the address of the web server where you installed the web interface, and change and options you may want to send to pt-stalk. Then you'll install a service and start it.

Install the scripts

cp RainGauge/scripts/raingauge_package_and_send.sh /usr/bin/
cp RainGauge/scripts/pt-stalk-raingauge /usr/bin/

Set up the package and send script

vi /usr/bin/raingauge_package_and_send.sh

Now change SERVER='' to be the web server where you installed the interface. The collection script will do a http post to copy collected data to a central location

Set up a new database user in mysql

mysql -uroot -e "GRANT PROCESS, SUPER ON *.* TO 'raingauge'@'localhost' IDENTIFIED BY 'SuperSecurePass'"

Add the raingauge service

cp RainGauge/scripts/raingauge_rc /etc/raingauge_rc
cp RainGauge/scripts/raingauge_service /etc/init.d/raingauge

Edit the rc file to set up options

vi /etc/raingauge_rc

Edit the following line to use the same password you created for the mysql user:

PT_MYSQL_PASS=''

Start the service

sudo service raingauge start

Install a cleanup cron

You will probably want to clean up old collections after a while, try 2 days to start:

[[ -d /www/RainGauge/collected/ ]] && find /www/RainGauge/collected/ -mindepth 1 -mtime +2 -exec rm -rf {} \;

Copyright and License

Copyright 2014 Box, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

raingauge's People

Contributors

gtowey avatar geoffreyanderson avatar pborreli avatar nzakas avatar michaelcoburn avatar

Watchers

James Cloos avatar David Horton 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.