Giter VIP home page Giter VIP logo

trafgrapher's Introduction

TrafGrapher

TrafGrapher is an javascript program to collect and display data. It can read MRTG log files, or can collect it's own data. Also useable to display SAN storage performance or Nagios performance data.

No need for PHP or other daemon on your server. Everything is done in your favorite browser using javascript.

Features

  • interactive graph manipulation (hide graphs, zoom intervals)
  • pure html/javascript/css - no need for server scripting
  • display multiple graphs at once (also multiple routers)
  • can handle integer or floating point, positive or negative values
  • combine and compare selected interfaces
  • custom time ranges
  • display total of transfered bytes for selected time range
  • display exact transfer speed for selected time
  • multiple graphing modes:
    • JSON mode, collect performance data using tgc.py from various sources:
      • SNMP
      • /proc/net/dev
      • ipset rules
      • iptables rules
    • MRTG mode, reuse MRTG log files
    • graph SAN storage performance
      • DELL Unity or Compellent storage
      • EMC Clarion CX4-120
      • IBM Storwize (tested on V3700 and V7000)
    • Nagios performance data
  • any browser support (mobile devices too)
  • less intensive disk writes for .log files

Requirements:

  • flotcharts from http://flotcharts.org
  • installed and configured MRTG (for MRTG graphs only)
  • web server with allowed directory indexing (for storage graph only)

How to install?

Download from git.salstar.sk:

git clone http://git.salstar.sk/trafgrapher.git
cd trafgrapher

Download flotcharts and unpack it into "flot" directory:

git clone https://github.com/flot/flot
make

or:

curl http://www.flotcharts.org/downloads/flot-0.8.3.tar.gz | tar xvzf -

Usage

Just point your web browser to trafgrapher script and give him some options, for example:

http://localhost/trafgrapher/network.html?m=/mrtg/router/
http://localhost/trafgrapher/network.html?j=/tg/router/index.json

How to collect data from IBM Storwize

Create "mrtg" or "iostats" directory and copy statistics data from storage.

For IBM storwize you have to use these commands:

IOSTATS=/var/log/storwize
NODE=1
HOST=192.168.1.$((NODE+1))
ssh -q $HOST "cpdumps -prefix /dumps/iostats $NODE"
scp $HOST:"/dumps/iostats/N*_stats_*" $IOSTATS/

Open URL to your web server and enjoy graphs:

http://localhost/trafgrapher/?m=/path/to/mrtg/index.html
http://localhost/trafgrapher/?s=/path/to/iostats/

Keyboard shortcuts

Key Command
R Reload
A Select all
X Invert selection
N Select none
Z Zoom out
0 Interval 3 years
2 Interval 2 years
9 Interval 1 year
5 Interval 1 month
7 Interval 1 week
3 Interval 3 days
1 Interval 1 day
8 Interval 8 hours
4 Interval 4 hours

trafgrapher's People

Stargazers

 avatar  avatar

Watchers

 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.