Code Monkey home page Code Monkey logo

cloudforecast's Introduction

CloudForecast - server resource monitoring framework

WARNING: Alpha quality code

サーバ等のリソース監視をするためのツールです。
RRDToolの薄いラッパー、情報取得のためのフレームワークとして設計されています。
CloudForecastは、4つのプロセスによって動作します。

 - 巡回デーモン
 - グラフ閲覧 HTTPD
 - 情報取得Gearmanワーカー
 - RRDファイル更新Gearmanワーカー

小規模な監視では、Gearmanがなくても動作可能です。
動作イメージはdocsディレクトリ以下の cloudforecast.png になります

# 巡回デーモン 
$ ./cloudforecast_radar -r -c cloudforecast.yaml -l server_list.yaml
  - 起動すると5分ごとに巡回を行います
  - -r 再起動オプション。ライブラリや設定ファイルを更新すると自動で再起動します
  - -c 設定ファイル
  - -l サーバ一覧


# web server
$ ./cloudforecast_web -r -p 5000 -c cloudforecast.yaml -l server_list.yaml
  - グラフ閲覧 HTTPD
  - -p ポート httpdのport
  - -o | -host httpdがListenするIP。デフォルトはすべてのIP
  - --allow-from アクセス可能なクライアントIP/IPセグメント、複数指定可能 192.168.0.1 or 192.168.0.1/24
                 なにも指定しなければ アクセス制御はしない
  - --front-proxy リバースプロキシーを使っている場合に、そのIPアドレス/IPセグメント。複数指定可能

# 情報取得Gearmanワーカー
$ ./cf_fetcher_worker -r -c cloudforecast.yaml \
     -max-workers 2 -max-request-per-child 100 -max-exection-time 60 
  - gearmanでのリソース情報取得ワーカー
  - -max-worker preforkするワーカー数
  - -max-request-per-child 1ワーカープロセス処理回数。この回数を超えるとプロセスが新しく作り直される
  - -max-exection-time ワーカーの1回の取得作業でこれ以上の時間かかっている場合、そのワーカーを停止します

# RRDファイル更新Gearmanワーカー
$ ./cf_updater_worker -r -c cloudforecast.yaml \
     -max-workers 2 -max-request-per-child 100 -max-exection-time 60 
 - gearmanでのリソース情報をrrdファイルに書き込むワーカー

#環境変数
CF_DEBUG=1 をするとdebugログが出力されます

cloudforecast's People

Contributors

atzm avatar charsbar avatar hirose31 avatar kazeburo avatar kzys avatar nikushi avatar onopm avatar toru avatar walf443 avatar

Watchers

 avatar  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.