source: branches/fc11-dev/noc/html/graph.php @ 1461

Last change on this file since 1461 was 42, checked in by presbrey, 18 years ago
scripts.mit.edu NOC graphing
File size: 842 bytes
Line 
1<?php
2include('rrdgraph.inc.php');
3require_once('rrdgraph.lib.php');
4
5import_request_variables('g','i_');
6
7$host = isset($i_host)?$i_host:'better-mousetrap';
8$service = isset($i_service)?$i_service:'LOAD';
9$time = isset($i_time)?$i_time:'115200';
10$legend = isset($i_legend)&&$i_legend==0?0:1;
11//$title = isset($i_title)&&strlen($i_title)?($i_title):('%h: %s');
12$title = '%h: %s';
13if (isset($i_title) && $i_title==0) $title = null;
14$geom = isset($i_geom)&&strpos($i_geom,'x')?explode('x',$i_geom):array(403,146); /* (500x200 on output) */
15$width = isset($i_width)&&is_numeric($i_width)?floor($i_width):$geom[0];
16$height = isset($i_height)&&is_numeric($i_height)?floor($i_height):$geom[1];
17
18$time = rrd_time($time);
19
20outputGraph($host, $service, $time, array('legend'=>($legend==1?true:false), 'title'=>$title, 'geom'=>array($width,$height)));
Note: See TracBrowser for help on using the repository browser.