See
http://bd808.com/graphite-graph-php/elementindex.html

Example code

require_once dirname(__FILE__) . '/graphite-graph-php/src/autoload.php';
$g = Graphite_GraphBuilder::builder()
  ->title('all Farms : Succesful (200) Requests per second vs Request time')
  ->vtitle('Request Per Second')
  ->width($width)
  ->height($height)
  ->bgcolor($bgcolor)
  ->fgcolor($fgcolor)
  ->from($time)
  ->prefix('stats.as')
  ->prefix('*.search*')
  ->buildSeries('200')
    ->cactistyle()
    ->aliasByNode(2)
    ->highestAverage(5)
    ->movingAverage(60);

      $url = 'http://yourgraphiteurl.com/render?' . $g->build();
// Use this url value in some theming function

Maybe we should make a graphite module instead?

Comments

mundanity’s picture

Status: Active » Closed (won't fix)

Yep, I think this makes more sense as a separate module. I imagine most people are "happy" with the default graphite interface, or have their own consolidated screens to look at this sort of thing.

Having a Drupal specific one may make sense for some sites, but I don't think the extra code in this module would be beneficial for most sites.