예제 #1
0
<?php

require_once "livemunin.php";
if (isset($_GET['service'])) {
    $m = new LiveMunin();
    $_GET['service'] = 'libvirt_cputime';
    echo $m->graphValues(str_replace('_', '-', $_GET['service']));
    die;
}
?>
<html>
<head>
    <title>LiveMunin</title>
    
    <script language="javascript" type="text/javascript" src="flot/jquery.js"></script>
    <script language="javascript" type="text/javascript" src="flot/jquery.flot.js"></script>
    <script language="javascript" type="text/javascript" src="flot/jquery.flot.stack.js"></script>
    <script language='javascript'>

    $(document).ready(function() {
        
        var options = {
                lines: { show: true },
                points: { show: false },
                xaxis: { mode: 'time' }
        };
        
        
         function fetchGraph(service) {
              
             function onDataReceived(series) {
예제 #2
0
<?php

require_once "livemunin.php";
$services[] = 'libvirt-cputime';
$services[] = 'iostat';
$services[] = 'forks';
$services[] = 'load';
$services[] = 'open_inodes';
if (isset($_GET['service'])) {
    $m = new LiveMunin();
    if (in_array($_GET['service'], $services)) {
        echo $m->graphValues($_GET['service']);
    }
    die;
}
?>
<html>
<head>
    <title>LiveMunin</title>
    
    <script language="javascript" type="text/javascript" src="flot/jquery.js"></script>
    <script language="javascript" type="text/javascript" src="flot/jquery.flot.js"></script>
    <script language="javascript" type="text/javascript" src="flot/jquery.flot.stack.js"></script>
    <script language='javascript'>

    $(document).ready(function() {
        
        var options = {
                colors: ["#4BD37F", "#184B2E", "#1B3522", "#60FF62", "#60B923"],
                lines: { 
                        show: true