GithubHelp home page GithubHelp logo

alexdean / ganglia-misc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vvuksan/ganglia-misc

1.0 3.0 0.0 1.07 MB

Misc. Ganglia scripts, add-ons

PHP 93.60% Shell 0.39% Perl 2.71% JavaScript 2.57% Python 0.73%

ganglia-misc's Introduction

This is an attempt to make the Ganglia UI more usable. You should be able to drop this into
your $HTTPD_ROOT/ganglia then run make to generate conf.php.

Please modify Makefile to point the directory where you installed the code. Also note
that Makefile will create directories /var/lib/ganglia/rrds and /var/lib/ganglia/dwoo
which are required for UI to function.

IMPORTANT
=========

Make file will create a file called conf_default.php. These are default settings. If you 
would like to override any of the $conf settings put them in conf.php file ie. my conf.php
looks like this

<?php

$conf['graphreport_stats'] = false;

?>

That way upgrades are much simpler and we can add/change configuration options with as 
little impact as possible.

New features
============

Views
=====

Views are an arbitrary collection of hostname/metric graphs. They are defined using JSON files and stored in the
/conf directory. View file names have to start with view ie.

view_web_servers_vitals.json

There are two types of views, standard (default) and regex views. 

Standard views are defined as follows

{"view_name":"web_servers_vitals",
  "items": [
    { "hostname":"web1", "metric":"disk_free"},
    { "hostname":"web2", "graph":"cpu_report"}
          ]
}

Regex views allow using regex to match hostnames (need to specify view_type regex) e.g.

{"view_name":"web_servers_wiki",
 "view_type":"regex",
  "items": [
    { "hostname":"web-wiki.*", "metric":"disk_free"},
    { "hostname":".*wiki", "graph":"cpu_report"}
          ]
}

Obviously you can write a regex that matches a single host. 

Easy Graph Aggregation
======================

You can also define add graphs created through easy graph aggregation by specifying
"aggregate_graph": true then specifying all the regex rules to match host_regexes.
For example this is one example. Save it as view_myview.json and put in the conf 
directory.

{
 "view_name":"myview",
 "items":[
  { "hostname":"web01.domain.com","graph":"cpu_report"},
  { "aggregate_graph":"true",
      "host_regex":[ 
        {"regex":"web-0[1-6]"},
        {"regex":"web-2[3-6]"}
      ],
      "metric":"load_one",
      "graph_type":"line",
      "description":"Prod Web Servers load1"
  }
 ],
 "view_type":"standard"
}


Auto Rotation
=============

Automatically rotate view graphs every 30 seconds with hour, day, week and month overview for each metric
on a single page. It will rotate until page closed. 

Optional Graphs
===============

Ability to define optional graphs that are show at the top of the page for any host.
Those are defined using overrides stored in $GANGLIA_DIR/conf directory. You need
to make sure that directory is writeable by the Apache/Web user.

This should work like the normal Ganglia web UI. The difference is that
you need to make the conf/ directory writeable by the Apache user.

Search
======

You can search for a metric or a host in a live manner. You should be able to click on the
host or metric in the search and 

Installation notes
==================

IMPORTANT:
You should install the PHP JSON extension. It comes with PHP 5.2+. If you are on 5.1 use 

pecl install json

pecl is part of php-pear package on RHEL/CentOS. Make sure you have 

# cat /etc/php.d/json.ini 
extension=json.so

On RHEL/CentOS 4, you will also need phpize which comes with the php-devel package.

In recent versions, a native version of JSON encoding/decoding is used, but using the
PECL extension is recommended for performance reasons.

BUGS
====

In the search window when you click on a metric it should actually jump to the metric once the
page is opened. That doesn't work. If you just press enter in the Location bar it does jump.

ganglia-misc's People

Contributors

jbuchbinder avatar jgoulah avatar koebi001 avatar pjjw avatar vuksanv avatar vvuksan avatar

Stargazers

 avatar

Watchers

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