if ($ds['draw'] == "AREASTACK") {
     $ds['draw'] = "AREA";
     $ds['stack'] = ":STACK";
 } else {
     if (preg_match("/^LINESTACK([0-9\\.]*)/", $ds['ds_draw'], $m)) {
         if ($i == 0) {
             $data['draw'] = "LINE{$m['1']}";
             /// FIXME $ds['draw']
         } else {
             $ds['draw'] = "STACK";
         }
     }
 }
 $cmd_graph .= ' ' . $ds['draw'] . ':' . $ds_name . '#' . $colour . ':"' . $descr . '"' . $ds['stack'];
 if ($ds['line'] == TRUE) {
     $colour_line = darken_color($colour);
     $cmd_graph .= ' LINE1.5:' . $ds_name . '#' . $colour_line;
 }
 $ds_unit = strlen($ds['unit']) ? $ds['unit'] : '';
 // Unit text per DS
 if (isset($ds['num_fmt'])) {
     $num_fmt = $ds['num_fmt'];
 }
 // Numeric format per DS
 if (in_array("lst", $data_show)) {
     $cmd_graph .= " GPRINT:" . $ds_data . ":LAST:%" . $num_fmt . "lf" . $mag_unit . $ds_unit;
 }
 if (in_array("avg", $data_show)) {
     $cmd_graph .= " GPRINT:" . $ds_data . ":AVERAGE:%" . $num_fmt . "lf" . $mag_unit . $ds_unit;
 }
 if (in_array("min", $data_show)) {
Esempio n. 2
0
<?php

/**
 * Observium
 *
 *   This file is part of Observium.
 *
 * @package    observium
 * @subpackage graphs
 * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
 *
 */
$ds_in = "INUCASTPKTS";
$ds_out = "OUTUCASTPKTS";
$colour_area_in = "AA66AA";
$colour_line_in = darken_color($colour_area_in);
//$colour_line_in = "330033";
$colour_area_out = "FFDD88";
$colour_line_out = "FF6600";
$colour_area_in_max = "cc88cc";
$colour_area_out_max = "FFefaa";
$graph_max = 1;
$unit_text = "Packets/s";
$args['nototal'] = 1;
$print_total = 0;
$nototal = 1;
include $config['html_dir'] . "/includes/graphs/generic_duplex.inc.php";
// EOF
Esempio n. 3
0
<?php

/**
 * Observium
 *
 *   This file is part of Observium.
 *
 * @package    observium
 * @subpackage graphs
 * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2016 Observium Limited
 *
 */
$scale_min = "0";
$rrd_filename = get_rrd_path($device, "bgp-" . $data['bgpPeerRemoteAddr'] . ".rrd");
$ds_in = "bgpPeerInUpdates";
$ds_out = "bgpPeerOutUpdates";
$colour_area_in = "AA66AA90";
$colour_line_in = darken_color($colour_area_in, 1);
$colour_area_out = "FF660090";
$colour_line_out = darken_color($colour_area_out, 1);
$colour_area_in_max = "FFEE99";
$colour_area_out_max = "FF7711";
$graph_max = 1;
$unit_text = "Updates";
include $config['html_dir'] . "/includes/graphs/generic_duplex.inc.php";
// EOF