老總一直看mrtg。相對與我們維護cacti維護起來更容易些。本來就有了cacti,爲什麼還要去弄mrtg,所以就弄了cacti的流量這個
首先把這段php代碼放到根目錄下
<?php ob_start(); ?>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<?php
if(empty($_REQUEST["key"])) die(':) missing key');
if($_REQUEST["key"] != 'longxi') die(':) error key');
$guest_account = true;
include_once("./lib/rrd.php");
include("./include/global.php");
header("Content-type: p_w_picpath/png");
/* flush the headers now */
ob_end_clean();
session_write_close();
$graph_data_array = array();
print @rrdtool_function_graph($_GET["local_graph_id"], (array_key_exists("rra_id", $_GET) ? $_GET["rra_id"] : null), $graph_data_array);
?>
第二就是這個鏈接2.
http://aaa.com/view_p_w_picpaths.php?action=view&local_graph_id=200&rra_id=5&key=guest
local_graph_id=200
rra_id=5
key=guest
這些是我們要填寫的
然後就是一個鏈接就是一張圖了
備註:html文件加入這個<meta http-equiv="refresh" content="跳轉時間" url="鏈接地址"> 將它放在<head></head>之間就行了。 有自動刷新的功能